public static void HandleLogoutComplete(ref PacketReader packet, ref WorldClass session) { WorldMgr.DeleteSession(session.Character.Guid); PacketWriter logoutComplete = new PacketWriter(LegacyMessage.LogoutComplete); session.Send(logoutComplete); }
public static void HandleLogoutComplete(ref PacketReader packet, ref WorldClass session) { var pChar = session.Character; ObjectMgr.SavePositionToDB(pChar); WorldMgr.DeleteSession(pChar.Guid); PacketWriter logoutComplete = new PacketWriter(LegacyMessage.LogoutComplete); session.Send(logoutComplete); }
public static void HandleLogoutRequest(ref PacketReader packet, ref WorldClass session) { var pChar = session.Character; ObjectMgr.SavePositionToDB(pChar); PacketWriter logoutComplete = new PacketWriter(ServerMessage.LogoutComplete); session.Send(ref logoutComplete); // Destroy object after logout WorldMgr.SendToInRangeCharacter(pChar, ObjectHandler.HandleDestroyObject(ref session, pChar.Guid)); WorldMgr.DeleteSession(pChar.Guid); }
public static void HandleDisconnectReason(ref PacketReader packet, ref WorldClass session) { var pChar = session.Character; uint disconnectReason = packet.Read <uint>(); if (pChar != null) { WorldMgr.DeleteSession(pChar.Guid); } DB.Realms.Execute("UPDATE accounts SET online = 0 WHERE id = ?", session.Account.Id); Log.Message(LogType.DEBUG, "Account with Id {0} disconnected. Reason: {1}", session.Account.Id, disconnectReason); }