feat(Core/Spells): Move Spell pri lightwell to spell scripts (#11089)

This commit is contained in:
IntelligentQuantum
2022-03-27 09:25:59 +04:30
committed by GitHub
parent a4e68e681e
commit 7410f1a3cb
3 changed files with 60 additions and 42 deletions

View File

@@ -4114,48 +4114,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
else
unitTarget->CastSpell(unitTarget, 59314, true);
return;
}
case 60123: // Lightwell
{
if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->ToCreature()->IsSummon())
return;
uint32 spell_heal;
switch (m_caster->GetEntry())
{
case 31897:
spell_heal = 7001;
break;
case 31896:
spell_heal = 27873;
break;
case 31895:
spell_heal = 27874;
break;
case 31894:
spell_heal = 28276;
break;
case 31893:
spell_heal = 48084;
break;
case 31883:
spell_heal = 48085;
break;
default:
LOG_ERROR("spells.effect", "Unknown Lightwell spell caster {}", m_caster->GetEntry());
return;
}
// proc a spellcast
if (Aura* chargesAura = m_caster->GetAura(59907))
{
m_caster->CastSpell(unitTarget, spell_heal, true, nullptr, nullptr, m_caster->ToTempSummon()->GetSummonerGUID());
if (chargesAura->ModCharges(-1))
m_caster->ToTempSummon()->UnSummon();
}
return;
}
// Stoneclaw Totem