aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 1b16666eb92..f080a1cb0c3 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1751,18 +1751,13 @@ void Spell::SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* refere
Cell cell(p);
cell.SetNoCreate();
- Map& map = *(referer->GetMap());
+ Map* map = referer->GetMap();
if (searchInWorld)
- {
- TypeContainerVisitor<SEARCHER, WorldTypeMapContainer> world_object_notifier(searcher);
- cell.Visit(p, world_object_notifier, map, radius, x, y);
- }
+ Cell::VisitWorldObjects(x, y, map, searcher, radius);
+
if (searchInGrid)
- {
- TypeContainerVisitor<SEARCHER, GridTypeMapContainer > grid_object_notifier(searcher);
- cell.Visit(p, grid_object_notifier, map, radius, x, y);
- }
+ Cell::VisitGridObjects(x, y, map, searcher, radius);
}
}