mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-04 16:51:31 +02:00
Added two new commands; warp by zone entrance and a getpos command. Fixed character actor not appearing on zone... 0x2 packet only sent on login. Added spawnType to getSpawnPackets.
This commit is contained in:
parent
3fcc9eea49
commit
02b90edd3f
7 changed files with 78 additions and 16 deletions
|
@ -69,7 +69,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
{
|
||||
SubPacket spawnPacket;
|
||||
if (!spawnedFirstTime && playerActorId == actorId)
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, spawnType, false);
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0, positionX, positionY, positionZ, rotation, 0x1, false);
|
||||
else if (playerActorId == actorId)
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, true);
|
||||
else
|
||||
|
@ -101,11 +101,16 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
}
|
||||
|
||||
public virtual BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
return getSpawnPackets(playerActorId, 0x1);
|
||||
}
|
||||
|
||||
public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, spawnType));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(createStatePacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
|
|
|
@ -89,7 +89,8 @@ namespace FFXIVClassic_Map_Server
|
|||
|
||||
public void addActorToZone(Actor actor)
|
||||
{
|
||||
mActorList.Add(actor.actorId, actor);
|
||||
if (!mActorList.ContainsKey(actor.actorId))
|
||||
mActorList.Add(actor.actorId, actor);
|
||||
|
||||
int gridX = (int)actor.positionX / boundingGridSize;
|
||||
int gridY = (int)actor.positionZ / boundingGridSize;
|
||||
|
|
|
@ -145,14 +145,14 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket getSpawnPackets(uint playerActorId)
|
||||
public override BasePacket getSpawnPackets(uint playerActorId, uint spawnType)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
if (isMyPlayer(playerActorId))
|
||||
subpackets.AddRange(create0x132Packets(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, spawnType));
|
||||
subpackets.Add(createAppearancePacket(playerActorId));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(_0xFPacket.buildPacket(playerActorId, playerActorId));
|
||||
|
@ -363,14 +363,13 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
return propPacketUtil.done();
|
||||
}
|
||||
|
||||
public void sendZoneInPackets(WorldManager world)
|
||||
public void sendZoneInPackets(WorldManager world, ushort spawnType)
|
||||
{
|
||||
playerSession.queuePacket(SetMapPacket.buildPacket(actorId, zone.regionId, zone.actorId), true, false);
|
||||
playerSession.queuePacket(_0x2Packet.buildPacket(actorId), true, false);
|
||||
playerSession.queuePacket(SetMusicPacket.buildPacket(actorId, 0x3D, 0x01), true, false);
|
||||
playerSession.queuePacket(SetMapPacket.buildPacket(actorId, zone.regionId, zone.actorId), true, false);
|
||||
playerSession.queuePacket(SetMusicPacket.buildPacket(actorId, zone.bgmDay, 0x01), true, false);
|
||||
playerSession.queuePacket(SetWeatherPacket.buildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR), true, false);
|
||||
|
||||
playerSession.queuePacket(getSpawnPackets(actorId));
|
||||
playerSession.queuePacket(getSpawnPackets(actorId, spawnType));
|
||||
|
||||
#region grouptest
|
||||
//Retainers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue