fix(Core/Scripts): Remove duplicate spell scripts causing double-firing (#24905)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -1206,31 +1206,6 @@ class spell_item_trauma : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_item_blade_ward_enchant : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_blade_ward_enchant);
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (!eventInfo.GetActionTarget())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(64442 /*SPELL_BLADE_WARDING*/))
|
||||
{
|
||||
int32 basepoints = spellInfo->Effects[EFFECT_0].CalcValue() * this->GetStackAmount();
|
||||
eventInfo.GetActionTarget()->CastCustomSpell(spellInfo->Id, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActor(), true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_item_blade_ward_enchant::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_item_blood_draining_enchant : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_blood_draining_enchant);
|
||||
@@ -6236,7 +6211,6 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_fetch_ball);
|
||||
RegisterSpellScript(spell_item_oracle_ablutions);
|
||||
RegisterSpellScript(spell_item_trauma);
|
||||
RegisterSpellScript(spell_item_blade_ward_enchant);
|
||||
RegisterSpellScript(spell_item_blood_draining_enchant);
|
||||
RegisterSpellScript(spell_item_dragon_kite_summon_lightning_bunny);
|
||||
RegisterSpellScript(spell_item_enchanted_broom_periodic);
|
||||
|
||||
@@ -1404,33 +1404,6 @@ class spell_pal_spiritual_attunement : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 54937 - Glyph of Holy Light (proc trigger)
|
||||
class spell_pal_glyph_of_holy_light_proc : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pal_glyph_of_holy_light_proc);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PALADIN_GLYPH_OF_HOLY_LIGHT_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
HealInfo* healInfo = eventInfo.GetHealInfo();
|
||||
if (!healInfo || !healInfo->GetHeal())
|
||||
return;
|
||||
|
||||
int32 bp = CalculatePct(int32(healInfo->GetHeal()), aurEff->GetAmount());
|
||||
GetTarget()->CastCustomSpell(SPELL_PALADIN_GLYPH_OF_HOLY_LIGHT_HEAL, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetActionTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_pal_glyph_of_holy_light_proc::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 1022 - Hand of Protection
|
||||
class spell_pal_hand_of_protection : public SpellScript
|
||||
{
|
||||
@@ -2209,7 +2182,6 @@ void AddSC_paladin_spell_scripts()
|
||||
RegisterSpellScript(spell_pal_judgement_of_light_heal);
|
||||
RegisterSpellScript(spell_pal_judgement_of_wisdom_mana);
|
||||
RegisterSpellScript(spell_pal_spiritual_attunement);
|
||||
RegisterSpellScript(spell_pal_glyph_of_holy_light_proc);
|
||||
RegisterSpellScript(spell_pal_t3_6p_bonus);
|
||||
RegisterSpellScript(spell_pal_t8_2p_bonus);
|
||||
RegisterSpellScript(spell_pal_glyph_of_divinity);
|
||||
|
||||
@@ -360,38 +360,6 @@ class spell_pri_hymn_of_hope : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 37594 - Greater Heal Refund
|
||||
class spell_pri_item_greater_heal_refund : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pri_item_greater_heal_refund);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_ITEM_EFFICIENCY });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (HealInfo* healInfo = eventInfo.GetHealInfo())
|
||||
if (Unit* healTarget = healInfo->GetTarget())
|
||||
if (eventInfo.GetHitMask() & PROC_EX_NO_OVERHEAL && healTarget->IsFullHealth())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_pri_item_greater_heal_refund::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_item_greater_heal_refund::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// 60123 - Lightwell
|
||||
class spell_pri_lightwell : public SpellScript
|
||||
{
|
||||
@@ -1448,7 +1416,6 @@ void AddSC_priest_spell_scripts()
|
||||
RegisterSpellScript(spell_pri_glyph_of_prayer_of_healing);
|
||||
RegisterSpellScript(spell_pri_guardian_spirit);
|
||||
RegisterSpellScript(spell_pri_hymn_of_hope);
|
||||
RegisterSpellScript(spell_pri_item_greater_heal_refund);
|
||||
RegisterSpellScript(spell_pri_lightwell);
|
||||
RegisterSpellScript(spell_pri_lightwell_renew);
|
||||
RegisterSpellScript(spell_pri_mana_burn);
|
||||
|
||||
@@ -1306,54 +1306,6 @@ class spell_warl_voidwalker_pet_passive : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 54909, 53646 - Demonic Pact
|
||||
class spell_warl_demonic_pact_aura : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warl_demonic_pact_aura);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARLOCK_DEMONIC_PACT_PROC });
|
||||
}
|
||||
|
||||
bool AfterCheckProc(ProcEventInfo& eventInfo, bool isTriggeredAtSpellProcEvent)
|
||||
{
|
||||
return isTriggeredAtSpellProcEvent && eventInfo.GetActor() && eventInfo.GetActor()->IsPet();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
if (eventInfo.GetActor()->HasSpellCooldown(aurEff->GetId()))
|
||||
return;
|
||||
|
||||
if (Unit* owner = eventInfo.GetActor()->GetOwner())
|
||||
{
|
||||
int32 currentBonus = 0;
|
||||
if (AuraEffect* demonicAurEff = owner->GetAuraEffect(SPELL_WARLOCK_DEMONIC_PACT_PROC, EFFECT_0))
|
||||
{
|
||||
currentBonus = demonicAurEff->GetAmount();
|
||||
}
|
||||
|
||||
if (AuraEffect* talentAurEff = owner->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, WARLOCK_ICON_ID_DEMONIC_PACT, EFFECT_0))
|
||||
{
|
||||
int32 spellDamageMinusBonus = owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_MAGIC) - currentBonus;
|
||||
if (spellDamageMinusBonus < 0)
|
||||
return;
|
||||
int32 bp = int32((talentAurEff->GetAmount() / 100.0f) * spellDamageMinusBonus);
|
||||
owner->CastCustomSpell((Unit*)nullptr, SPELL_WARLOCK_DEMONIC_PACT_PROC, &bp, &bp, 0, true, nullptr, talentAurEff);
|
||||
eventInfo.GetActor()->AddSpellCooldown(aurEff->GetId(), 0, eventInfo.GetProcCooldown());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_warl_demonic_pact_aura::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// -980 - Curse of Agony
|
||||
class spell_warl_curse_of_agony : public AuraScript
|
||||
{
|
||||
@@ -1861,7 +1813,6 @@ void AddSC_warlock_spell_scripts()
|
||||
RegisterSpellScript(spell_warl_drain_soul);
|
||||
RegisterSpellScript(spell_warl_shadowburn);
|
||||
RegisterSpellScript(spell_warl_voidwalker_pet_passive);
|
||||
RegisterSpellScript(spell_warl_demonic_pact_aura);
|
||||
RegisterSpellScript(spell_warl_curse_of_agony);
|
||||
RegisterSpellScript(spell_warl_glyph_of_corruption_nightfall);
|
||||
RegisterSpellScript(spell_warl_nightfall);
|
||||
|
||||
Reference in New Issue
Block a user