From 11d68b53749731b3711b1a4667af13e5635b2b31 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 12 Nov 2017 03:00:23 +0000 Subject: [PATCH] Using a break to avoid extensive loop. --- .../dist/game/data/scripts/ai/others/SiegeGuards.java | 1 + .../dist/game/data/scripts/ai/others/SiegeGuards.java | 1 + .../dist/game/data/scripts/ai/others/SiegeGuards.java | 1 + .../dist/game/data/scripts/ai/others/SiegeGuards.java | 1 + .../dist/game/data/scripts/ai/others/SiegeGuards.java | 1 + 5 files changed, 5 insertions(+) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/SiegeGuards.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/SiegeGuards.java index 8a31ce356b..0ff34a2580 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/SiegeGuards.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/SiegeGuards.java @@ -118,6 +118,7 @@ public class SiegeGuards extends AbstractNpcAI if (!pl.isInvisible() && !pl.isInvul()) // skip invisible players { addAttackPlayerDesire(npc, pl); + break; // no need to search more } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/SiegeGuards.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/SiegeGuards.java index 8a31ce356b..0ff34a2580 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/SiegeGuards.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/SiegeGuards.java @@ -118,6 +118,7 @@ public class SiegeGuards extends AbstractNpcAI if (!pl.isInvisible() && !pl.isInvul()) // skip invisible players { addAttackPlayerDesire(npc, pl); + break; // no need to search more } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/SiegeGuards.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/SiegeGuards.java index 8a31ce356b..0ff34a2580 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/SiegeGuards.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/SiegeGuards.java @@ -118,6 +118,7 @@ public class SiegeGuards extends AbstractNpcAI if (!pl.isInvisible() && !pl.isInvul()) // skip invisible players { addAttackPlayerDesire(npc, pl); + break; // no need to search more } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/SiegeGuards.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/SiegeGuards.java index 8a31ce356b..0ff34a2580 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/SiegeGuards.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/SiegeGuards.java @@ -118,6 +118,7 @@ public class SiegeGuards extends AbstractNpcAI if (!pl.isInvisible() && !pl.isInvul()) // skip invisible players { addAttackPlayerDesire(npc, pl); + break; // no need to search more } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/SiegeGuards.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/SiegeGuards.java index 6b2fe1c7ba..2b9d377321 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/SiegeGuards.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/SiegeGuards.java @@ -92,6 +92,7 @@ public class SiegeGuards extends AbstractNpcAI if (!pl.isInvisible() && !pl.isInvul()) // skip invisible players { addAttackPlayerDesire(npc, pl); + break; // no need to search more } } }