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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...