*Creature eventAI cancast power check - by smellbee.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2009-07-23 18:32:32 +02:00
1 parent 21ffe5f70a
commit 4a17224a65
5 files changed
+70 -72

No files matched your search

+2 -1
View File
@@ -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;