*Creature eventAI cancast power check - by smellbee.
--HG-- branch : trunk
This commit is contained in:
1 parent
21ffe5f70a
commit
4a17224a65
5 files changed
+70
-72
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user