From 841d3213fde6cc20230dc40f4d4c01bc9f36030b Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Thu, 26 Apr 2018 15:26:26 +0000
Subject: [PATCH] L2Attackable no longer implements Runnable.
---
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 12 ++----------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
.../com/l2jmobius/gameserver/ai/L2AttackableAI.java | 11 ++---------
8 files changed, 16 insertions(+), 73 deletions(-)
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
index 6adf3caa8c..0364b1a0a2 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
@@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
/**
* This class manages AI of L2Attackable.
*/
-public class L2AttackableAI extends L2CharacterAI implements Runnable
+public class L2AttackableAI extends L2CharacterAI
{
private static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class.getName());
@@ -98,13 +98,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
_globalAggro = -10; // 10 seconds timeout of ATTACK after respawn
}
- @Override
- public void run()
- {
- // Launch actions corresponding to the Event Think
- onEvtThink();
- }
-
/**
* @param target The targeted WorldObject
* @return {@code true} if target can be auto attacked due aggression.
@@ -206,7 +199,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
- _aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
+ _aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
}
}
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
index 6adf3caa8c..0364b1a0a2 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
@@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
/**
* This class manages AI of L2Attackable.
*/
-public class L2AttackableAI extends L2CharacterAI implements Runnable
+public class L2AttackableAI extends L2CharacterAI
{
private static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class.getName());
@@ -98,13 +98,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
_globalAggro = -10; // 10 seconds timeout of ATTACK after respawn
}
- @Override
- public void run()
- {
- // Launch actions corresponding to the Event Think
- onEvtThink();
- }
-
/**
* @param target The targeted WorldObject
* @return {@code true} if target can be auto attacked due aggression.
@@ -206,7 +199,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
- _aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
+ _aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
}
}
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
index 6adf3caa8c..0364b1a0a2 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
@@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
/**
* This class manages AI of L2Attackable.
*/
-public class L2AttackableAI extends L2CharacterAI implements Runnable
+public class L2AttackableAI extends L2CharacterAI
{
private static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class.getName());
@@ -98,13 +98,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
_globalAggro = -10; // 10 seconds timeout of ATTACK after respawn
}
- @Override
- public void run()
- {
- // Launch actions corresponding to the Event Think
- onEvtThink();
- }
-
/**
* @param target The targeted WorldObject
* @return {@code true} if target can be auto attacked due aggression.
@@ -206,7 +199,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
- _aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
+ _aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
}
}
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
index 6adf3caa8c..0364b1a0a2 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
@@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
/**
* This class manages AI of L2Attackable.
*/
-public class L2AttackableAI extends L2CharacterAI implements Runnable
+public class L2AttackableAI extends L2CharacterAI
{
private static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class.getName());
@@ -98,13 +98,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
_globalAggro = -10; // 10 seconds timeout of ATTACK after respawn
}
- @Override
- public void run()
- {
- // Launch actions corresponding to the Event Think
- onEvtThink();
- }
-
/**
* @param target The targeted WorldObject
* @return {@code true} if target can be auto attacked due aggression.
@@ -206,7 +199,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
- _aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
+ _aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
}
}
diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
index 352d56547a..3b18c2df23 100644
--- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
+++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
@@ -58,7 +58,7 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType;
* This class manages AI of L2Attackable.
*
*/
-public class L2AttackableAI extends L2CharacterAI implements Runnable
+public class L2AttackableAI extends L2CharacterAI
{
// protected static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class);
@@ -90,13 +90,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
_globalAggro = -10; // 10 seconds timeout of ATTACK after respawn
}
- @Override
- public void run()
- {
- // Launch actions corresponding to the Event Think
- onEvtThink();
- }
-
/**
* Return True if the target is autoattackable (depends on the actor type).
*
@@ -312,10 +305,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
public synchronized void startAITask()
{
// If not idle - create an AI task (schedule onEvtThink repeatedly)
-
if (_aiTask == null)
{
- _aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
+ _aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
}
}
diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
index 0a4685c202..a8313d7326 100644
--- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
+++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java
@@ -69,7 +69,7 @@ import com.l2jmobius.gameserver.util.Util;
* This class manages AI of L2Attackable.
* @author Zoey76
*/
-public class L2AttackableAI extends L2CharacterAI implements Runnable
+public class L2AttackableAI extends L2CharacterAI
{
// private static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class.getName());
@@ -132,13 +132,6 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
_globalAggro = -10; // 10 seconds timeout of ATTACK after respawn
}
- @Override
- public void run()
- {
- // Launch actions corresponding to the Event Think
- onEvtThink();
- }
-
/**
* Actor is a L2GuardInstance :
*