aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-03-07 03:32:32 -0300
committerariel- <ariel-@users.noreply.github.com>2018-03-07 03:34:45 -0300
commit6e0b9a7916d158981cebe6107710141458d656cc (patch)
tree2a44ad4e6049a7ed60b04ffbb8dd7f86d30d44a3 /src/server/game/Spells/Spell.cpp
parent68dde9f8c5467c5983078b190e58105f99dad75c (diff)
Core/Creatures: port power type updates from master branch
Core/Misc: Added helper function Unit::SetFullPower Cherry-picked from 8199eef81cad464bb43f3613ed884a2c8fc3973d Core/Creatures: Updated power type handling (#20981) Cherry-picked from 16a7a414abcc93c4514905b871f53c1049261c12
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index b74453ba138..918887fb131 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5326,7 +5326,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
// Can be area effect, Check only for players and not check if target - caster (spell can have multiply drain/burn effects)
if (m_caster->GetTypeId() == TYPEID_PLAYER)
if (Unit* target = m_targets.GetUnitTarget())
- if (target != m_caster && target->getPowerType() != Powers(m_spellInfo->Effects[i].MiscValue))
+ if (target != m_caster && target->GetPowerType() != Powers(m_spellInfo->Effects[i].MiscValue))
return SPELL_FAILED_BAD_TARGETS;
break;
}
@@ -5753,7 +5753,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
if (m_caster->GetTypeId() != TYPEID_PLAYER || m_CastItem)
break;
- if (m_targets.GetUnitTarget()->getPowerType() != POWER_MANA)
+ if (m_targets.GetUnitTarget()->GetPowerType() != POWER_MANA)
return SPELL_FAILED_BAD_TARGETS;
break;