1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-24 13:47:46 +00:00

Fixed spawning being broken.

This commit is contained in:
Filip Maj 2017-06-27 21:30:32 -04:00
parent 3370309dd0
commit ab3e152b7d
3 changed files with 14 additions and 12 deletions

View file

@ -92,9 +92,14 @@ namespace FFXIVClassic_Map_Server.Actors
}
public SubPacket CreateSpawnPositonPacket(ushort spawnType)
{
return CreateSpawnPositonPacket(null, spawnType);
}
public SubPacket CreateSpawnPositonPacket(Player player, ushort spawnType)
{
//TODO: FIX THIS IF
uint playerActorId = 0; //Get Rid
uint playerActorId = player == null ? 0 : player.actorId; //Get Rid
SubPacket spawnPacket;
if (!spawnedFirstTime && playerActorId == actorId)
spawnPacket = SetActorPositionPacket.BuildPacket(actorId, 0, positionX, positionY, positionZ, rotation, 0x1, false);
@ -252,7 +257,7 @@ namespace FFXIVClassic_Map_Server.Actors
subpackets.Add(CreateAddActorPacket(8));
subpackets.AddRange(GetEventConditionPackets());
subpackets.Add(CreateSpeedPacket());
subpackets.Add(CreateSpawnPositonPacket( spawnType));
subpackets.Add(CreateSpawnPositonPacket(player, spawnType));
subpackets.Add(CreateNamePacket());
subpackets.Add(CreateStatePacket());
subpackets.Add(CreateIsZoneingPacket());
@ -271,7 +276,7 @@ namespace FFXIVClassic_Map_Server.Actors
subpackets.Add(CreateAddActorPacket(8));
subpackets.AddRange(GetEventConditionPackets());
subpackets.Add(CreateSpeedPacket());
subpackets.Add(CreateSpawnPositonPacket(spawnType));
subpackets.Add(CreateSpawnPositonPacket(null, spawnType));
subpackets.Add(CreateNamePacket());
subpackets.Add(CreateStatePacket());
subpackets.Add(CreateIsZoneingPacket());

View file

@ -299,7 +299,7 @@ namespace FFXIVClassic_Map_Server.Actors
if (IsMyPlayer(requestPlayer.actorId))
subpackets.AddRange(Create0x132Packets());
subpackets.Add(CreateSpeedPacket());
subpackets.Add(CreateSpawnPositonPacket(spawnType));
subpackets.Add(CreateSpawnPositonPacket(this, spawnType));
subpackets.Add(CreateAppearancePacket());
subpackets.Add(CreateNamePacket());
subpackets.Add(_0xFPacket.BuildPacket(actorId));

View file

@ -136,17 +136,14 @@ namespace FFXIVClassic_Map_Server.dataobjects
if (actor is Character && ((Character)actor).isStatic)
continue;
GetActor().QueuePacket(actor.CreatePositionUpdatePacket());
QueuePacket(actor.CreatePositionUpdatePacket());
}
else
{
if (actor is Player)
GetActor().QueuePacket(actor.GetSpawnPackets(playerActor, 1));
else
GetActor().QueuePacket(actor.GetSpawnPackets(1));
{
QueuePacket(actor.GetSpawnPackets(playerActor, 1));
GetActor().QueuePacket(actor.GetInitPackets());
GetActor().QueuePacket(actor.GetSetEventStatusPackets());
QueuePacket(actor.GetInitPackets());
QueuePacket(actor.GetSetEventStatusPackets());
actorInstanceList.Add(actor);
if (actor is Npc)