fix(Script/Spell): fix AOE circle bug on Midsummer Torch Catching (#17654)

* fix(Spells/Midsummer): fix script for spell 46747 SPELL_FLING_TORCH_DUMMY

* SpellInfoCorrections: fix target of spell 46747 Fling torch

* DB: assign spell 46747 Fling torch to item 34833 Unlit Torches

* remove whitespaces at src/server/game/Spells/SpellInfoCorrections.cpp:4610
This commit is contained in:
Ludwig
2023-11-09 00:19:57 +01:00
committed by GitHub
parent 48a43c7f44
commit cb483d124f
3 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
-- assign correct spell to 'Unlit Torches' to remove AOE circle on item use
UPDATE `item_template` SET `spellid_1` = 46747 WHERE (`entry` = 34833);

View File

@@ -4602,6 +4602,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_1].SpellClassMask[0] = 6;
});
// 46747 Fling torch
ApplySpellFix({ 46747 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER);
});
// Chains of Naberius
ApplySpellFix({ 36146 }, [](SpellInfo* spellInfo)
{

View File

@@ -754,9 +754,9 @@ class spell_midsummer_fling_torch : public SpellScript
void Register() override
{
AfterCast += SpellCastFn(spell_midsummer_fling_torch::HandleFinish);
OnCheckCast += SpellCheckCastFn(spell_midsummer_fling_torch::CheckCast);
if (m_scriptSpellId == SPELL_JUGGLE_TORCH)
{
OnCheckCast += SpellCheckCastFn(spell_midsummer_fling_torch::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_midsummer_fling_torch::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
}