mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-24 19:38:26 +02:00
Surrounded command chain with region boxes
Changed doWarp() to handle in implicit, in-zone only warps Might have issues with instanced zones, untested
This commit is contained in:
parent
b17d193a59
commit
ecc61ea5f9
2 changed files with 154 additions and 83 deletions
|
@ -372,26 +372,35 @@ namespace FFXIVClassic_Map_Server
|
|||
}
|
||||
|
||||
//Add player to new zone and update
|
||||
Area newArea;
|
||||
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(destinationZoneId);
|
||||
Area newArea;
|
||||
|
||||
if (destinationZoneId != 0)
|
||||
{
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(destinationZoneId);
|
||||
else
|
||||
newArea = GetZone(destinationZoneId).getPrivateArea(destinationPrivateArea, 0);
|
||||
}
|
||||
else
|
||||
newArea = GetZone(destinationZoneId).getPrivateArea(destinationPrivateArea, 0);
|
||||
|
||||
{
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(player.zoneId);
|
||||
else
|
||||
newArea = GetZone(player.zoneId).getPrivateArea(destinationPrivateArea, 0);
|
||||
}
|
||||
//This server does not contain that zoneId
|
||||
if (newArea == null)
|
||||
return;
|
||||
|
||||
newArea.addActorToZone(player);
|
||||
|
||||
//Update player actor's properties
|
||||
player.zoneId = newArea.actorId;
|
||||
player.zone = newArea;
|
||||
player.positionX = spawnX;
|
||||
player.positionY = spawnY;
|
||||
player.positionZ = spawnZ;
|
||||
player.rotation = spawnRotation;
|
||||
newArea.addActorToZone(player);
|
||||
|
||||
//Update player actor's properties
|
||||
player.zoneId = newArea.actorId;
|
||||
player.zone = newArea;
|
||||
player.positionX = spawnX;
|
||||
player.positionY = spawnY;
|
||||
player.positionZ = spawnZ;
|
||||
player.rotation = spawnRotation;
|
||||
|
||||
//Send packets
|
||||
player.playerSession.queuePacket(DeleteAllActorsPacket.buildPacket(player.actorId), true, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue