public static LocalizedString Localize(SpellPowerType powerType, bool isPercentage)
        {
            Assert.IsTrue(StringsBySpellPowerType.ContainsKey(powerType), $"Missing localization for PowerType: {powerType}");

            if (StringsBySpellPowerType.TryGetValue(powerType, out PowerTypeCostLink powerTypeEntry))
            {
                return(isPercentage ? powerTypeEntry.LocalizedPercentageString : powerTypeEntry.LocalizedRawString);
            }

            return(MissingString);
        }
 public bool HasPower(SpellPowerType spellPowerType) => spellPowerTypeInfoHashSet.Contains(spellPowerType);
Esempio n. 3
0
 public static UnitModifierType AsModifier(this SpellPowerType spellPowerType) => (UnitModifierType)(spellPowerType + (int)UnitModifierType.StartPowers);
Esempio n. 4
0
 public SpellResourceCost(SpellPowerType spellPower, int amount)
 {
     SpellPower = spellPower;
     Amount     = amount;
 }