Exemplo n.º 1
0
        /// <summary>
        ///     Gets an ActiveSkill from an equipped Power
        /// </summary>
        /// <param name="power"></param>
        /// <returns></returns>
        public static ActiveSkill GetSkillFromPower(SNOPower power)
        {
            if (!HeroClass.ActiveSkills.Any(s => s == power))
            {
                return(new ActiveSkill());
            }

            HotbarSlot slot      = HeroClass.GetSlotFromPower(power);
            int        runeIndex = HeroClass.GetRuneIndexFromSlot(slot);

            return(new ActiveSkill
            {
                Power = power,
                RuneIndex = runeIndex,
                Slot = slot
            });
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Creates an ActiveSkill from a HotbarSlot
        /// </summary>
        /// <param name="slot"></param>
        /// <returns></returns>
        public static ActiveSkill GetSkillFromSlot(HotbarSlot slot)
        {
            SNOPower power = HeroClass.GetPowerFromSlot(slot);

            if (power == SNOPower.None)
            {
                return(new ActiveSkill());
            }

            int runeIndex = HeroClass.GetRuneIndexFromSlot(slot);

            return(new ActiveSkill
            {
                Power = power,
                RuneIndex = runeIndex,
                Slot = slot
            });
        }