diff options
author | QAston <none@none> | 2009-07-23 18:32:32 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-23 18:32:32 +0200 |
commit | 4a17224a652d2f87fdebdf7e572b7ce4da327336 (patch) | |
tree | e90262456ef36e3a062c236f39c9c03b6e9f16f2 /src/game/CreatureEventAI.cpp | |
parent | 21ffe5f70adfaee9fb1567fb42d0e276e79b8ec7 (diff) |
*Creature eventAI cancast power check - by smellbee.
--HG--
branch : trunk
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; |