public static void Save(string[] args, WorldClass session) { ObjectMgr.SavePositionToDB(session.Character); ChatMessageValues chatMessage = new ChatMessageValues(0, "Your character is successfully saved to the database!"); ChatHandler.SendMessage(ref session, chatMessage); }
public static void Save(string[] args) { var session = WorldMgr.GetSession(WorldMgr.Session.Character.Guid); ObjectMgr.SavePositionToDB(session.Character); ChatHandler.SendMessageByType(ref session, 0, 0, "Your character is successfully saved to the database!"); }
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); }