feat(Scripts/Spell): Teleporting to Script

Co-authored-by: Nefertumm <nefertum.dev@protonmail.com>
This commit is contained in:
IntelligentQuantum
2022-04-01 14:33:22 +04:30
committed by GitHub
parent b680ea3dae
commit 7a294787d3
3 changed files with 38 additions and 20 deletions

View File

@@ -3951,26 +3951,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
if (unitTarget->ToPlayer()->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE)
unitTarget->CastSpell(unitTarget, spellID, true);
return;
}
case 59317: // Teleporting
{
if (!unitTarget)
return;
Player* player = unitTarget->ToPlayer();
if (!player)
{
return;
}
// return from top
if (player->GetAreaId() == 4637)
unitTarget->CastSpell(unitTarget, 59316, true);
// teleport atop
else
unitTarget->CastSpell(unitTarget, 59314, true);
return;
}
// Stoneclaw Totem