public int GetCastleId() { int castle_id = 0; if (GetWarType() == 1) { L1Clan clan = L1World.getInstance().getClan(GetDefenceClanName()); if (clan != null) { castle_id = clan.getCastleId(); } } return castle_id; }
public L1Castle GetCastle() { L1Castle l1castle = null; if (GetWarType() == 1) { L1Clan clan = L1World.getInstance().getClan(GetDefenceClanName()); if (clan != null) { int castle_id = clan.getCastleId(); l1castle = CastleTable.getInstance().getCastleTable(castle_id); } } return l1castle; }