diff options
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r-- | src/game/CreatureEventAI.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index b9b3d5bb488..6e8ac6a4909 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -30,6 +30,7 @@ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "InstanceData.h" +#include "SpellMgr.h" bool CreatureEventAIHolder::UpdateRepeatTimer( Creature* creature, uint32 repeatMin, uint32 repeatMax ) { @@ -1297,7 +1298,7 @@ bool CreatureEventAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Trigge return false; //Check for power - if (!Triggered && me->GetPower((Powers)Spell->powerType) < Spell->manaCost) + if (!Triggered && me->GetPower((Powers)Spell->powerType) < CalculatePowerCost(Spell, me, GetSpellSchoolMask(Spell))) return false; SpellRangeEntry const *TempRange = NULL; |