mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +02:00
Moved the warp and send packet code out of packet processor and into the server object. Rewrote the warp command to use the world manager (still working on it). Add a playmusic command.
This commit is contained in:
parent
d90dc0cb80
commit
3fcc9eea49
3 changed files with 48 additions and 78 deletions
|
@ -359,79 +359,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
packet.replaceActorID(entry.Value.actorID);
|
||||
entry.Value.queuePacket(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public Actor findActor(ConnectedPlayer player, uint id)
|
||||
{
|
||||
Actor ownerActor = mStaticActors[id];
|
||||
if (ownerActor == null)
|
||||
{
|
||||
foreach (Actor a in player.actorInstanceList)
|
||||
{
|
||||
if (a.actorID == player.eventCurrentOwner)
|
||||
{
|
||||
ownerActor = a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ownerActor == null)
|
||||
return null;
|
||||
}
|
||||
return ownerActor;
|
||||
}
|
||||
*/
|
||||
private void initNpcs()
|
||||
{
|
||||
/*
|
||||
List<Npc> npcList = Database.getNpcList();
|
||||
foreach (Npc npc in npcList)
|
||||
inn.addActorToZone(npc);
|
||||
Log.info(String.Format("Loaded {0} npcs...", npcList.Count));
|
||||
* */
|
||||
}
|
||||
|
||||
private void loadTest(ClientConnection client, ConnectedPlayer player)
|
||||
{
|
||||
string sequence = "6789abcdefghijklmnopqrsuvwxy";
|
||||
//10 for just login
|
||||
for (int i = 7; i < sequence.Length; i++)
|
||||
{
|
||||
|
||||
BasePacket packet = new BasePacket("./packets/tt2/" + sequence[i]);
|
||||
packet.replaceActorID(player.actorID);
|
||||
client.queuePacket(packet);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void doWarp(uint mapID, float x, float y, float z)
|
||||
{
|
||||
List<SubPacket> pList = new List<SubPacket>();
|
||||
|
||||
|
||||
foreach (KeyValuePair<uint, ConnectedPlayer> entry in mPlayers)
|
||||
{
|
||||
pList.Clear();
|
||||
|
||||
entry.Value.getActor().positionX = x;
|
||||
entry.Value.getActor().positionY = y;
|
||||
entry.Value.getActor().positionZ = z;
|
||||
|
||||
pList.Add(_0xE2Packet.buildPacket(0x6c, 0xF));
|
||||
pList.Add(SetMapPacket.buildPacket(0x6c, mapID, 0));
|
||||
BasePacket packet = BasePacket.createPacket(pList, true, false);
|
||||
|
||||
BasePacket actorPacket = entry.Value.getActor().getInitPackets(entry.Value.actorID);
|
||||
|
||||
packet.replaceActorID(entry.Value.actorID);
|
||||
actorPacket.replaceActorID(entry.Value.actorID);
|
||||
|
||||
entry.Value.queuePacket(packet);
|
||||
entry.Value.queuePacket(actorPacket);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue