Example #1
0
        private static void SendConnectResponse(Session session, List <Character> characters)
        {
            characters = characters.OrderByDescending(o => o.LastLoginTimestamp).ToList(); // The client highlights the first character in the list. We sort so the first character sent is the one we last logged in
            session.UpdateCharacters(characters);

            GameMessageCharacterList    characterListMessage = new GameMessageCharacterList(session.Characters, session);
            GameMessageServerName       serverNameMessage    = new GameMessageServerName(ConfigManager.Config.Server.WorldName, PlayerManager.GetOnlineCount(), (int)ConfigManager.Config.Server.Network.MaximumAllowedSessions);
            GameMessageDDDInterrogation dddInterrogation     = new GameMessageDDDInterrogation();

            session.Network.EnqueueSend(characterListMessage, serverNameMessage);
            session.Network.EnqueueSend(dddInterrogation);
        }
Example #2
0
        public static async void HandleConnectResponse(ClientPacket packet, Session session)
        {
            PacketInboundConnectResponse connectResponse = new PacketInboundConnectResponse(packet);

            var result = await DatabaseManager.Character.GetByAccount(session.Id);

            session.UpdateCachedCharacters(result);

            GameMessageCharacterList    characterListMessage = new GameMessageCharacterList(result, session.Account);
            GameMessageServerName       serverNameMessage    = new GameMessageServerName(ConfigManager.Config.Server.WorldName);
            GameMessageDDDInterrogation dddInterrogation     = new GameMessageDDDInterrogation();

            session.Network.EnqueueSend(characterListMessage, serverNameMessage, dddInterrogation);

            session.State = SessionState.AuthConnected;
        }
Example #3
0
        public static void HandleConnectResponse(ClientPacket packet, Session session)
        {
            PacketInboundConnectResponse connectResponse = new PacketInboundConnectResponse(packet);

            DatabaseManager.Shard.GetCharacters(session.Id, false, result =>
            {
                result = result.OrderByDescending(o => o.LastLoginTimestamp).ToList(); // The client highlights the first character in the list. We sort so the first character sent is the one we last logged in
                session.UpdateCharacters(result);

                GameMessageCharacterList characterListMessage = new GameMessageCharacterList(session.Characters, session);
                GameMessageServerName serverNameMessage       = new GameMessageServerName(ConfigManager.Config.Server.WorldName, WorldManager.GetAll().Count, (int)ConfigManager.Config.Server.Network.MaximumAllowedSessions);
                GameMessageDDDInterrogation dddInterrogation  = new GameMessageDDDInterrogation();

                session.Network.EnqueueSend(characterListMessage, serverNameMessage);
                session.Network.EnqueueSend(dddInterrogation);

                session.State = SessionState.AuthConnected;
            });
        }
Example #4
0
        public static void HandleConnectResponse(ClientPacket packet, Session session)
        {
            PacketInboundConnectResponse connectResponse = new PacketInboundConnectResponse(packet);

            DatabaseManager.Shard.GetCharacters(session.Id, ((List <CachedCharacter> result) =>
            {
                result = result.OrderByDescending(o => o.LoginTimestamp).ToList();
                session.UpdateCachedCharacters(result);

                GameMessageCharacterList characterListMessage = new GameMessageCharacterList(result, session.Account);
                GameMessageServerName serverNameMessage = new GameMessageServerName(ConfigManager.Config.Server.WorldName, WorldManager.GetAll().Count, (int)ConfigManager.Config.Server.Network.MaximumAllowedSessions);
                GameMessageDDDInterrogation dddInterrogation = new GameMessageDDDInterrogation();

                session.Network.EnqueueSend(characterListMessage, serverNameMessage);
                session.Network.EnqueueSend(dddInterrogation);

                session.State = SessionState.AuthConnected;
            }));
        }
Example #5
0
        public static async void HandleConnectResponse(ClientPacket packet, Session session)
        {
            PacketInboundConnectResponse connectResponse = new PacketInboundConnectResponse(packet);

            var result = await DatabaseManager.Character.GetByAccount(session.Id);

            session.UpdateCachedCharacters(result);

            GameMessageCharacterList characterListMessage = new GameMessageCharacterList(result, session.Account);
            GameMessageServerName    serverNameMessage    = new GameMessageServerName(ConfigManager.Config.Server.WorldName);
            // looks like account settings/info, expansion information ect? (this is needed for world entry)
            GameMessageDDDInterrogation unknown75e5Message = new GameMessageDDDInterrogation();
            GameMessageDDDEndDDD        patchStatusMessage = new GameMessageDDDEndDDD();

            session.Network.EnqueueSend(characterListMessage);
            session.Network.EnqueueSend(serverNameMessage);
            session.Network.EnqueueSend(unknown75e5Message);
            session.Network.EnqueueSend(patchStatusMessage);

            session.State = SessionState.AuthConnected;
        }