From e3ad144108b708168d2f756e9677a54b5702269f Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 3 Oct 2020 10:40:50 +0000 Subject: [PATCH] Smaller hit range when the target is moving. --- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- .../java/org/l2jmobius/gameserver/ai/CreatureAI.java | 4 +--- 19 files changed, 19 insertions(+), 57 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 0cb364e8eb..22de59f51a 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java index d2b08d6b31..a723d01bef 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -977,11 +977,10 @@ public class CreatureAI extends AbstractAI return true; } // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius(target, offsetWithCollision + 100, false, false)) + if (!_actor.isInsideRadius(target, offsetWithCollision + 30, false, false)) { return true; } - stopFollow(); return false; } @@ -1009,7 +1008,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java index d2b08d6b31..a723d01bef 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -977,11 +977,10 @@ public class CreatureAI extends AbstractAI return true; } // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius(target, offsetWithCollision + 100, false, false)) + if (!_actor.isInsideRadius(target, offsetWithCollision + 30, false, false)) { return true; } - stopFollow(); return false; } @@ -1009,7 +1008,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 8f3de5d807..9312d20f99 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -1022,7 +1022,7 @@ public class CreatureAI extends AbstractAI if (getFollowTarget() != null) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -1038,7 +1038,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1068,7 +1067,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java index 8f3de5d807..9312d20f99 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -1022,7 +1022,7 @@ public class CreatureAI extends AbstractAI if (getFollowTarget() != null) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -1038,7 +1038,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1068,7 +1067,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java index f09c406ddb..4b936d610d 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/ai/CreatureAI.java @@ -973,7 +973,7 @@ public class CreatureAI extends AbstractAI if (isFollowing()) { // allow larger hit range when the target is moving (check is run only once per second) - if (!_actor.isInsideRadius2D(target, offsetWithCollision + 100)) + if (!_actor.isInsideRadius2D(target, offsetWithCollision + 30)) { return true; } @@ -989,7 +989,6 @@ public class CreatureAI extends AbstractAI { _actor.getAI().setIntention(AI_INTENTION_IDLE); } - return true; } @@ -1019,7 +1018,6 @@ public class CreatureAI extends AbstractAI { offset = 5; } - startFollow((Creature) target, offset); } else