public int HandlePacket(ClientBase client, GamePacket packet)
        {
            uint gatewayID = packet.ReadUnsignedInt();
            uint clientID = packet.ReadUnsignedInt();

            ConnectOtherGatewayServer(client, gatewayID, clientID);

            return 0;
        }
예제 #2
0
        public int HandlePacket(ClientBase client, GamePacket packet)
        {
            uint gatewayID = packet.ReadUnsignedInt();

            uint clientID = packet.ReadUnsignedInt();

            GatewayInfo info = GameGlobal.GatewayMgr.FindTemplate(gatewayID);

            info.Fulled = true;

            ConnectOtherGatewayHandler.ConnectOtherGatewayServer(client, gatewayID, clientID);

            return 0;
        }
        public int HandlePacket(ClientBase client, GamePacket packet)
        {
            bool logined = packet.ReadBoolean();

            uint clientID = packet.ReadUnsignedInt();

            return 0;
        }
예제 #4
0
        public int HandlePacket(ClientBase client, GamePacket packet)
        {
            uint clientID = packet.ReadUnsignedInt();

            string account = packet.ReadUTF();

            //TODO: 从数据库验证帐号,成功时记录到CacheGlobal中的LoginPlayerMgr和CachePlayerMgr中.

            return 0;
        }
예제 #5
0
        public int HandlePacket(ClientBase client, GamePacket packet)
        {
            uint gatewayID = packet.ReadUnsignedInt();

            GatewayInfo info = GameGlobal.GatewayMgr.FindTemplate(gatewayID);

            info.Fulled = false;

            return 0;
        }
예제 #6
0
        public int HandlePacket(ServerConnector connector, GamePacket packet)
        {
            uint clientID = packet.ReadUnsignedInt();

            ClientBase client = GatewayGlobal.PlayerClientMgr[clientID];

            if (client != null)
            {
                client.SendTcp(packet);
            }

            return 0;
        }
        public int HandlePacket(ServerConnector connector, GamePacket packet)
        {
            uint id = packet.ReadUnsignedInt();

            if (GatewayGlobal.ContainsBattleServer(id))
            {
                return 0;
            }

            string ip = packet.ReadUTF();

            int port = packet.ReadInt();

            new BattleServerConnector(id, ip, port);

            return 0;
        }
        public int HandlePacket(ServerConnector connector, GamePacket packet)
        {
            bool logined = packet.ReadBoolean();

            uint clientID = packet.ReadUnsignedInt();

            if (logined)
            {
                //TODO: 记录PlayerID与ClientID的对应关系
                //TODO: 转发结果到逻辑服务器
            }
            else
            {
                LoginFailedPacket pkg = new LoginFailedPacket();

                GatewayGlobal.PlayerClientMgr[clientID].SendTcp(pkg);
            }

            return 0;
        }