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

@@ -58,7 +58,7 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType;
* This class manages AI of L2Attackable.<BR>
* <BR>
*/
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).<BR>
* <BR>
@@ -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);
}
}