if (clan == null)
{
activeChar.sendPacket(Msg.NOT_JOINED_IN_ANY_CLAN);
return false;
}
SystemMessage sm;
List<Clan> data = new ArrayList<>();
if (id == 88)
{
activeChar.sendPacket(Msg._ATTACK_LIST_);
data = clan.getEnemyClans();
}
else if (id == 89)
{
activeChar.sendPacket(Msg._UNDER_ATTACK_LIST_);
data = clan.getAttackerClans();
}
else
{
activeChar.sendPacket(Msg._WAR_LIST_);
for (Clan c : clan.getEnemyClans())
{
if (clan.getAttackerClans().contains(c))
{
data.add(c);
}
}
}
for (Clan c : data)
{
String clanName = c.getName();
Alliance alliance = c.getAlliance();
if (alliance != null)
{
sm = new SystemMessage(SystemMessage.S1_S2_ALLIANCE).addString(clanName).addString(alliance.getAllyName());
}
else
{
sm = new SystemMessage(SystemMessage.S1_NO_ALLIANCE_EXISTS).addString(clanName);
}
activeChar.sendPacket(sm);
}
activeChar.sendPacket(Msg.__EQUALS__);
return true;