mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
@@ -677,3 +677,8 @@ void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& list, WorldObject*
|
||||
{
|
||||
source->GetGameObjectListWithEntryInGrid(list, entry, maxSearchRange);
|
||||
}
|
||||
|
||||
void GetPlayerListInGrid(std::list<Player*>& list, WorldObject* source, float maxSearchRange)
|
||||
{
|
||||
source->GetPlayerListInGrid(list, maxSearchRange);
|
||||
}
|
||||
|
||||
@@ -423,5 +423,6 @@ Creature* GetClosestCreatureWithEntry(WorldObject* source, uint32 entry, float m
|
||||
GameObject* GetClosestGameObjectWithEntry(WorldObject* source, uint32 entry, float maxSearchRange);
|
||||
void GetCreatureListWithEntryInGrid(std::list<Creature*>& list, WorldObject* source, uint32 entry, float maxSearchRange);
|
||||
void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& list, WorldObject* source, uint32 entry, float maxSearchRange);
|
||||
void GetPlayerListInGrid(std::list<Player*>& list, WorldObject* source, float maxSearchRange);
|
||||
|
||||
#endif // SCRIPTEDCREATURE_H_
|
||||
|
||||
@@ -2696,6 +2696,13 @@ void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& creatureL
|
||||
cell.Visit(pair, visitor, *(this->GetMap()), *this, maxSearchRange);
|
||||
}
|
||||
|
||||
void WorldObject::GetPlayerListInGrid(std::list<Player*>& playerList, float maxSearchRange) const
|
||||
{
|
||||
Trinity::AnyPlayerInObjectRangeCheck checker(this, maxSearchRange);
|
||||
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(this, playerList, checker);
|
||||
this->VisitNearbyWorldObject(maxSearchRange, searcher);
|
||||
}
|
||||
|
||||
/*
|
||||
namespace Trinity
|
||||
{
|
||||
|
||||
@@ -712,6 +712,7 @@ class WorldObject : public Object, public WorldLocation
|
||||
|
||||
void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& lList, uint32 uiEntry, float fMaxSearchRange) const;
|
||||
void GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, uint32 uiEntry, float fMaxSearchRange) const;
|
||||
void GetPlayerListInGrid(std::list<Player*>& lList, float fMaxSearchRange) const;
|
||||
|
||||
void DestroyForNearbyPlayers();
|
||||
virtual void UpdateObjectVisibility(bool forced = true);
|
||||
|
||||
Reference in New Issue
Block a user