From 0cb13b124234e9e6fb587f3db34013854a7f48de Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:03:39 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/TempleOfAhnQiraj):=20Fix=20Twin=20E?= =?UTF-8?q?mperor's=20critters=20aggroing=20p=E2=80=A6=20(#13365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …layers randomly --- .../TempleOfAhnQiraj/temple_of_ahnqiraj.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index d694e96c9..7e1dbf5cd 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -445,6 +445,19 @@ struct npc_ahnqiraji_critter : public ScriptedAI me->RestoreFaction(); _scheduler.CancelAll(); + + // Don't attack nearby players randomly if they are the Twin's pet bugs. + if (CreatureData const* crData = me->GetCreatureData()) + { + ObjectGuid dbtableHighGuid = ObjectGuid::Create(crData->id1, me->GetSpawnId()); + ObjectGuid targetGuid = sObjectMgr->GetLinkedRespawnGuid(dbtableHighGuid); + + if (targetGuid.GetEntry() == NPC_VEKLOR) + { + return; + } + } + _scheduler.Schedule(100ms, [this](TaskContext context) { if (Player* player = me->SelectNearestPlayer(10.f))