mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
feat(Core/Grids): Remove WorldObject separation in grid containers (#22595)
This commit is contained in:
@@ -2161,24 +2161,7 @@ void Spell::SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* refere
|
||||
if (!containerMask)
|
||||
return;
|
||||
|
||||
// search world and grid for possible targets
|
||||
bool searchInGrid = containerMask & (GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_GAMEOBJECT);
|
||||
bool searchInWorld = containerMask & (GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER | GRID_MAP_TYPE_MASK_CORPSE);
|
||||
|
||||
if (searchInGrid || searchInWorld)
|
||||
{
|
||||
float x, y;
|
||||
x = pos->GetPositionX();
|
||||
y = pos->GetPositionY();
|
||||
|
||||
Map* map = referer->GetMap();
|
||||
|
||||
if (searchInWorld)
|
||||
Cell::VisitWorldObjects(x, y, map, searcher, radius);
|
||||
|
||||
if (searchInGrid)
|
||||
Cell::VisitGridObjects(x, y, map, searcher, radius);
|
||||
}
|
||||
Cell::VisitObjects(pos->GetPositionX(), pos->GetPositionY(), referer->GetMap(), searcher, radius);
|
||||
}
|
||||
|
||||
WorldObject* Spell::SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList)
|
||||
|
||||
Reference in New Issue
Block a user