From 3cbe976a4ebaeb7d5dfd3a0f155a3f83ed6ebd53 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 21 Mar 2025 05:00:17 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/SunwellPlateau):=20Vapor=20should?= =?UTF-8?q?=20chase=20the=20player=20targeted=20b=E2=80=A6=20(#21740)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SunwellPlateau/boss_felmyst.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index dc13e2873..00e91d584 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -376,6 +376,16 @@ struct npc_demonic_vapor : public NullCreatureAI me->CastSpell(me, SPELL_DEMONIC_VAPOR_SPAWN_TRIGGER, true); } + void IsSummonedBy(WorldObject* summoner) override + { + if (!summoner || !summoner->ToUnit()) + return; + + me->m_Events.AddEventAtOffset([this, summoner] { + me->GetMotionMaster()->MoveFollow(summoner->ToUnit(), 0.0f, 0.0f, MOTION_SLOT_CONTROLLED); + }, 2s); + } + void UpdateAI(uint32 diff) override { if (_timer) @@ -387,16 +397,6 @@ struct npc_demonic_vapor : public NullCreatureAI _timer = 0; } } - else if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_CONTROLLED) == NULL_MOTION_TYPE) - { - Map::PlayerList const& players = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if (me->GetDistance2d(itr->GetSource()) < 20.0f && itr->GetSource()->IsAlive()) - { - me->GetMotionMaster()->MoveFollow(itr->GetSource(), 0.0f, 0.0f, MOTION_SLOT_CONTROLLED); - break; - } - } } private: uint32 _timer;