Пример #1
0
        /// <summary>
        /// 列表
        /// </summary>
        private void OnRelationList(PacketBase packet)
        {
            gl2ss.RelationList msg = packet as gl2ss.RelationList;

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

            if (relation != null)
            {
                relation.RelationListGL(msg.relation_info);
            }
        }
Пример #2
0
        /// <summary>
        /// 下发关系列表
        /// </summary>
        private void SyncRelation2SS(long target_char_idx)
        {
            Unit player = UnitManager.Instance.GetUnitByIdx(m_char_idx);

            if (player == null)
            {
                return;
            }

            RelationInfo relation_info = null;

            if (m_relations.TryGetValue(target_char_idx, out relation_info))
            {
                gl2ss.RelationList msg = PacketPools.Get(gl2ss.msg.RELATION_LIST) as gl2ss.RelationList;
                msg.char_idx = m_char_idx;
                msg.relation_info.Copy(relation_info);
                ForServerNetManager.Instance.Send(player.ss_srv_uid, msg);
            }
        }