mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-22 20:57:47 +00:00
Started doing multiplayer stuff.
This commit is contained in:
parent
7116c96b2f
commit
1d20f8b8b8
6 changed files with 17 additions and 5 deletions
|
@ -136,7 +136,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actorID == 0)
|
if (actorID == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//Second connection
|
//Second connection
|
||||||
if (mPlayers.ContainsKey(actorID))
|
if (mPlayers.ContainsKey(actorID))
|
||||||
|
@ -215,7 +215,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
|
|
||||||
client.queuePacket(reply5);
|
client.queuePacket(reply5);
|
||||||
|
|
||||||
client.queuePacket(BasePacket.createPacket(AddActorPacket.buildPacket(player.actorID, player.actorID), true, false));
|
client.queuePacket(BasePacket.createPacket(AddActorPacket.buildPacket(player.actorID, player.actorID, 0), true, false));
|
||||||
|
|
||||||
client.queuePacket(reply6);
|
client.queuePacket(reply6);
|
||||||
|
|
||||||
|
@ -308,9 +308,11 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
break;
|
break;
|
||||||
//Update Position
|
//Update Position
|
||||||
case 0x00CA:
|
case 0x00CA:
|
||||||
|
//Update Position
|
||||||
UpdatePlayerPositionPacket posUpdate = new UpdatePlayerPositionPacket(subpacket.data);
|
UpdatePlayerPositionPacket posUpdate = new UpdatePlayerPositionPacket(subpacket.data);
|
||||||
player.updatePlayerActorPosition(posUpdate.x, posUpdate.y, posUpdate.z, posUpdate.rot, posUpdate.moveState);
|
player.updatePlayerActorPosition(posUpdate.x, posUpdate.y, posUpdate.z, posUpdate.rot, posUpdate.moveState);
|
||||||
|
|
||||||
|
//Update Instance
|
||||||
List<BasePacket> instanceUpdatePackets = player.updateInstance(inn.getActorsAroundActor(player.getActor(), 50));
|
List<BasePacket> instanceUpdatePackets = player.updateInstance(inn.getActorsAroundActor(player.getActor(), 50));
|
||||||
foreach (BasePacket bp in instanceUpdatePackets)
|
foreach (BasePacket bp in instanceUpdatePackets)
|
||||||
client.queuePacket(bp);
|
client.queuePacket(bp);
|
||||||
|
|
BIN
FFXIVClassic Map Server/bin/Debug/packets/playerscript
Normal file
BIN
FFXIVClassic Map Server/bin/Debug/packets/playerscript
Normal file
Binary file not shown.
BIN
FFXIVClassic Map Server/bin/Debug/packets/playerscript2
Normal file
BIN
FFXIVClassic Map Server/bin/Debug/packets/playerscript2
Normal file
Binary file not shown.
BIN
FFXIVClassic Map Server/bin/Debug/packets/playerscript3
Normal file
BIN
FFXIVClassic Map Server/bin/Debug/packets/playerscript3
Normal file
Binary file not shown.
|
@ -124,9 +124,16 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (actorInstanceList.Contains(actor))
|
if (actorInstanceList.Contains(actor))
|
||||||
|
{
|
||||||
posUpdateSubpackets.Add(actor.createPositionUpdatePacket(playerActor.actorID));
|
posUpdateSubpackets.Add(actor.createPositionUpdatePacket(playerActor.actorID));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
basePackets.Add(actor.createActorSpawnPackets(playerActor.actorID));
|
{
|
||||||
|
BasePacket p = actor.createActorSpawnPackets(playerActor.actorID);
|
||||||
|
p.replaceActorID(0x29b27d3, playerActor.actorID);
|
||||||
|
basePackets.Add(p);
|
||||||
|
actorInstanceList.Add(actor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
basePackets.Add(BasePacket.createPacket(posUpdateSubpackets, true, false));
|
basePackets.Add(BasePacket.createPacket(posUpdateSubpackets, true, false));
|
||||||
|
|
|
@ -12,9 +12,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||||
public const ushort OPCODE = 0x00CA;
|
public const ushort OPCODE = 0x00CA;
|
||||||
public const uint PACKET_SIZE = 0x28;
|
public const uint PACKET_SIZE = 0x28;
|
||||||
|
|
||||||
public static SubPacket buildPacket(uint playerActorID, uint actorID)
|
public static SubPacket buildPacket(uint playerActorID, uint actorID, byte val)
|
||||||
{
|
{
|
||||||
return new SubPacket(OPCODE, playerActorID, actorID, new byte[8]);
|
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||||
|
data[0] = val; //Why?
|
||||||
|
|
||||||
|
return new SubPacket(OPCODE, playerActorID, actorID, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue