Пример #1
0
        public void AppendTags(Sprite target)
        {
            if (TaggedAislings == null)
            {
                TaggedAislings = new HashSet <int>();
            }

            if (target is Aisling)
            {
                var aisling = target as Aisling;

                if (!TaggedAislings.Contains(aisling.Serial))
                {
                    TaggedAislings.Add(aisling.Serial);
                }

                if (aisling.GroupParty.LengthExcludingSelf > 0)
                {
                    foreach (var member in aisling.GroupParty.MembersExcludingSelf)
                    {
                        if (!TaggedAislings.Contains(member.Serial))
                        {
                            TaggedAislings.Add(member.Serial);
                        }
                    }
                }
            }
        }
Пример #2
0
        public void AppendTags(Sprite target)
        {
            if (TaggedAislings == null)
            {
                TaggedAislings = new HashSet <int>();
            }

            if (!(target is Aisling aisling))
            {
                return;
            }

            if (!TaggedAislings.Contains(aisling.Serial))
            {
                TaggedAislings.Add(aisling.Serial);
            }

            if (aisling.GroupParty != null && aisling.GroupParty.PartyMembers.Count - 1 <= 0)
            {
                return;
            }

            if (aisling.GroupParty != null)
            {
                foreach (var member in aisling.GroupParty.PartyMembers.Where(member =>
                                                                             !TaggedAislings.Contains(member.Serial)))
                {
                    TaggedAislings.Add(member.Serial);
                }
            }
        }