Use ILocational parameter for onIntentionMoveTo method.

This commit is contained in:
MobiusDevelopment
2019-05-17 13:14:05 +00:00
parent 2b5c29815e
commit 6ec34f6f79
52 changed files with 91 additions and 78 deletions

View File

@@ -289,7 +289,7 @@ public abstract class AbstractAI implements Ctrl
}
case AI_INTENTION_MOVE_TO:
{
onIntentionMoveTo((Location) arg0);
onIntentionMoveTo((ILocational) arg0);
break;
}
case AI_INTENTION_FOLLOW:
@@ -487,7 +487,7 @@ public abstract class AbstractAI implements Ctrl
protected abstract void onIntentionCast(Skill skill, WorldObject target);
protected abstract void onIntentionMoveTo(Location destination);
protected abstract void onIntentionMoveTo(ILocational destination);
protected abstract void onIntentionFollow(Creature target);

View File

@@ -342,7 +342,7 @@ public class CreatureAI extends AbstractAI
* </ul>
*/
@Override
protected void onIntentionMoveTo(Location loc)
protected void onIntentionMoveTo(ILocational loc)
{
if ((getIntention() == AI_INTENTION_REST) || _actor.isAllSkillsDisabled() || _actor.isCastingNow())
{

View File

@@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.DefenderInstance;
import org.l2jmobius.gameserver.model.actor.instance.DoorInstance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.skills.Skill;
/**
@@ -61,7 +62,7 @@ public class DoorAI extends CreatureAI
}
@Override
protected void onIntentionMoveTo(Location destination)
protected void onIntentionMoveTo(ILocational destination)
{
}

View File

@@ -24,12 +24,12 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_MOVE_TO;
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_PICK_UP;
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.actor.instance.StaticObjectInstance;
import org.l2jmobius.gameserver.model.entity.Duel;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.targets.TargetType;
import org.l2jmobius.gameserver.network.SystemMessageId;
@@ -182,7 +182,7 @@ public class PlayerAI extends PlayableAI
* </ul>
*/
@Override
protected void onIntentionMoveTo(Location loc)
protected void onIntentionMoveTo(ILocational loc)
{
if (getIntention() == AI_INTENTION_REST)
{