/// <summary> /// 被踢出 /// </summary> public void Kickout() { if (m_session_status == eSessionStatus.LOGOUTING) { return; } m_session_status = eSessionStatus.LOGOUTING; //已经是正式连接的客户端,需要做后续清理工作 if (m_account_idx > 0) {//说明已经登录到ss,需要清理 gs2ss.KickoutAccount msg = PacketPools.Get(gs2ss.msg.KICK_ACCOUNT) as gs2ss.KickoutAccount; msg.account_idx = m_account_idx; this.Send2SS(msg); } }
/// <summary> /// 踢号 /// </summary> private void OnKickAccount(PacketBase packet) { gs2ss.KickoutAccount msg = packet as gs2ss.KickoutAccount; HandleLogoutAccount(msg.client_uid); UnitManager.Instance.RemoveSession(msg.client_uid); }
/// <summary> /// 踢号 /// </summary> private void OnKickAccount(PacketBase packet) { gs2ss.KickoutAccount msg = packet as gs2ss.KickoutAccount; HandleLogoutAccount(msg.account_idx); }