Working implementation of hasRandomAnimation method.
This commit is contained in:
parent
fe146ca4e4
commit
eff982c293
@ -35,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ChestInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.DoorInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FestivalMonsterInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FolkInstance;
|
||||
@ -540,7 +539,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
}
|
||||
// Order to the MonsterInstance to random walk (1/100)
|
||||
else if (!(npc instanceof ChestInstance) && (npc.getSpawn() != null) && (Rnd.get(RANDOM_WALK_RATE) == 0))
|
||||
else if (npc.hasRandomAnimation() && (npc.getSpawn() != null) && (Rnd.get(RANDOM_WALK_RATE) == 0))
|
||||
{
|
||||
int x1;
|
||||
int y1;
|
||||
|
@ -2743,7 +2743,7 @@ public class Attackable extends NpcInstance
|
||||
@Override
|
||||
public boolean hasRandomAnimation()
|
||||
{
|
||||
return (Config.MAX_MONSTER_ANIMATION > 0) && !(this instanceof GrandBossInstance);
|
||||
return (Config.MAX_MONSTER_ANIMATION > 0) && isMonster() && !(this instanceof GrandBossInstance);
|
||||
}
|
||||
|
||||
protected void setCommandChannelTimer(CommandChannelTimer commandChannelTimer)
|
||||
|
@ -35,7 +35,6 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ChestInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.DoorInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FestivalMonsterInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FolkInstance;
|
||||
@ -540,7 +539,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
}
|
||||
// Order to the MonsterInstance to random walk (1/100)
|
||||
else if (!(npc instanceof ChestInstance) && (npc.getSpawn() != null) && (Rnd.get(RANDOM_WALK_RATE) == 0))
|
||||
else if (npc.hasRandomAnimation() && (npc.getSpawn() != null) && (Rnd.get(RANDOM_WALK_RATE) == 0))
|
||||
{
|
||||
int x1;
|
||||
int y1;
|
||||
|
@ -3095,7 +3095,7 @@ public class Attackable extends NpcInstance
|
||||
@Override
|
||||
public boolean hasRandomAnimation()
|
||||
{
|
||||
return (Config.MAX_MONSTER_ANIMATION > 0) && !(this instanceof GrandBossInstance);
|
||||
return (Config.MAX_MONSTER_ANIMATION > 0) && isMonster() && !(this instanceof GrandBossInstance);
|
||||
}
|
||||
|
||||
protected void setCommandChannelTimer(CommandChannelTimer commandChannelTimer)
|
||||
|
Loading…
Reference in New Issue
Block a user