From 0f9a0accf17ba3a9f20d6a7575b51ed2cb09a73c Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 8 Jun 2025 01:07:44 +0200 Subject: Core/Misc: Kill AnyPlayerInObjectRangeCheck (duplicate of AnyUnitInObjectRangeCheck) --- src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/server/scripts/Kalimdor') diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 3931703e223..0beae4707c5 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -30,13 +30,13 @@ npc_magwin EndContentData */ #include "ScriptMgr.h" -#include "CellImpl.h" -#include "GameObjectAI.h" -#include "GridNotifiersImpl.h" +#include "GameObject.h" #include "MotionMaster.h" #include "ObjectAccessor.h" +#include "Player.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" +#include "SpellInfo.h" #include "SpellScript.h" #include "TemporarySummon.h" @@ -571,14 +571,12 @@ public: void CompleteQuest() { float radius = 50.0f; - std::list players; - Trinity::AnyPlayerInObjectRangeCheck checker(me, radius); - Trinity::PlayerListSearcher searcher(me, players, checker); - Cell::VisitWorldObjects(me, searcher, radius); - - for (std::list::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if ((*itr)->GetQuestStatus(QUEST_TREES_COMPANY) == QUEST_STATUS_INCOMPLETE && (*itr)->HasAura(SPELL_TREE_DISGUISE)) - (*itr)->KilledMonsterCredit(NPC_SPARK); + std::vector players; + me->GetPlayerListInGrid(players, radius); + + for (Player* player : players) + if (player->GetQuestStatus(QUEST_TREES_COMPANY) == QUEST_STATUS_INCOMPLETE && player->HasAura(SPELL_TREE_DISGUISE)) + player->KilledMonsterCredit(NPC_SPARK); } void DespawnNagaFlag(bool despawn) -- cgit v1.2.3