case OUTPOST:
case NORMAL:
case ADVANCED:
if (player.isInZone(Zone.ZoneType.RESIDENCE))
{
player.sendPacket(SystemMsg.YOU_CANNOT_SET_UP_A_BASE_HERE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
return false;
}
SiegeEvent<?, ?> siegeEvent = activeChar.getEvent(SiegeEvent.class);
if (siegeEvent == null)
{
player.sendPacket(SystemMsg.YOU_CANNOT_SET_UP_A_BASE_HERE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
return false;
}
boolean inZone = false;
List<ZoneObject> zones = siegeEvent.getObjects(SiegeEvent.FLAG_ZONES);
for (ZoneObject zone : zones)
{
if (player.isInZone(zone.getZone()))
{
inZone = true;
}
}
if (!inZone)
{
player.sendPacket(SystemMsg.YOU_CANNOT_SET_UP_A_BASE_HERE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
return false;
}
SiegeClanObject siegeClan = siegeEvent.getSiegeClan(SiegeEvent.ATTACKERS, player.getClan());
if (siegeClan == null)
{
player.sendPacket(SystemMsg.YOU_CANNOT_SUMMON_THE_ENCAMPMENT_BECAUSE_YOU_ARE_NOT_A_MEMBER_OF_THE_SIEGE_CLAN_INVOLVED_IN_THE_CASTLE__FORTRESS__HIDEOUT_SIEGE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
return false;
}
if (siegeClan.getFlag() != null)
{
player.sendPacket(SystemMsg.AN_OUTPOST_OR_HEADQUARTERS_CANNOT_BE_BUILT_BECAUSE_ONE_ALREADY_EXISTS, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
return false;
}
break;
}
return true;