Skip to content

Fix to sylvanas getting stuck in idle motion and not evading outside throne room #2385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/AI/ScriptedAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const uiDiff)
break;
case NPC_SYLVANAS:
case NPC_VARIMATHRAS:
if (m_creature->GetDistance(fX, fY, fZ) < 120.0f)
if (fZ < -53.0f)
return false;
break;
default:
Expand Down
9 changes: 5 additions & 4 deletions src/scripts/eastern_kingdoms/undercity/undercity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ struct boss_sylvanasAI : public ScriptedAI

void UpdateAI(uint32 const uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
return;

if (m_uiFadedTimer)
{
if (m_uiFadedTimer > uiDiff)
Expand All @@ -77,12 +80,10 @@ struct boss_sylvanasAI : public ScriptedAI
return;
}
m_uiFadedTimer = 0;
m_creature->GetMotionMaster()->Clear();
m_creature-> GetMotionMaster()->Clear();
m_creature-> GetMotionMaster()->MoveChase(m_creature->GetVictim());
}

if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
return;

if (m_uiSummSkelTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_SKEL) == CAST_OK)
Expand Down