LoS walls implementation.

This commit is contained in:
MobiusDev
2016-02-15 20:44:03 +00:00
parent 6df805ebe1
commit 9d16ffad23
13 changed files with 394 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ import com.l2jmobius.Config;
import com.l2jmobius.commons.geodriver.Cell;
import com.l2jmobius.commons.geodriver.GeoDriver;
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
import com.l2jmobius.gameserver.data.xml.impl.WallData;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.Location;
@@ -280,6 +281,10 @@ public class GeoData
{
return false;
}
if (WallData.getInstance().checkIfWallsBetween(x, y, z, tx, ty, tz))
{
return false;
}
return canSeeTarget(x, y, z, tx, ty, tz);
}
@@ -470,6 +475,10 @@ public class GeoData
{
return new Location(x, y, getHeight(x, y, z));
}
if (WallData.getInstance().checkIfWallsBetween(x, y, z, tx, ty, tz))
{
return new Location(x, y, getHeight(x, y, z));
}
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// first point is guaranteed to be available
@@ -532,6 +541,10 @@ public class GeoData
{
return false;
}
if (WallData.getInstance().checkIfWallsBetween(fromX, fromY, fromZ, toX, toY, toZ))
{
return false;
}
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
// first point is guaranteed to be available