aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-27 02:24:25 -0700
committermaximius <none@none>2009-09-27 02:24:25 -0700
commitf980dd9ac6c1679caac7a41d806d65c90a02939f (patch)
treeadd2748b3fcfd38d00883789dc692c087deed77f /src/game/Creature.cpp
parenta635bdd0ccdf77c56c45ee1a6d456b3a2ef43ff3 (diff)
*Merge [8524] New cell search algorithm implemented. You can now choose different
visibility distances on continents, in BG/Arenas and instances. Author: Ambal *Some warning cleanup --HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 4aa4c48ffe8..b2261bb4b8d 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -655,7 +655,7 @@ void Creature::DoFleeToGetAssistance()
TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap());
+ cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, radius);
SetNoSearchAssistance(true);
if(!pCreature)
@@ -2051,8 +2051,8 @@ Unit* Creature::SelectNearestTarget(float dist) const
TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::NearestHostileUnitInAttackDistanceCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, world_unit_searcher, *GetMap());
- cell_lock->Visit(cell_lock, grid_unit_searcher, *GetMap());
+ cell_lock->Visit(cell_lock, world_unit_searcher, *GetMap(), *this, ATTACK_DISTANCE);
+ cell_lock->Visit(cell_lock, grid_unit_searcher, *GetMap(), *this, ATTACK_DISTANCE);
}
return target;
@@ -2082,7 +2082,7 @@ void Creature::CallAssistance()
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap());
+ cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, radius);
}
if (!assistList.empty())
@@ -2116,7 +2116,7 @@ void Creature::CallForHelp(float fRadius)
TypeContainerVisitor<MaNGOS::CreatureWorker<MaNGOS::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker);
CellLock<GridReadGuard> cell_lock(cell, p);
- cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap());
+ cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, fRadius);
}
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const