/// <summary>
        /// 检测在线
        /// </summary>
        private void OnCheckOnline(PacketBase packet)
        {
            ss2ws.ClientOnline msg = packet as ss2ws.ClientOnline;
            Unit unit = UnitManager.Instance.GetUnitByIdx(msg.char_idx);

            if (unit != null)
            {
                unit.RecvCheckOnline(msg.is_online);
            }
        }
示例#2
0
        /// <summary>
        /// 检测在线
        /// </summary>
        private void OnCheckOnline(PacketBase packet)
        {
            ws2ss.ClientOnline msg = packet as ws2ss.ClientOnline;

            bool is_online = UnitManager.Instance.HasUnit(msg.char_idx);

            ss2ws.ClientOnline rep_msg = PacketPools.Get(ss2ws.msg.CLIENT_ONLINE) as ss2ws.ClientOnline;
            rep_msg.char_idx  = msg.char_idx;
            rep_msg.is_online = is_online;
            ServerNetManager.Instance.Send2WS(rep_msg);
        }