aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-06-08 01:07:44 +0200
committerShauren <shauren.trinity@gmail.com>2025-06-08 01:07:44 +0200
commit0f9a0accf17ba3a9f20d6a7575b51ed2cb09a73c (patch)
tree2a883a8df46b6d90fb2d2cba3edfead398216f94 /src/server/scripts/Spells
parentaab8cdec35d66e895679d0e2e179331cfe19efc0 (diff)
Core/Misc: Kill AnyPlayerInObjectRangeCheck (duplicate of AnyUnitInObjectRangeCheck)
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 7430a50d374..2c2eff515e4 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -22,9 +22,7 @@
*/
#include "ScriptMgr.h"
-#include "CellImpl.h"
#include "CreatureAIImpl.h"
-#include "GridNotifiersImpl.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -724,15 +722,13 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScript
{
Unit* caster = GetCaster();
// Check for player that is in 65 y range
- std::list<Player*> playerList;
- Trinity::AnyPlayerInObjectRangeCheck checker(caster, 65.0f);
- Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, playerList, checker);
- Cell::VisitWorldObjects(caster, searcher, 65.0f);
- for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
+ std::vector<Player*> playerList;
+ caster->GetPlayerListInGrid(playerList, 65.0f);
+ for (Player* player : playerList)
// Check if found player target is on fly mount or using flying form
- if ((*itr)->HasAuraType(SPELL_AURA_FLY) || (*itr)->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))
+ if (player->HasAuraType(SPELL_AURA_FLY) || player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))
// Summom Fel Cannon (bunny version) at found player
- caster->SummonCreature(NPC_FEL_CANNON2, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ());
+ caster->SummonCreature(NPC_FEL_CANNON2, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
}
void Register() override