Improved check (#1831)
- Increased the range in which we search for the desired gameobject - Added a check in case this gameobject exists
This commit is contained in:
parent
337820db0f
commit
e4c33b46cb
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue