L2Attackable no longer implements Runnable.

This commit is contained in:
MobiusDev
2018-04-26 15:26:26 +00:00
parent 8f200b5606
commit 841d3213fd
8 changed files with 16 additions and 73 deletions

View File

@@ -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();
}
/**
* <B><U> Actor is a L2GuardInstance</U> :</B>
* <ul>
@@ -323,7 +316,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);
}
}