mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
feat(Core/Unit): New helper HasActivePowerType and script hook OnPlayerHasActivePowerType (#18293)
* Create HasActivePower for script intercept * Replace relevant player-related getPowerType() comparators with HasActivePowerType * Change OnPlayerHasActivePowerType to regular bool instead of optional --------- Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
This commit is contained in:
@@ -483,7 +483,7 @@ class spell_pal_blessing_of_sanctuary : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
return GetTarget()->getPowerType() == POWER_MANA;
|
||||
return GetTarget()->HasActivePowerType(POWER_MANA);
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
@@ -969,7 +969,7 @@ class spell_pal_lay_on_hands : public SpellScript
|
||||
|
||||
// Xinef: Glyph of Divinity
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
if (target->getPowerType() == POWER_MANA)
|
||||
if (target->HasActivePowerType(POWER_MANA))
|
||||
_manaAmount = target->GetPower(POWER_MANA);
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
Reference in New Issue
Block a user