79 Set<MarketAPI> already =
new HashSet<MarketAPI>();
86 if (market.isHidden())
continue;
87 locationIdToMarket.
add(market.getContainingLocation().getId(), market);
93 if (market.isHidden())
continue;
94 if (market.getSize() <= 4)
continue;
95 if (market.isPlayerOwned())
continue;
96 if (already.contains(market))
continue;
106 for (
MarketAPI other : locationIdToMarket.
getList(market.getContainingLocation().getId())) {
107 if (market.getFaction() == other.getFaction() && already.contains(other)) {
112 float w = market.getSize() * 0.25f;
113 for (
MarketAPI other : locationIdToMarket.
getList(market.getContainingLocation().getId())) {
114 if (market.getFaction().isHostileTo(other.getFaction())) {
135 pickerWithPirateActivity.
add(market, w);
137 picker.
add(market, w);
144 float w = pickerWithPirateActivity.
getWeight(market);
145 if (market ==
null) {
146 market = picker.
pick();
152 if ((
float) Math.random() > w * 0.01f * probMult) {