Changed L2Character setIsRunning visibility to private.
This commit is contained in:
@@ -676,7 +676,10 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
// Set the AI Intention to AI_INTENTION_ACTIVE
|
||||
setIntention(AI_INTENTION_ACTIVE);
|
||||
|
||||
npc.setWalking();
|
||||
if (!_actor.isFakePlayer())
|
||||
{
|
||||
npc.setWalking();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -825,7 +825,7 @@ public class L2CharacterAI extends AbstractAI
|
||||
// Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die (broadcast)
|
||||
clientNotifyDead();
|
||||
|
||||
if (!_actor.isPlayable())
|
||||
if (!_actor.isPlayable() && !_actor.isFakePlayer())
|
||||
{
|
||||
_actor.setWalking();
|
||||
}
|
||||
|
@@ -299,7 +299,14 @@ public final class WalkingManager implements IGameXmlReader
|
||||
}
|
||||
|
||||
npc.sendDebugMessage("Starting to move at route '" + routeName + "'");
|
||||
npc.setIsRunning(node.runToLocation());
|
||||
if (node.runToLocation())
|
||||
{
|
||||
npc.setRunning();
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setWalking();
|
||||
}
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, node);
|
||||
walk.setWalkCheckTask(ThreadPoolManager.scheduleAtFixedRate(new StartMovingTask(npc, routeName), 60000, 60000)); // start walk check task, for resuming walk after fight
|
||||
|
||||
@@ -332,7 +339,14 @@ public final class WalkingManager implements IGameXmlReader
|
||||
walk.setBlocked(true);
|
||||
final L2NpcWalkerNode node = walk.getCurrentNode();
|
||||
npc.sendDebugMessage("Route '" + routeName + "', continuing to node " + walk.getCurrentNodeId());
|
||||
npc.setIsRunning(node.runToLocation());
|
||||
if (node.runToLocation())
|
||||
{
|
||||
npc.setRunning();
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setWalking();
|
||||
}
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, node);
|
||||
walk.setBlocked(false);
|
||||
walk.setStoppedByAttack(false);
|
||||
|
@@ -772,7 +772,10 @@ public class L2Attackable extends L2Npc
|
||||
((L2AttackableAI) getAI()).setGlobalAggro(-25);
|
||||
clearAggroList();
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
setWalking();
|
||||
if (!isFakePlayer())
|
||||
{
|
||||
setWalking();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -790,7 +793,10 @@ public class L2Attackable extends L2Npc
|
||||
((L2AttackableAI) getAI()).setGlobalAggro(-25);
|
||||
clearAggroList();
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
setWalking();
|
||||
if (!isFakePlayer())
|
||||
{
|
||||
setWalking();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1461,14 +1467,16 @@ public class L2Attackable extends L2Npc
|
||||
setScriptValue(0); // remove pvp flag
|
||||
setRunning(); // don't walk
|
||||
}
|
||||
else
|
||||
{
|
||||
setWalking();
|
||||
}
|
||||
|
||||
// Clear mod Seeded stat
|
||||
_seeded = false;
|
||||
_seed = null;
|
||||
_seederObjId = 0;
|
||||
|
||||
setWalking();
|
||||
|
||||
// check the region where this mob is, do not activate the AI if region is inactive.
|
||||
// if (!isInActiveRegion())
|
||||
// {
|
||||
@@ -1799,7 +1807,10 @@ public class L2Attackable extends L2Npc
|
||||
{
|
||||
((L2AttackableAI) getAI()).setGlobalAggro(-25);
|
||||
}
|
||||
setWalking();
|
||||
if (!isFakePlayer())
|
||||
{
|
||||
setWalking();
|
||||
}
|
||||
clearAggroList();
|
||||
}
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||
|
@@ -2307,7 +2307,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return _isRunning;
|
||||
}
|
||||
|
||||
public final void setIsRunning(boolean value)
|
||||
private final void setIsRunning(boolean value)
|
||||
{
|
||||
if (_isRunning == value)
|
||||
{
|
||||
@@ -2355,10 +2355,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
/** Set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance. */
|
||||
public final void setRunning()
|
||||
{
|
||||
if (!isRunning())
|
||||
{
|
||||
setIsRunning(true);
|
||||
}
|
||||
setIsRunning(true);
|
||||
}
|
||||
|
||||
public final boolean hasBlockActions()
|
||||
|
@@ -3199,7 +3199,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
{
|
||||
((L2Attackable) npc).addDamageHate(target, 0, desire);
|
||||
}
|
||||
npc.setIsRunning(true);
|
||||
npc.setRunning();
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
|
||||
@@ -3210,7 +3210,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
*/
|
||||
protected void addAttackDesire(L2Npc npc, L2Character target)
|
||||
{
|
||||
npc.setIsRunning(true);
|
||||
npc.setRunning();
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user