mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
*Revert changes to worldmanager.cs, not needed anymore
*Made !warp silently catch all exceptions so they dont crash server/don't change player state if invalid *Moved rest of !warp parsing logic into parseWarp(), doWarp() now purely handles actual act of warping
This commit is contained in:
parent
2eb40a0d7c
commit
06606c5f01
2 changed files with 119 additions and 139 deletions
|
@ -372,35 +372,25 @@ namespace FFXIVClassic_Map_Server
|
|||
}
|
||||
|
||||
//Add player to new zone and update
|
||||
Area newArea;
|
||||
|
||||
if (destinationZoneId != 0)
|
||||
{
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(destinationZoneId);
|
||||
else
|
||||
newArea = GetZone(destinationZoneId).getPrivateArea(destinationPrivateArea, 0);
|
||||
}
|
||||
Area newArea;
|
||||
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(destinationZoneId);
|
||||
else
|
||||
{
|
||||
if (destinationPrivateArea == null)
|
||||
newArea = GetZone(player.zoneId);
|
||||
else
|
||||
newArea = GetZone(player.zoneId).getPrivateArea(destinationPrivateArea, 0);
|
||||
}
|
||||
newArea = GetZone(destinationZoneId).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