mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10701] Correct check percent spell costs in AI::CanCast
Also use uint32 for spell cost fields/results Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
a72930acc9
commit
b435aa350f
5 changed files with 41 additions and 39 deletions
|
|
@ -1390,7 +1390,7 @@ bool CreatureEventAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Trigge
|
|||
return false;
|
||||
|
||||
//Check for power
|
||||
if (!Triggered && m_creature->GetPower((Powers)Spell->powerType) < Spell->manaCost)
|
||||
if (!Triggered && m_creature->GetPower((Powers)Spell->powerType) < Spell::CalculatePowerCost(Spell, m_creature))
|
||||
return false;
|
||||
|
||||
SpellRangeEntry const *TempRange = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue