Beispiel #1
0
        /// <summary>
        /// 移除关系
        /// </summary>
        private void OnRelationRemove(PacketBase packet)
        {
            c2ss.RelationRemove msg = packet as c2ss.RelationRemove;
            Player player           = UnitManager.Instance.GetPlayerByClientUID(msg.client_uid);

            if (player == null)
            {
                Log.Debug("OnRelationRemove 未找到unit:" + msg.client_uid.srv_uid + ", " + msg.client_uid.conn_idx);
                return;
            }

            MemberRelation relation = RelationManager.Instance.GetMember(player.char_idx);

            if (relation != null)
            {
                relation.RemoveRelationClient(msg.target_char_idx);
            }
        }
 /// <summary>
 /// 移除关系
 /// </summary>
 public static void SendRelationRemove(long char_idx)
 {
     c2ss.RelationRemove msg = PacketPools.Get(c2ss.msg.RELATION_REMOVE) as c2ss.RelationRemove;
     msg.target_char_idx = char_idx;
     ClientNetManager.Instance.Send(msg);
 }