From e4c33b46cbd0d78615b0d1402fb2532221d69bf9 Mon Sep 17 00:00:00 2001 From: Pondaveia <43385840+Pondaveia@users.noreply.github.com> Date: Sun, 26 May 2019 14:05:51 +0100 Subject: [PATCH] Improved check (#1831) - Increased the range in which we search for the desired gameobject - Added a check in case this gameobject exists --- .../scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 763ee850f..3b3cc27a7 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -771,9 +771,9 @@ public: for (uint8 i = 0; i < 12; ++i) { - if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i], 30)) + if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i], 100)) { - if (me->IsWithinDist(temp_prison, dist, false)) + if (temp_prison && me->IsWithinDist(temp_prison, dist, false)) { dist = me->GetDistance2d(temp_prison); prison = temp_prison;