From 331b9ccd6a3be12e92e7c2aab7b793739b405d2f Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 15 Feb 2021 00:19:35 +0100 Subject: Core/Entities: Regenerated updatefields code with latest generator fixes --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 +++++- src/server/game/Spells/SpellInfo.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/server/game/Spells') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 377a9135ba0..c7c9ceebb43 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -4424,11 +4424,15 @@ void AuraEffect::HandleModPowerCost(AuraApplication const* aurApp, uint8 mode, b if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK)) return; + // handled in SpellInfo::CalcPowerCost, this is only for client UI + if (!(GetMiscValueB() & (1 << POWER_MANA))) + return; + Unit* target = aurApp->GetTarget(); for (int i = 0; i < MAX_SPELL_SCHOOL; ++i) if (GetMiscValue() & (1 << i)) - target->ApplyModPowerCostModifier(SpellSchools(i), GetAmount(), apply); + target->ApplyModManaCostModifier(SpellSchools(i), GetAmount(), apply); } void AuraEffect::HandleArenaPreparation(AuraApplication const* aurApp, uint8 mode, bool apply) const diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index c58ae80fa1a..ee06f6e7d3f 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -3835,7 +3835,7 @@ std::vector SpellInfo::CalcPowerCost(Unit const* caster, SpellSc } if (power->PowerType == POWER_MANA) - flatMod *= 1.0f + caster->m_unitData->ManaCostModifierModifier; + flatMod *= 1.0f + caster->m_unitData->ManaCostMultiplier; // this is wrong powerCost += flatMod; } -- cgit v1.2.3