/// <summary> /// 踢号 /// </summary> private void OnReqKickAccount(PacketBase packet) { ss2gs.ReqKickoutAccount msg = packet as ss2gs.ReqKickoutAccount; ClientSession session = ClientSessionManager.Instance.GetSessionByAccount(msg.account_idx); if (session != null) { ClientSessionManager.Instance.KickoutSession(session.conn_idx); } }
/// <summary> /// ss统一踢号入口 /// </summary> public void KickAccount(long account_idx) { Player player = UnitManager.Instance.GetPlayerByAccount(account_idx); if (player == null) { return; } ss2gs.ReqKickoutAccount msg = PacketPools.Get(ss2gs.msg.REQ_KICK_ACCOUNT) as ss2gs.ReqKickoutAccount; msg.account_idx = account_idx; ServerNetManager.Instance.Send(player.client_uid.srv_uid, msg); }