Also check for valid Y and O coordinates in Unit::SetPosition. Fixes another loophole related to vmaps.

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-06-26 12:32:29 +02:00
parent 6693bf5092
commit fac0ff3232
+1 -1
View File
@@ -16270,7 +16270,7 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
bool Unit::SetPosition(float x, float y, float z, float orientation, bool teleport)
{
// prevent crash when a bad coord is sent by the client
if (!Trinity::IsValidMapCoord(x,y))
if (!Trinity::IsValidMapCoord(x,y,z,o))
{
sLog.outDebug("Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z);
return false;