aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShocker <shocker@freakz.ro>2013-02-06 22:42:37 +0200
committerShauren <shauren.trinity@gmail.com>2025-07-25 19:47:53 +0200
commitd7c31e0542d69498a6d5566ed79a0768c735d2b4 (patch)
tree534613bede03563b8ef6f97468ea7083e14f775f /src
parent0e7b46eac4f3424940f4a90c9149e766ded11d55 (diff)
Fix build
(cherry picked from commit 443ea1282706ffe03730fbb51fe9d0738fbf68e2)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 6e317052f94..e8e432ae1ff 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -3279,10 +3279,10 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
return 0;
}
}
- SpellSchools school = GetFirstSchoolInMask(schoolMask);
- // Flat mod from caster auras by spell school
- AuraEffectList const& auras = unitCaster->GetAuraEffectsByType(SPELL_AURA_MOD_POWER_COST_SCHOOL);
- for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
+
+ // Flat mod from caster auras by spell school and power type
+ Unit::AuraEffectList const& auras = unitCaster->GetAuraEffectsByType(SPELL_AURA_MOD_POWER_COST_SCHOOL);
+ for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
{
if (!((*i)->GetMiscValue() & schoolMask))
continue;
@@ -3317,9 +3317,9 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school
}
}
- // PCT mod from user auras by school
- AuraEffectList const& aurasPct = unitCaster->GetAuraEffectsByType(SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT);
- for (AuraEffectList::const_iterator i = aurasPct.begin(); i != aurasPct.end(); ++i)
+ // PCT mod from user auras by spell school and power type
+ Unit::AuraEffectList const& aurasPct = unitCaster->GetAuraEffectsByType(SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT);
+ for (Unit::AuraEffectList::const_iterator i = aurasPct.begin(); i != aurasPct.end(); ++i)
{
if (!((*i)->GetMiscValue() & schoolMask))
continue;