diff options
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 5 | ||||
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 0d7f351389a..eb6ffc3012b 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3712,8 +3712,7 @@ void AuraEffect::HandleAuraModIncreaseEnergy(AuraApplication const* aurApp, uint return; Unit* target = aurApp->GetTarget(); - Powers powerType = Powers(GetMiscValue()); - UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType); + UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + GetMiscValue()); target->HandleStatFlatModifier(unitMod, TOTAL_VALUE, float(GetAmount()), apply); } @@ -3725,7 +3724,7 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurAp Unit* target = aurApp->GetTarget(); Powers powerType = Powers(GetMiscValue()); - UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType); + UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + GetMiscValue()); // Save old powers for further calculation int32 oldPower = int32(target->GetPower(powerType)); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index db9b38b5288..29bb4cec9f1 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -653,7 +653,7 @@ void Spell::EffectSchoolDMG() float average = (minTotal + maxTotal) / 2; // Add main hand dps * effect[2] amount int32 count = unitCaster->CalculateSpellDamage(m_spellInfo->GetEffect(EFFECT_2)); - damage += count * int32(average * IN_MILLISECONDS) / unitCaster->GetAttackTime(BASE_ATTACK); + damage += count * int32(average * float(IN_MILLISECONDS)) / unitCaster->GetAttackTime(BASE_ATTACK); break; } // Shield of Righteousness diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 56d8c741cdd..38347a1bae5 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -3214,7 +3214,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school } SpellSchools school = GetFirstSchoolInMask(schoolMask); // Flat mod from caster auras by spell school - powerCost += unitCaster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + school); + powerCost += unitCaster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + AsUnderlyingType(school)); // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost) if (HasAttribute(SPELL_ATTR4_SPELL_VS_EXTEND_COST)) @@ -3244,7 +3244,7 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school } // PCT mod from user auras by school - powerCost = int32(powerCost * (1.0f + unitCaster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER + school))); + powerCost = int32(powerCost * (1.0f + unitCaster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER + AsUnderlyingType(school)))); if (powerCost < 0) powerCost = 0; return powerCost; |