public void RemoveRelationClient(long target_char_idx) { if (!m_relations.ContainsKey(target_char_idx)) { return; } //发送到gl ss2gl.RelationRemove msg = PacketPools.Get(ss2gl.msg.RELATION_REMOVE) as ss2gl.RelationRemove; msg.char_idx = m_char_idx; msg.target_char_idx = target_char_idx; ServerNetManager.Instance.Send2GL(msg); }
/// <summary> /// 移除关系 /// </summary> private void OnRelationRemove(PacketBase packet) { ss2gl.RelationRemove msg = packet as ss2gl.RelationRemove; MemberRelation relation = RelationManager.Instance.GetMember(msg.char_idx); if (relation == null) { return; } relation.RemoveRelationCommand(msg.target_char_idx); }