aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/cata_classic/2024_09_01_00_world.sql20
-rw-r--r--src/server/scripts/Spells/spell_item.cpp428
2 files changed, 20 insertions, 428 deletions
diff --git a/sql/updates/world/cata_classic/2024_09_01_00_world.sql b/sql/updates/world/cata_classic/2024_09_01_00_world.sql
new file mode 100644
index 00000000000..4677ead10e2
--- /dev/null
+++ b/sql/updates/world/cata_classic/2024_09_01_00_world.sql
@@ -0,0 +1,20 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN
+('spell_item_water_strider',
+'spell_item_brutal_kinship',
+'spell_item_eggnog',
+'spell_item_sephuzs_secret',
+'spell_item_set_march_of_the_legion',
+'spell_item_seal_of_darkshire_nobility',
+'spell_item_lightblood_elixir',
+'spell_item_highfathers_machination',
+'spell_item_seeping_scourgewing',
+'spell_item_seeping_scourgewing_aoe_check',
+'spell_item_grips_of_forsaken_sanity',
+'spell_item_zanjir_scaleguard_greatcloak',
+'spell_item_shiver_venom_crossbow',
+'spell_item_shiver_venom_lance',
+'spell_item_phial_of_the_arcane_tempest_damage',
+'spell_item_phial_of_the_arcane_tempest_periodic',
+'spell_item_amalgams_seventh_spine',
+'spell_item_amalgams_seventh_spine_mana_restore',
+'spell_item_infurious_crafted_gear_mettle');
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 6ec90ad3535..6959a574ed6 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -4019,49 +4019,6 @@ class spell_item_world_queller_focus : public AuraScript
}
};
-// 118089 - Azure Water Strider
-// 127271 - Crimson Water Strider
-// 127272 - Orange Water Strider
-// 127274 - Jade Water Strider
-// 127278 - Golden Water Strider
-class spell_item_water_strider : public AuraScript
-{
- bool Validate(SpellInfo const* spellInfo) override
- {
- return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
- }
-
- void OnRemove(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
- {
- GetTarget()->RemoveAurasDueToSpell(GetSpellInfo()->GetEffect(EFFECT_1).TriggerSpell);
- }
-
- void Register() override
- {
- OnEffectRemove += AuraEffectRemoveFn(spell_item_water_strider::OnRemove, EFFECT_0, SPELL_AURA_MOUNTED, AURA_EFFECT_HANDLE_REAL);
- }
-};
-
-// 144671 - Brutal Kinship
-// 145738 - Brutal Kinship
-class spell_item_brutal_kinship : public AuraScript
-{
- bool Validate(SpellInfo const* /*spell*/) override
- {
- return ValidateSpellInfo({ SPELL_BRUTAL_KINSHIP_1, SPELL_BRUTAL_KINSHIP_2 });
- }
-
- void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
- {
- GetTarget()->RemoveAurasDueToSpell(effect->GetSpellEffectInfo().TriggerSpell);
- }
-
- void Register() override
- {
- OnEffectRemove += AuraEffectRemoveFn(spell_item_brutal_kinship::OnRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
- }
-};
-
// 45051 - Mad Alchemist's Potion (34440)
class spell_item_mad_alchemists_potion : public SpellScript
{
@@ -4169,372 +4126,6 @@ class spell_item_crazy_alchemists_potion : public SpellScript
}
};
-enum Eggnog
-{
- SPELL_EGG_NOG_REINDEER = 21936,
- SPELL_EGG_NOG_SNOWMAN = 21980,
-};
-
-// 21149 - Egg Nog
-class spell_item_eggnog : public SpellScript
-{
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_EGG_NOG_REINDEER, SPELL_EGG_NOG_SNOWMAN});
- }
-
- void HandleScript(SpellEffIndex /* effIndex */)
- {
- if (roll_chance_i(40))
- GetCaster()->CastSpell(GetHitUnit(), roll_chance_i(50) ? SPELL_EGG_NOG_REINDEER : SPELL_EGG_NOG_SNOWMAN, GetCastItem());
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_item_eggnog::HandleScript, EFFECT_2, SPELL_EFFECT_INEBRIATE);
- }
-};
-
-enum SephuzsSecret
-{
- SPELL_SEPHUZS_SECRET_COOLDOWN = 226262
-};
-
-// 208051 - Sephuz's Secret
-// 234867 - Sephuz's Secret
-// 236763 - Sephuz's Secret
-class spell_item_sephuzs_secret : public AuraScript
-{
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_SEPHUZS_SECRET_COOLDOWN });
- }
-
- bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
- {
- if (GetUnitOwner()->HasAura(SPELL_SEPHUZS_SECRET_COOLDOWN))
- return false;
-
- if (eventInfo.GetHitMask() & (PROC_HIT_INTERRUPT | PROC_HIT_DISPEL))
- return true;
-
- Spell const* procSpell = eventInfo.GetProcSpell();
- if (!procSpell)
- return false;
-
- bool isCrowdControl = procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_CONFUSE)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_FEAR)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_PACIFY)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_SILENCE)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_PACIFY_SILENCE)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT_2);
-
- if (!isCrowdControl)
- return false;
-
- return true;
- }
-
- void HandleProc(AuraEffect* aurEff, ProcEventInfo& procInfo)
- {
- PreventDefaultAction();
-
- GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SEPHUZS_SECRET_COOLDOWN, TRIGGERED_FULL_MASK);
- GetUnitOwner()->CastSpell(procInfo.GetProcTarget(), aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(aurEff).SetTriggeringSpell(procInfo.GetProcSpell()));
- }
-
- void Register() override
- {
- DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_sephuzs_secret::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- OnEffectProc += AuraEffectProcFn(spell_item_sephuzs_secret::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
-};
-
-// 228445 - March of the Legion
-class spell_item_set_march_of_the_legion : public AuraScript
-{
- bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
- {
- return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
- }
-
- void Register() override
- {
- DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_set_march_of_the_legion::IsDemon, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
-};
-
-// 234113 - Arrogance (used by item 142171 - Seal of Darkshire Nobility)
-class spell_item_seal_of_darkshire_nobility : public AuraScript
-{
- bool Validate(SpellInfo const* spellInfo) override
- {
- return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } })
- && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_1).TriggerSpell });
- }
-
- bool CheckCooldownAura(ProcEventInfo& eventInfo)
- {
- return eventInfo.GetProcTarget() && !eventInfo.GetProcTarget()->HasAura(GetEffectInfo(EFFECT_1).TriggerSpell, GetTarget()->GetGUID());
- }
-
- void Register() override
- {
- DoCheckProc += AuraCheckProcFn(spell_item_seal_of_darkshire_nobility::CheckCooldownAura);
- }
-};
-
-// 247625 - March of the Legion
-class spell_item_lightblood_elixir : public AuraScript
-{
- bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
- {
- return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
- }
-
- void Register() override
- {
- DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_lightblood_elixir::IsDemon, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
-};
-
-enum HighfathersMachination
-{
- SPELL_HIGHFATHERS_TIMEKEEPING_HEAL = 253288
-};
-
-// 253287 - Highfather's Timekeeping
-class spell_item_highfathers_machination : public AuraScript
-{
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_HIGHFATHERS_TIMEKEEPING_HEAL });
- }
-
- bool CheckHealth(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
- {
- return eventInfo.GetDamageInfo() && GetTarget()->HealthBelowPctDamaged(aurEff->GetAmount(), eventInfo.GetDamageInfo()->GetDamage());
- }
-
- void Heal(AuraEffect* aurEff, ProcEventInfo& /*procInfo*/)
- {
- PreventDefaultAction();
- if (Unit* caster = GetCaster())
- caster->CastSpell(GetTarget(), SPELL_HIGHFATHERS_TIMEKEEPING_HEAL, aurEff);
- }
-
- void Register() override
- {
- DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_highfathers_machination::CheckHealth, EFFECT_0, SPELL_AURA_DUMMY);
- OnEffectProc += AuraEffectProcFn(spell_item_highfathers_machination::Heal, EFFECT_0, SPELL_AURA_DUMMY);
- }
-};
-
-enum SeepingScourgewing
-{
- SPELL_SHADOW_STRIKE_AOE_CHECK = 255861,
- SPELL_ISOLATED_STRIKE = 255609
-};
-
-// 253323 - Shadow Strike
-class spell_item_seeping_scourgewing : public AuraScript
-{
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_SHADOW_STRIKE_AOE_CHECK });
- }
-
- void TriggerIsolatedStrikeCheck(AuraEffect* aurEff, ProcEventInfo& eventInfo)
- {
- GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_SHADOW_STRIKE_AOE_CHECK,
- CastSpellExtraArgs(aurEff).SetTriggeringSpell(eventInfo.GetProcSpell()));
- }
-
- void Register() override
- {
- AfterEffectProc += AuraEffectProcFn(spell_item_seeping_scourgewing::TriggerIsolatedStrikeCheck, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
-};
-
-// 255861 - Shadow Strike
-class spell_item_seeping_scourgewing_aoe_check : public SpellScript
-{
- void TriggerAdditionalDamage()
- {
- if (GetUnitTargetCountForEffect(EFFECT_0) > 1)
- return;
-
- CastSpellExtraArgs args;
- args.TriggerFlags = TRIGGERED_FULL_MASK;
- args.OriginalCastId = GetSpell()->m_originalCastId;
- if (GetSpell()->m_castItemLevel >= 0)
- args.OriginalCastItemLevel = GetSpell()->m_castItemLevel;
-
- GetCaster()->CastSpell(GetHitUnit(), SPELL_ISOLATED_STRIKE, args);
- }
-
- void Register() override
- {
- AfterHit += SpellHitFn(spell_item_seeping_scourgewing_aoe_check::TriggerAdditionalDamage);
- }
-};
-
-// 295175 - Spiteful Binding
-class spell_item_grips_of_forsaken_sanity : public AuraScript
-{
- bool Validate(SpellInfo const* spellInfo) override
- {
- return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
- }
-
- bool CheckHealth(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
- {
- return eventInfo.GetActor()->GetHealthPct() >= float(GetEffectInfo(EFFECT_1).CalcValue());
- }
-
- void Register() override
- {
- DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_grips_of_forsaken_sanity::CheckHealth, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
-};
-
-// 302385 - Resurrect Health
-class spell_item_zanjir_scaleguard_greatcloak : public AuraScript
-{
- bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
- {
- return eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->HasEffect(SPELL_EFFECT_RESURRECT);
- }
-
- void Register() override
- {
- DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_zanjir_scaleguard_greatcloak::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
- }
-};
-
-enum ShiverVenomSpell : uint32
-{
- SPELL_SHIVER_VENOM = 301624,
- SPELL_SHIVERING_BOLT = 303559,
- SPELL_VENOMOUS_LANCE = 303562
-};
-
-// 303358 Venomous Bolt
-// 303361 Shivering Lance
-class spell_item_shiver_venom_weapon_proc : public AuraScript
-{
-public:
- spell_item_shiver_venom_weapon_proc(ShiverVenomSpell additionalProcSpellId) : _additionalProcSpellId(additionalProcSpellId) { }
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_SHIVER_VENOM, _additionalProcSpellId });
- }
-
- void HandleAdditionalProc(AuraEffect* aurEff, ProcEventInfo& procInfo)
- {
- if (procInfo.GetProcTarget()->HasAura(SPELL_SHIVER_VENOM))
- procInfo.GetActor()->CastSpell(procInfo.GetProcTarget(), _additionalProcSpellId, CastSpellExtraArgs(aurEff)
- .AddSpellMod(SPELLVALUE_BASE_POINT0, aurEff->GetAmount())
- .SetTriggeringSpell(procInfo.GetProcSpell()));
- }
-
- void Register() override
- {
- OnEffectProc += AuraEffectProcFn(spell_item_shiver_venom_weapon_proc::HandleAdditionalProc, EFFECT_1, SPELL_AURA_DUMMY);
- }
-
-private:
- ShiverVenomSpell _additionalProcSpellId;
-};
-
-// 302774 - Arcane Tempest
-class spell_item_phial_of_the_arcane_tempest_damage : public SpellScript
-{
- void ModifyStacks()
- {
- if (GetUnitTargetCountForEffect(EFFECT_0) != 1 || !GetTriggeringSpell())
- return;
-
- if (AuraEffect* aurEff = GetCaster()->GetAuraEffect(GetTriggeringSpell()->Id, EFFECT_0))
- {
- aurEff->GetBase()->ModStackAmount(1, AURA_REMOVE_NONE, false);
- aurEff->CalculatePeriodic(GetCaster(), false);
- }
- }
-
- void Register() override
- {
- AfterCast += SpellCastFn(spell_item_phial_of_the_arcane_tempest_damage::ModifyStacks);
- }
-};
-
-// 302769 - Arcane Tempest
-class spell_item_phial_of_the_arcane_tempest_periodic : public AuraScript
-{
- void CalculatePeriod(AuraEffect const* /*aurEff*/, bool& /*isPeriodic*/, int32& period)
- {
- period -= (GetStackAmount() - 1) * 300;
- }
-
- void Register() override
- {
- DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_item_phial_of_the_arcane_tempest_periodic::CalculatePeriod, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
- }
-};
-
-// 410530 - Mettle
-// 410964 - Mettle
-class spell_item_infurious_crafted_gear_mettle : public AuraScript
-{
- static constexpr uint32 SPELL_METTLE_COOLDOWN = 410532;
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_METTLE_COOLDOWN });
- }
-
- bool CheckProc(ProcEventInfo& eventInfo)
- {
- if (GetTarget()->HasAura(SPELL_METTLE_COOLDOWN))
- return false;
-
- if (eventInfo.GetHitMask() & (PROC_HIT_INTERRUPT | PROC_HIT_DISPEL))
- return true;
-
- Spell const* procSpell = eventInfo.GetProcSpell();
- if (!procSpell)
- return false;
-
- bool isCrowdControl = procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_CONFUSE)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_FEAR)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_PACIFY)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_SILENCE)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_PACIFY_SILENCE)
- || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT_2);
-
- if (!isCrowdControl)
- return false;
-
- return eventInfo.GetActionTarget()->HasAura([&](Aura const* aura) { return aura->GetCastId() == procSpell->m_castId; });
- }
-
- void TriggerCooldown(ProcEventInfo& /*eventInfo*/)
- {
- GetTarget()->CastSpell(GetTarget(), SPELL_METTLE_COOLDOWN, true);
- }
-
- void Register() override
- {
- DoCheckProc += AuraCheckProcFn(spell_item_infurious_crafted_gear_mettle::CheckProc);
- AfterProc += AuraProcFn(spell_item_infurious_crafted_gear_mettle::TriggerCooldown);
- }
-};
-
void AddSC_item_spell_scripts()
{
// 23074 Arcanite Dragonling
@@ -4666,26 +4257,7 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_talisman_of_ascendance);
RegisterSpellScript(spell_item_battle_trance);
RegisterSpellScript(spell_item_world_queller_focus);
- RegisterSpellScript(spell_item_water_strider);
- RegisterSpellScript(spell_item_brutal_kinship);
RegisterSpellScript(spell_item_mad_alchemists_potion);
RegisterSpellScript(spell_item_crazy_alchemists_potion);
- RegisterSpellScript(spell_item_eggnog);
-
- RegisterSpellScript(spell_item_sephuzs_secret);
- RegisterSpellScript(spell_item_set_march_of_the_legion);
- RegisterSpellScript(spell_item_seal_of_darkshire_nobility);
- RegisterSpellScript(spell_item_lightblood_elixir);
- RegisterSpellScript(spell_item_highfathers_machination);
- RegisterSpellScript(spell_item_seeping_scourgewing);
- RegisterSpellScript(spell_item_seeping_scourgewing_aoe_check);
- RegisterSpellScript(spell_item_grips_of_forsaken_sanity);
- RegisterSpellScript(spell_item_zanjir_scaleguard_greatcloak);
- RegisterSpellScriptWithArgs(spell_item_shiver_venom_weapon_proc, "spell_item_shiver_venom_crossbow", SPELL_SHIVERING_BOLT);
- RegisterSpellScriptWithArgs(spell_item_shiver_venom_weapon_proc, "spell_item_shiver_venom_lance", SPELL_VENOMOUS_LANCE);
- RegisterSpellScript(spell_item_phial_of_the_arcane_tempest_damage);
- RegisterSpellScript(spell_item_phial_of_the_arcane_tempest_periodic);
-
- RegisterSpellScript(spell_item_infurious_crafted_gear_mettle);
}