fixed import script, improved db import times, fixed logging and warp command (should be 5000% legit now)

- improved import times for gamedata tables (there's prolly other innodb tables too, i didnt check though)
- fixed issue where player wouldnt be readded to zone on warping if destination wasnt valid
- corrected typo in warp command lua description
- added logger for lua cause i forgot to last time
This commit is contained in:
Tahir Akhlaq 2016-07-27 17:23:52 +01:00
parent 7f65cfcbbf
commit 065fe05795
14 changed files with 60 additions and 12 deletions

View file

@ -360,12 +360,10 @@ namespace FFXIVClassic_Map_Server
//Moves actor to new zone, and sends packets to spawn at the given coords.
public void DoZoneChange(Player player, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
{
Area oldZone;
Area oldZone = player.zone;
//Remove player from currentZone if transfer else it's login
if (player.zone != null)
{
oldZone = player.zone;
oldZone.RemoveActorFromZone(player);
}
@ -376,9 +374,20 @@ namespace FFXIVClassic_Map_Server
newArea = GetZone(destinationZoneId);
else
newArea = GetZone(destinationZoneId).GetPrivateArea(destinationPrivateArea, 0);
//This server does not contain that zoneId
if (newArea == null)
{
if (oldZone != null)
{
oldZone.AddActorToZone(player);
}
var message = "WorldManager.DoZoneChange: unable to change areas, new area is not valid.";
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM, "[Debug]", message);
Program.Log.Debug(message);
return;
}
newArea.AddActorToZone(player);