L2Attackable no longer implements Runnable.
This commit is contained in:
parent
8f200b5606
commit
841d3213fd
@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
/**
|
/**
|
||||||
* This class manages AI of L2Attackable.
|
* 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());
|
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
|
_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
|
* @param target The targeted WorldObject
|
||||||
* @return {@code true} if target can be auto attacked due aggression.
|
* @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 not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
/**
|
/**
|
||||||
* This class manages AI of L2Attackable.
|
* 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());
|
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
|
_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
|
* @param target The targeted WorldObject
|
||||||
* @return {@code true} if target can be auto attacked due aggression.
|
* @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 not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
/**
|
/**
|
||||||
* This class manages AI of L2Attackable.
|
* 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());
|
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
|
_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
|
* @param target The targeted WorldObject
|
||||||
* @return {@code true} if target can be auto attacked due aggression.
|
* @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 not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
/**
|
/**
|
||||||
* This class manages AI of L2Attackable.
|
* 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());
|
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
|
_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
|
* @param target The targeted WorldObject
|
||||||
* @return {@code true} if target can be auto attacked due aggression.
|
* @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 not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ import com.l2jmobius.gameserver.templates.item.L2WeaponType;
|
|||||||
* This class manages AI of L2Attackable.<BR>
|
* This class manages AI of L2Attackable.<BR>
|
||||||
* <BR>
|
* <BR>
|
||||||
*/
|
*/
|
||||||
public class L2AttackableAI extends L2CharacterAI implements Runnable
|
public class L2AttackableAI extends L2CharacterAI
|
||||||
{
|
{
|
||||||
// protected static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class);
|
// 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
|
_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>
|
* Return True if the target is autoattackable (depends on the actor type).<BR>
|
||||||
* <BR>
|
* <BR>
|
||||||
@ -312,10 +305,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
|||||||
public synchronized void startAITask()
|
public synchronized void startAITask()
|
||||||
{
|
{
|
||||||
// If not idle - create an AI task (schedule onEvtThink repeatedly)
|
// If not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
|
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
* This class manages AI of L2Attackable.
|
* This class manages AI of L2Attackable.
|
||||||
* @author Zoey76
|
* @author Zoey76
|
||||||
*/
|
*/
|
||||||
public class L2AttackableAI extends L2CharacterAI implements Runnable
|
public class L2AttackableAI extends L2CharacterAI
|
||||||
{
|
{
|
||||||
// private static final Logger LOGGER = Logger.getLogger(L2AttackableAI.class.getName());
|
// 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
|
_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>
|
* <B><U> Actor is a L2GuardInstance</U> :</B>
|
||||||
* <ul>
|
* <ul>
|
||||||
@ -323,7 +316,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
|||||||
// If not idle - create an AI task (schedule onEvtThink repeatedly)
|
// If not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
/**
|
/**
|
||||||
* This class manages AI of L2Attackable.
|
* 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());
|
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
|
_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
|
* @param target The targeted WorldObject
|
||||||
* @return {@code true} if target can be auto attacked due aggression.
|
* @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 not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import com.l2jmobius.gameserver.util.Util;
|
|||||||
/**
|
/**
|
||||||
* This class manages AI of L2Attackable.
|
* 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());
|
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
|
_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
|
* @param target The targeted WorldObject
|
||||||
* @return {@code true} if target can be auto attacked due aggression.
|
* @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 not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||||
if (_aiTask == null)
|
if (_aiTask == null)
|
||||||
{
|
{
|
||||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
_aiTask = ThreadPool.scheduleAtFixedRate(this::onEvtThink, 1000, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user