Fixed random crashes when zoning. Was due to improper write of the SessionEndPacket. For extra safety db is locked until zone in happens. Added some logs. Seems to be all working!

This commit is contained in:
Filip Maj 2016-12-03 13:23:32 -05:00
parent e30831fdc5
commit ebd8ab0580
5 changed files with 17 additions and 18 deletions

View file

@ -476,7 +476,7 @@ namespace FFXIVClassic_Map_Server.Actors
QueuePacket(SetMapPacket.BuildPacket(actorId, zone.regionId, zone.actorId));
QueuePacket(GetSpawnPackets(actorId, spawnType));
GetSpawnPackets(actorId, spawnType).DebugPrintPacket();
//GetSpawnPackets(actorId, spawnType).DebugPrintPacket();
#region grouptest
//Retainers
@ -660,11 +660,7 @@ namespace FFXIVClassic_Map_Server.Actors
//Save Player
Database.SavePlayerPlayTime(this);
Database.SavePlayerPosition(this);
Server.GetServer().RemoveSession(playerSession.id);
Program.Log.Info("{0} has been removed from the session list.", this.customDisplayName);
Database.SavePlayerPosition(this);
}
public void CleanupAndSave(uint destinationZone, ushort spawnType, float destinationX, float destinationY, float destinationZ, float destinationRot)
@ -684,11 +680,7 @@ namespace FFXIVClassic_Map_Server.Actors
//Save Player
Database.SavePlayerPlayTime(this);
Database.SavePlayerPosition(this);
Server.GetServer().RemoveSession(playerSession.id);
Program.Log.Info("{0} has been removed from the session list.", this.customDisplayName);
Database.SavePlayerPosition(this);
}
public Area GetZone()