aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAI.cpp
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-07-23 19:31:03 +0200
committerKudlaty <none@none>2009-07-23 19:31:03 +0200
commit174458293a87b36997bcf7c4162cc9897b29f9ae (patch)
tree042873aed65fab781be25df31a38010bafdc1a47 /src/game/CreatureEventAI.cpp
parent81e6f06680ce85989df27c2c34cdcd74932ab9ad (diff)
parent4a17224a652d2f87fdebdf7e572b7ce4da327336 (diff)
*merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r--src/game/CreatureEventAI.cpp3
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;