public int HandlePacket(ClientBase client, GamePacket packet) { bool logined = packet.ReadBoolean(); uint clientID = packet.ReadUnsignedInt(); 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; }