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:
jackpoz
2020-09-04 22:01:25 +02:00
parent a58aeb41f4
commit ca2159bf40
6 changed files with 10 additions and 9 deletions

View File

@@ -413,7 +413,7 @@ public:
break;
case SAY_PRIESTESS_ALTAR_8:
// make the gem respawn
if (GameObject* gem = GetClosestGameObjectWithEntry(me, GO_ELUNE_GEM, 10.0f))
if (GameObject* gem = GetClosestGameObjectWithEntry(me, GO_ELUNE_GEM, 10.0f, false))
{
if (gem->isSpawned())
break;

View File

@@ -251,7 +251,7 @@ struct dummy_dragonAI : public ScriptedAI
// using a grid search here seem to be more efficient than caching all four guids
// in instance script and calculate range to each.
GameObject* portal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL, 50.0f);
GameObject* portal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL, 50.0f, false);
switch (me->GetEntry())
{