Пример #1
0
            internal void Update(Players.Player player,
                                 Heroes.Hero hero,
                                 Abilities.HeroAbilities abilities,
                                 Items.HeroItems items)
            {
                Player    = player;
                Hero      = hero;
                Abilities = abilities;

                Items = items;

                if (items == null || items.Slots.Any(s => s == null))
                {
                    return;
                }

                for (var index = 0; index < Items.Slots.Count; index++)
                {
                    Items.Slots[index].Slot = index;
                }
            }
Пример #2
0
 public static Items.Item SearchItemByName(this Items.HeroItems items, string name)
 {
     return(items?.Slots?.FirstOrDefault(i => i != null && i.Name == name));
 }