fix(Core/Spells): Fixed explosive shot ammo consumption (#21501)

Co-authored-by: pavel_k <pavel_k@mail.com>
Co-authored-by: Jelle Meeus <sogladev@gmail.com>
This commit is contained in:
Paul
2025-07-15 10:05:56 +03:00
committed by GitHub
parent 506722ee88
commit 38cb6ace25
3 changed files with 26 additions and 1 deletions

View File

@@ -1347,6 +1347,27 @@ class spell_hun_target_self_and_pet : public SpellScript
}
};
// -53301 - Explosive Shot
class spell_hun_explosive_shot : public SpellScript
{
PrepareSpellScript(spell_hun_explosive_shot);
void HandleFinish()
{
// Handling of explosive shot initial cast without LnL proc
if (!GetCaster() || !GetCaster()->IsPlayer())
return;
if (!GetCaster()->HasAura(SPELL_LOCK_AND_LOAD_TRIGGER))
GetSpell()->TakeAmmo();
}
void Register() override
{
AfterCast += SpellCastFn(spell_hun_explosive_shot::HandleFinish);
}
};
void AddSC_hunter_spell_scripts()
{
RegisterSpellScript(spell_hun_check_pet_los);
@@ -1378,4 +1399,5 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_intimidation);
RegisterSpellScript(spell_hun_bestial_wrath);
RegisterSpellScript(spell_hun_target_self_and_pet);
RegisterSpellScript(spell_hun_explosive_shot);
}