mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 04:59:41 -04:00
Scripts/Obsidian Sanctum: Fix portals not being visible
Change NearestGameObjectEntryInObjectRangeCheck to allow returning GameObject not spawned. Fixes other occurrences where a similar issue exists.
This commit is contained in:
@@ -2100,10 +2100,10 @@ Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive
|
||||
return creature;
|
||||
}
|
||||
|
||||
GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const
|
||||
GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range, bool spawnedOnly) const
|
||||
{
|
||||
GameObject* go = nullptr;
|
||||
Trinity::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range);
|
||||
Trinity::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range, spawnedOnly);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> searcher(this, go, checker);
|
||||
Cell::VisitGridObjects(this, searcher, range);
|
||||
return go;
|
||||
|
||||
Reference in New Issue
Block a user