Fixed capturing holy artefact under the shrine.
Thanks to Sahar.
This commit is contained in:
@ -358,7 +358,7 @@ public class GeoEngine
|
||||
*/
|
||||
public boolean canSeeTarget(WorldObject origin, WorldObject target)
|
||||
{
|
||||
if (target.isDoor() || (target.isCreature() && ((Creature) target).isFlying()))
|
||||
if (target.isDoor() || target.isArtefact() || (target.isCreature() && ((Creature) target).isFlying()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -292,6 +292,15 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if object is instance of ArtefactInstance.
|
||||
* @return {@code true} if object is instance of ArtefactInstance, {@code false} otherwise
|
||||
*/
|
||||
public boolean isArtefact()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if object is instance of MonsterInstance.
|
||||
* @return {@code true} if object is instance of MonsterInstance, {@code false} otherwise
|
||||
|
@ -54,9 +54,12 @@ public class ArtefactInstance extends Npc
|
||||
getCastle().registerArtefact(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return False.
|
||||
*/
|
||||
@Override
|
||||
public boolean isArtefact()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoAttackable(Creature attacker)
|
||||
{
|
||||
|
Reference in New Issue
Block a user