From d6201e5dbb7fa7ca8b47ffa6c0d30fa38dceada5 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 13 May 2017 19:37:33 +0200 Subject: Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50790acde8928aa0f3dc4a9c096b4a8c (cherry picked from commit 9299e9bde087af7e5d777d5a55a3b79d2b63c48e) --- src/server/game/Spells/Spell.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') 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 world_object_notifier(searcher); - cell.Visit(p, world_object_notifier, map, radius, x, y); - } + Cell::VisitWorldObjects(x, y, map, searcher, radius); + if (searchInGrid) - { - TypeContainerVisitor grid_object_notifier(searcher); - cell.Visit(p, grid_object_notifier, map, radius, x, y); - } + Cell::VisitGridObjects(x, y, map, searcher, radius); } } -- cgit v1.2.3