Fix periodic healing auras being scaled twice

This commit is contained in:
郑佩茹
2023-11-03 09:51:14 -06:00
parent f5bfc52729
commit 3dbc2e0a56

View File

@@ -663,11 +663,20 @@ public:
} }
} }
void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* attacker, uint32& damage, SpellInfo const* /*spellInfo*/) override void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* attacker, uint32& damage, SpellInfo const* spellInfo) override
{ {
if (!sIndividualProgression->enabled || !attacker) if (!sIndividualProgression->enabled || !attacker)
return; return;
// Do not apply reductions to healing auras - these are already modified in the ModifyHeal hook
for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
if (spellInfo->Effects[j].Effect == SPELL_EFFECT_APPLY_AURA && spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_HEAL)
{
return;
}
}
bool isPet = attacker->GetOwner() && attacker->GetOwner()->GetTypeId() == TYPEID_PLAYER; bool isPet = attacker->GetOwner() && attacker->GetOwner()->GetTypeId() == TYPEID_PLAYER;
if (!isPet && attacker->GetTypeId() != TYPEID_PLAYER) if (!isPet && attacker->GetTypeId() != TYPEID_PLAYER)
{ {