mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
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:
parent
e30831fdc5
commit
ebd8ab0580
@ -50,6 +50,8 @@ namespace FFXIVClassic_Map_Server
|
||||
if (session.GetActor().destinationZone != 0)
|
||||
Server.GetWorldManager().DoZoneIn(session.GetActor(), false, session.GetActor().destinationSpawnType);
|
||||
|
||||
Program.Log.Info("{0} has been added to the session list.", session.GetActor().customDisplayName);
|
||||
|
||||
client.FlushQueuedSendPackets();
|
||||
break;
|
||||
//World Server - Session End
|
||||
@ -61,6 +63,9 @@ namespace FFXIVClassic_Map_Server
|
||||
else
|
||||
session.GetActor().CleanupAndSave(endSessionPacket.destinationZoneId, endSessionPacket.destinationSpawnType, endSessionPacket.destinationX, endSessionPacket.destinationY, endSessionPacket.destinationZ, endSessionPacket.destinationRot);
|
||||
|
||||
Server.GetServer().RemoveSession(session.id);
|
||||
Program.Log.Info("{0} has been removed from the session list.", session.GetActor().customDisplayName);
|
||||
|
||||
client.QueuePacket(SessionEndConfirmPacket.BuildPacket(session, endSessionPacket.destinationZoneId), true, false);
|
||||
client.FlushQueuedSendPackets();
|
||||
break;
|
||||
|
@ -468,12 +468,14 @@ namespace FFXIVClassic_Map_Server
|
||||
if (!isLogin)
|
||||
{
|
||||
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x2), true, false);
|
||||
player.SendZoneInPackets(this, spawnType);
|
||||
}
|
||||
|
||||
player.SendZoneInPackets(this, spawnType);
|
||||
|
||||
player.playerSession.LockUpdates(false);
|
||||
|
||||
LuaEngine.OnZoneIn(player);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
@ -661,10 +661,6 @@ 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);
|
||||
}
|
||||
|
||||
public void CleanupAndSave(uint destinationZone, ushort spawnType, float destinationX, float destinationY, float destinationZ, float destinationRot)
|
||||
@ -685,10 +681,6 @@ 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);
|
||||
}
|
||||
|
||||
public Area GetZone()
|
||||
|
@ -20,7 +20,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
||||
public uint languageCode = 1;
|
||||
private uint lastPingPacket = Utils.UnixTimeStampUTC();
|
||||
|
||||
public bool isUpdatesLocked = false;
|
||||
public bool isUpdatesLocked = true;
|
||||
|
||||
public string errorMessage = "";
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
||||
try
|
||||
{
|
||||
binWriter.Write((UInt32)destinationZoneId);
|
||||
binWriter.Write((UInt32)spawnType);
|
||||
binWriter.Write((UInt16)spawnType);
|
||||
binWriter.Write((Single)spawnX);
|
||||
binWriter.Write((Single)spawnY);
|
||||
binWriter.Write((Single)spawnZ);
|
||||
|
Loading…
Reference in New Issue
Block a user