Example #1
0
        /// <summary>
        /// 踢号
        /// </summary>
        private void OnReqKickAccount(PacketBase packet)
        {
            ws2gs.ReqKickoutAccount msg     = packet as ws2gs.ReqKickoutAccount;
            ClientSession           session = ClientSessionManager.Instance.GetSessionByAccount(msg.account_idx);

            if (session != null)
            {
                ClientSessionManager.Instance.KickoutSession(session.conn_idx);
            }
        }
Example #2
0
        /// <summary>
        /// ws统一踢号入口
        /// </summary>
        public void KickAccount(long account_idx)
        {
            Unit unit = UnitManager.Instance.GetUnitByAccount(account_idx);

            if (unit == null)
            {
                return;
            }

            ws2gs.ReqKickoutAccount msg = PacketPools.Get(ws2gs.msg.REQ_KICK_ACCOUNT) as ws2gs.ReqKickoutAccount;
            msg.account_idx = account_idx;
            ServerNetManager.Instance.Send(unit.client_uid.srv_uid, msg);
        }