mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Game: include addtional parameter in Object::GetPlayerListInGrid
(cherry picked from commit d49b6af71f)
This commit is contained in:
@@ -407,9 +407,9 @@ inline void GetGameObjectListWithEntryInGrid(Container& container, WorldObject*
|
||||
}
|
||||
|
||||
template <typename Container>
|
||||
inline void GetPlayerListInGrid(Container& container, WorldObject* source, float maxSearchRange)
|
||||
inline void GetPlayerListInGrid(Container& container, WorldObject* source, float maxSearchRange, bool alive = true)
|
||||
{
|
||||
source->GetPlayerListInGrid(container, maxSearchRange);
|
||||
source->GetPlayerListInGrid(container, maxSearchRange, alive);
|
||||
}
|
||||
|
||||
#endif // TRINITY_SCRIPTEDCREATURE_H
|
||||
|
||||
@@ -3192,9 +3192,9 @@ void WorldObject::GetCreatureListWithEntryInGrid(Container& creatureContainer, u
|
||||
}
|
||||
|
||||
template <typename Container>
|
||||
void WorldObject::GetPlayerListInGrid(Container& playerContainer, float maxSearchRange) const
|
||||
void WorldObject::GetPlayerListInGrid(Container& playerContainer, float maxSearchRange, bool alive /*= true*/) const
|
||||
{
|
||||
Trinity::AnyPlayerInObjectRangeCheck checker(this, maxSearchRange);
|
||||
Trinity::AnyPlayerInObjectRangeCheck checker(this, maxSearchRange, alive);
|
||||
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(this, playerContainer, checker);
|
||||
Cell::VisitWorldObjects(this, searcher, maxSearchRange);
|
||||
}
|
||||
@@ -3631,6 +3631,6 @@ template TC_GAME_API void WorldObject::GetCreatureListWithEntryInGrid(std::list<
|
||||
template TC_GAME_API void WorldObject::GetCreatureListWithEntryInGrid(std::deque<Creature*>&, uint32, float) const;
|
||||
template TC_GAME_API void WorldObject::GetCreatureListWithEntryInGrid(std::vector<Creature*>&, uint32, float) const;
|
||||
|
||||
template TC_GAME_API void WorldObject::GetPlayerListInGrid(std::list<Player*>&, float) const;
|
||||
template TC_GAME_API void WorldObject::GetPlayerListInGrid(std::deque<Player*>&, float) const;
|
||||
template TC_GAME_API void WorldObject::GetPlayerListInGrid(std::vector<Player*>&, float) const;
|
||||
template TC_GAME_API void WorldObject::GetPlayerListInGrid(std::list<Player*>&, float, bool) const;
|
||||
template TC_GAME_API void WorldObject::GetPlayerListInGrid(std::deque<Player*>&, float, bool) const;
|
||||
template TC_GAME_API void WorldObject::GetPlayerListInGrid(std::vector<Player*>&, float, bool) const;
|
||||
|
||||
@@ -644,7 +644,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
|
||||
void GetCreatureListWithEntryInGrid(Container& creatureContainer, uint32 entry, float maxSearchRange = 250.0f) const;
|
||||
|
||||
template <typename Container>
|
||||
void GetPlayerListInGrid(Container& playerContainer, float maxSearchRange) const;
|
||||
void GetPlayerListInGrid(Container& playerContainer, float maxSearchRange, bool alive = true) const;
|
||||
|
||||
void DestroyForNearbyPlayers();
|
||||
virtual void UpdateObjectVisibility(bool forced = true);
|
||||
|
||||
Reference in New Issue
Block a user