fix(Scripts/Spells): warlock demonic pact (#19386)

* add Demonic Pact Aura script

2ff855054f (diff-ea612aafadff90005e88b243eb000369be9e5cb6f8dc85a008d31e42b156e0ec)

Co-authored-by: ariel- <ariel-@users.noreply.github.com>

* spell_warlock aura:spell_warl_demonic_pact_aura

* fixup! spell_warlock aura:spell_warl_demonic_pact_aura

* remove not needed spell correction, flag is already set

* subtract current proc bonus before calculating new bonus

* also increase healing done

* remove Demonic Pact handling in Unit

* refactor indent, remove bonus from spell group effects e.g. totem of wrath

* Revert "refactor indent, remove bonus from spell group effects e.g. totem of wrath"

This reverts commit 104041172d34f542cc934e9f468407c36912cc7f.

* refactor indent

* manually set proc cooldown

---------

Co-authored-by: ariel- <ariel-@users.noreply.github.com>
This commit is contained in:
Jelle Meeus
2024-07-13 17:38:59 +02:00
committed by GitHub
parent 98cb352dc0
commit a69d02e513
4 changed files with 57 additions and 31 deletions

View File

@@ -9692,30 +9692,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
return false;
break;
}
// Demonic Pact
case 48090:
{
// Get talent aura from owner
if (IsPet())
if (Unit* owner = GetOwner())
{
if (HasSpellCooldown(trigger_spell_id))
return false;
AddSpellCooldown(trigger_spell_id, 0, cooldown);
if (AuraEffect* aurEff = owner->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 3220, 0))
{
int32 spellPower = owner->SpellBaseDamageBonusDone(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC));
if (AuraEffect const* demonicAuraEffect = GetAuraEffect(trigger_spell_id, EFFECT_0))
spellPower -= demonicAuraEffect->GetAmount();
basepoints0 = int32((aurEff->GetAmount() * spellPower + 100.0f) / 100.0f);
CastCustomSpell(this, trigger_spell_id, &basepoints0, &basepoints0, nullptr, true, castItem, triggeredByAura);
return true;
}
}
break;
}
case 46916: // Slam! (Bloodsurge proc)
case 52437: // Sudden Death
{