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

@ -196,7 +196,7 @@ public abstract class AbstractAI implements Ctrl
}
case AI_INTENTION_MOVE_TO:
{
onIntentionMoveTo((Location) args[0]);
onIntentionMoveTo((ILocational) args[0]);
break;
}
case AI_INTENTION_FOLLOW:
@ -376,7 +376,7 @@ public abstract class AbstractAI implements Ctrl
protected abstract void onIntentionCast(Skill skill, WorldObject target, ItemInstance item, boolean forceUse, boolean dontMove);
protected abstract void onIntentionMoveTo(Location destination);
protected abstract void onIntentionMoveTo(ILocational destination);
protected abstract void onIntentionFollow(Creature target);

View File

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

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.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.skills.Skill;
@ -62,7 +63,7 @@ public class DoorAI extends CreatureAI
}
@Override
protected void onIntentionMoveTo(Location destination)
protected void onIntentionMoveTo(ILocational destination)
{
}

View File

@ -24,11 +24,11 @@ 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.interfaces.ILocational;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.model.skills.targets.TargetType;
@ -206,7 +206,7 @@ public class PlayerAI extends PlayableAI
* </ul>
*/
@Override
protected void onIntentionMoveTo(Location loc)
protected void onIntentionMoveTo(ILocational loc)
{
if (getIntention() == AI_INTENTION_REST)
{