fix(Scripts/SSC): remove Tainted Core from inventory on death (#24939)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-02-28 14:17:14 -03:00
committed by GitHub
parent f34e87fd32
commit 6338e036c5
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id` = 38132 AND `ScriptName` = 'spell_lady_vashj_tainted_core_paralyze';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(38132, 'spell_lady_vashj_tainted_core_paralyze');

View File

@@ -401,6 +401,26 @@ class spell_lady_vashj_summons : public SpellScript
}
};
// Spell 38132 - Paralyze (applied to player when looting Tainted Core item 31088)
class spell_lady_vashj_tainted_core_paralyze : public AuraScript
{
PrepareAuraScript(spell_lady_vashj_tainted_core_paralyze);
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH)
return;
if (Player* player = GetTarget()->ToPlayer())
player->DestroyItemCount(ITEM_TAINTED_CORE, -1, true);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_lady_vashj_tainted_core_paralyze::HandleEffectRemove, EFFECT_0, SPELL_AURA_MOD_ROOT, AURA_EFFECT_HANDLE_REAL);
}
};
void AddSC_boss_lady_vashj()
{
RegisterSerpentShrineAI(boss_lady_vashj);
@@ -409,4 +429,5 @@ void AddSC_boss_lady_vashj()
RegisterSpellScript(spell_lady_vashj_summon_sporebat);
RegisterSpellScript(spell_lady_vashj_spore_drop_effect);
RegisterSpellScript(spell_lady_vashj_summons);
RegisterSpellScript(spell_lady_vashj_tainted_core_paralyze);
}