mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
missing changes
This commit is contained in:
@@ -2104,7 +2104,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
|
||||
// call MoveInLineOfSight for nearby creatures
|
||||
Trinity::AIRelocationNotifier notifier(*summon);
|
||||
summon->VisitNearbyObject(GetVisibilityRange(), notifier);
|
||||
Cell::VisitAllObjects(summon, notifier, GetVisibilityRange());
|
||||
|
||||
return summon;
|
||||
}
|
||||
@@ -2267,7 +2267,7 @@ Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive
|
||||
Creature* creature = nullptr;
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck checker(*this, entry, alive, range);
|
||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(this, creature, checker);
|
||||
VisitNearbyObject(range, searcher);
|
||||
Cell::VisitAllObjects(this, searcher, range);
|
||||
return creature;
|
||||
}
|
||||
|
||||
@@ -2276,7 +2276,7 @@ GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const
|
||||
GameObject* go = nullptr;
|
||||
Trinity::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> searcher(this, go, checker);
|
||||
VisitNearbyGridObject(range, searcher);
|
||||
Cell::VisitGridObjects(this, searcher, range);
|
||||
return go;
|
||||
}
|
||||
|
||||
@@ -2285,7 +2285,7 @@ GameObject* WorldObject::FindNearestGameObjectOfType(GameobjectTypes type, float
|
||||
GameObject* go = nullptr;
|
||||
Trinity::NearestGameObjectTypeInObjectRangeCheck checker(*this, type, range);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectTypeInObjectRangeCheck> searcher(this, go, checker);
|
||||
VisitNearbyGridObject(range, searcher);
|
||||
Cell::VisitGridObjects(this, searcher, range);
|
||||
return go;
|
||||
}
|
||||
|
||||
@@ -2295,7 +2295,7 @@ Player* WorldObject::SelectNearestPlayer(float distance) const
|
||||
|
||||
Trinity::NearestPlayerInObjectRangeCheck checker(this, distance);
|
||||
Trinity::PlayerLastSearcher<Trinity::NearestPlayerInObjectRangeCheck> searcher(this, target, checker);
|
||||
VisitNearbyObject(distance, searcher);
|
||||
Cell::VisitWorldObjects(this, searcher, distance)
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ inline CellArea Cell::CalculateCellArea(float x, float y, float radius)
|
||||
return CellArea(centerX, centerY);
|
||||
}
|
||||
|
||||
template<class T, class CONTAINER>
|
||||
inline void Cell::Visit(CellCoord const& standing_cell, TypeContainerVisitor<T, CONTAINER>& visitor, Map& map, WorldObject const& obj, float radius) const
|
||||
{
|
||||
//we should increase search radius by object's radius, otherwise
|
||||
|
||||
Reference in New Issue
Block a user