Jump to content
  • 0

Geoengine.java (Acis)


Question

Posted (edited)
Index: java/net/sf/l2j/gameserver/GeoEngine.java
===================================================================
--- java/net/sf/l2j/gameserver/GeoEngine.java	(revision 6)
+++ java/net/sf/l2j/gameserver/GeoEngine.java	(working copy)
@@ -34,6 +34,7 @@
 
 import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.datatables.DoorTable;
+import net.sf.l2j.gameserver.datatables.FenceTable;
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.L2Spawn;
 import net.sf.l2j.gameserver.model.L2World;
@@ -117,6 +118,9 @@
 		if (DoorTable.getInstance().checkIfDoorsBetween(cha.getX(), cha.getY(), cha.getZ(), target.getX(), target.getY(), target.getZ()))
 			return false;
 		
+		if (!FenceTable.canSeeTarget(cha, target.getX(), target.getY()))
+			return false;
+		
 		if (cha.getZ() >= target.getZ())
 			return canSeeTarget(cha.getX(), cha.getY(), cha.getZ(), target.getX(), target.getY(), target.getZ());
 		
@@ -166,9 +170,13 @@
 	@Override
 	public boolean canSeeTargetDebug(L2PcInstance gm, L2Object target)
 	{
+		if (!FenceTable.canSeeTarget(gm, target.getX(), target.getY()))
+			return false;
+		
 		// comments: see above
 		int z = gm.getZ() + 45;
 		int z2 = target.getZ() + 45;
+		
 		if (target instanceof L2DoorInstance)
 		{
 			gm.sendMessage("door always true");
@@ -207,6 +215,9 @@
 		if (DoorTable.getInstance().checkIfDoorsBetween(x, y, z, tx, ty, tz))
 			return startpoint;
 		
+		if (!FenceTable.canSeeTarget(x,y, tx, ty))
+			return startpoint;
+		
 		Location destiny = new Location(tx, ty, tz);
 		return moveCheck(startpoint, destiny, (x - L2World.MAP_MIN_X) >> 4, (y - L2World.MAP_MIN_Y) >> 4, z, (tx - L2World.MAP_MIN_X) >> 4, (ty - L2World.MAP_MIN_Y) >> 4, tz);
 	}

Hi, I'm adding the Phoenix engine event to the aCis 350 and some lines need to be added to the GeoEngine.java file, but that file does not exist, what should I do?

Edited by L2shaken

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..