Skip to content

Commit 646fa3c

Browse files
committed
Merge pull request #12301 from Unholychick/patch-3
Core/Spells fix 0442ff5
2 parents d60f959 + 77d70fb commit 646fa3c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/server/game/Spells/Auras/SpellAuraEffects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6300,7 +6300,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
63006300
{
63016301
Powers powerType = Powers(GetMiscValue());
63026302

6303-
if (target->getPowerType() != powerType && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
6303+
if (target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() != powerType && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
63046304
return;
63056305

63066306
if (!target->IsAlive() || !target->GetMaxPower(powerType))

src/server/game/Spells/SpellEffects.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
17511751

17521752
Powers power = Powers(m_spellInfo->Effects[effIndex].MiscValue);
17531753

1754-
if (unitTarget->getPowerType() != power && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
1754+
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
17551755
return;
17561756

17571757
if (unitTarget->GetMaxPower(power) == 0)
@@ -1866,7 +1866,7 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
18661866

18671867
Powers power = Powers(m_spellInfo->Effects[effIndex].MiscValue);
18681868

1869-
if (unitTarget->getPowerType() != power && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
1869+
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
18701870
return;
18711871

18721872
uint32 maxPower = unitTarget->GetMaxPower(power);

0 commit comments

Comments
 (0)