*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:
TheManii 2016-04-09 12:27:04 -07:00
parent 2eb40a0d7c
commit 06606c5f01
2 changed files with 119 additions and 139 deletions

View file

@ -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);