Fixed capturing holy artefact under the shrine.
Thanks to Sahar.
This commit is contained in:
@ -356,7 +356,7 @@ public class GeoEngine
|
||||
*/
|
||||
public boolean canSeeTarget(WorldObject origin, WorldObject target)
|
||||
{
|
||||
if (target.isDoor())
|
||||
if (target.isDoor() || target.isArtefact())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class TakeCastle implements ISkillHandler
|
||||
{
|
||||
sm.addString("You must be on castle ground to use this skill");
|
||||
}
|
||||
else if ((player.getTarget() == null) || !(player.getTarget() instanceof ArtefactInstance))
|
||||
else if ((player.getTarget() == null) || !player.getTarget().isArtefact())
|
||||
{
|
||||
sm.addString("You can only use this skill on an artifact");
|
||||
}
|
||||
@ -142,7 +142,7 @@ public class TakeCastle implements ISkillHandler
|
||||
{
|
||||
sm.addString("You can only use this skill during a siege.");
|
||||
}
|
||||
else if (!Util.checkIfInRange(200, player, player.getTarget(), true))
|
||||
else if (!Util.checkIfInRange(200, player, player.getTarget(), true) || (Math.abs(player.getZ() - player.getTarget().getZ()) > 40))
|
||||
{
|
||||
sm.addString("You are not in range of the artifact.");
|
||||
}
|
||||
@ -186,7 +186,7 @@ public class TakeCastle implements ISkillHandler
|
||||
{
|
||||
sm.addString("You must be on fort ground to use this skill");
|
||||
}
|
||||
else if ((player.getTarget() == null) && !(player.getTarget() instanceof ArtefactInstance))
|
||||
else if ((player.getTarget() == null) && !player.getTarget().isArtefact())
|
||||
{
|
||||
sm.addString("You can only use this skill on an flagpole");
|
||||
}
|
||||
|
@ -47,10 +47,12 @@ public class ArtefactInstance extends NpcInstance
|
||||
super(objectId, template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return False.<BR>
|
||||
* <BR>
|
||||
*/
|
||||
@Override
|
||||
public boolean isArtefact()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoAttackable(Creature attacker)
|
||||
{
|
||||
@ -122,10 +124,4 @@ public class ArtefactInstance extends NpcInstance
|
||||
{
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isArtefact()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user