private int hasCastle, hasHideout, hasFortress, atWar;
private List<PledgeMemberInfo> infos = new ArrayList<PledgeMemberInfo>();
public GMViewPledgeInfo(Player activeChar)
{
Clan clan = activeChar.getClan();
for (UnitMember member : clan)
{
if (member == null)
continue;
char_name = member.getName();
clan_level = member.getLevel();
clan_id = member.getClassId();
clan_crest_id = member.isOnline() ? member.getObjectId() : 0;
rep = member.getSponsor() != 0 ? 1 : 0;
infos.add(new PledgeMemberInfo(char_name, clan_level, clan_id, clan_crest_id, member.getSex(), 1, rep));
}
char_name = activeChar.getName();
clan_id = clan.getClanId();
clan_name = clan.getName();
leader_name = clan.getLeaderName();
clan_crest_id = clan.getCrestId();
clan_level = clan.getLevel();
hasCastle = clan.getCastle();
hasHideout = clan.getHasHideout();
hasFortress = clan.getHasFortress();
rank = clan.getRank();
rep = clan.getReputationScore();
ally_id = clan.getAllyId();
if (clan.getAlliance() != null)
{
ally_name = clan.getAlliance().getAllyName();
ally_crest_id = clan.getAlliance().getAllyCrestId();
}
else
{
ally_name = "";
ally_crest_id = 0;
}
atWar = clan.isAtWar();
}