aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAI.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-23 18:32:32 +0200
committerQAston <none@none>2009-07-23 18:32:32 +0200
commit4a17224a652d2f87fdebdf7e572b7ce4da327336 (patch)
treee90262456ef36e3a062c236f39c9c03b6e9f16f2 /src/game/CreatureEventAI.cpp
parent21ffe5f70adfaee9fb1567fb42d0e276e79b8ec7 (diff)
*Creature eventAI cancast power check - by smellbee.
--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;