public void OnLogon(int sessionID, int identity) { BattleAgentSession client = base.GetClient(sessionID) as BattleAgentSession; FourPlayerAgent agent = this.GetAgent(identity); if ((agent != null) && !agent.Closed) { client.AgentID = identity; agent.PlayerLogon(sessionID); } }
private void BattleAgentServer_OnClientDisconnected(ClientSession client) { BattleAgentSession session = client as BattleAgentSession; if (session.AgentID != -1) { BattleAgent agent = this.GetAgent(session.AgentID); if ((agent != null) && !agent.BattleEnd) { agent.PlayerExit(client.SessionID); } } }