mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-08 02:00:29 +00:00
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:
@@ -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');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user