Scripts/Serpentshrine Cavern: Fixed crashes caused by uninitialized variables, patch by PuniCZ
Closes #4988 Closes #5645
This commit is contained in:
@@ -608,15 +608,12 @@ public:
|
||||
|
||||
VashjGUID = 0;
|
||||
|
||||
for (int i = 0; i<8; ++i)//search for nearest waypoint (up on stairs)
|
||||
{
|
||||
if (!x || !y || !z)
|
||||
{
|
||||
x = ElementWPPos[i][0];
|
||||
y = ElementWPPos[i][1];
|
||||
z = ElementWPPos[i][2];
|
||||
}
|
||||
else
|
||||
x = ElementWPPos[0][0];
|
||||
y = ElementWPPos[0][1];
|
||||
z = ElementWPPos[0][2];
|
||||
|
||||
//search for nearest waypoint (up on stairs)
|
||||
for (uint32 i = 1; i < 8; ++i)
|
||||
{
|
||||
if (me->GetDistance(ElementWPPos[i][0], ElementWPPos[i][1], ElementWPPos[i][2]) < me->GetDistance(x, y, z))
|
||||
{
|
||||
@@ -625,7 +622,7 @@ public:
|
||||
z = ElementWPPos[i][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (instance)
|
||||
VashjGUID = instance->GetData64(DATA_LADYVASHJ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user