mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +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:
@@ -576,7 +576,7 @@ class spell_item_skull_of_impeding_doom : public AuraScript
|
||||
|
||||
void CalculateManaLeechAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || GetCaster()->getPowerType() != POWER_MANA)
|
||||
if (!GetCaster() || !GetCaster()->HasActivePowerType(POWER_MANA))
|
||||
return;
|
||||
|
||||
amount = GetCaster()->GetMaxPower(POWER_MANA) * 0.12f; // 5 ticks which reduce health by 60%
|
||||
|
||||
Reference in New Issue
Block a user