Example #1
0
        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);
        }
Example #2
0
        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!");
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }