コード例 #1
0
 public final ClanHall getNearbyAbstractHall(int x, int y, int maxDist) {
   L2ClanHallZone zone = null;
   for (Map.Entry<Integer, ClanHall> ch : _allClanHalls.entrySet()) {
     zone = ch.getValue().getZone();
     if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist)) {
       return ch.getValue();
     }
   }
   return null;
 }
コード例 #2
0
  public final AuctionableHall getNearbyClanHall(int x, int y, int maxDist) {
    L2ClanHallZone zone = null;

    for (Map.Entry<Integer, AuctionableHall> ch : _clanHall.entrySet()) {
      zone = ch.getValue().getZone();
      if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist)) {
        return ch.getValue();
      }
    }
    for (Map.Entry<Integer, AuctionableHall> ch : _freeClanHall.entrySet()) {
      zone = ch.getValue().getZone();
      if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist)) {
        return ch.getValue();
      }
    }
    return null;
  }