/// <summary> /// 添加关系 /// </summary> private void OnRelationAdd(PacketBase packet) { ss2c.RelationAdd msg = packet as ss2c.RelationAdd; RelationAddInfo info = new RelationAddInfo(); info.event_idx = msg.event_idx; info.player_id = msg.player_id; info.message = msg.message; info.flag = msg.flag; RelationDataManager.Instance.AddNewApplys(info); }
public void AddNewApplys(RelationAddInfo info) { m_apply_relations.ForEach((item) => { if (item.player_id.char_idx == info.player_id.char_idx) { return; } }); m_apply_relations.Add(info); }