Przeglądaj źródła

BETA/STABLE: checkTargetLost - Geocheck for offensive skills (by Gnacik).

MELERIX 14 lat temu
rodzic
commit
b72c67537c

+ 6 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2CharacterAI.java

@@ -28,6 +28,7 @@ import java.util.List;
 
 import javolution.util.FastList;
 
+import com.l2jserver.Config;
 import com.l2jserver.gameserver.GeoData;
 import com.l2jserver.gameserver.model.L2CharPosition;
 import com.l2jserver.gameserver.model.L2Effect;
@@ -1103,6 +1104,11 @@ public class L2CharacterAI extends AbstractAI
 			setIntention(AI_INTENTION_ACTIVE);
 			return true;
 		}
+		if (_actor != null && _skill != null && _skill.isOffensive() && _skill.getSkillRadius() > 0 && Config.GEODATA > 0 && !GeoData.getInstance().canSeeTarget(_actor, target))
+		{
+			setIntention(AI_INTENTION_ACTIVE);
+			return true;
+		}
 		return false;
 	}