/// <summary> /// 移除关系 /// </summary> public void RemoveRelationGL(long target_char_idx) { Player player = UnitManager.Instance.GetUnitByIdx(m_char_idx) as Player; if (player == null) { return; } if (!m_relations.ContainsKey(target_char_idx)) { return; } this.RemoveRelation(target_char_idx); ss2c.RelationRemove rep_msg = PacketPools.Get(ss2c.msg.RELATION_REMOVE) as ss2c.RelationRemove; rep_msg.target_char_idx = target_char_idx; ServerNetManager.Instance.SendProxy(player.client_uid, rep_msg); }
/// <summary> /// 移除关系 /// </summary> private void OnRelationRemove(PacketBase packet) { ss2c.RelationRemove msg = packet as ss2c.RelationRemove; RelationDataManager.Instance.RemoveRelation(msg.target_char_idx); }