Proper importing for map entries.
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.Movie;
|
||||
@@ -127,13 +128,13 @@ public class SSQDisciplesNecropolisPast extends AbstractInstance
|
||||
protected void spawnNPC(InstanceWorld world)
|
||||
{
|
||||
final List<Npc> lilithGroup = new ArrayList<>();
|
||||
for (Map.Entry<Integer, Location> entry : LILITH_SPAWN.entrySet())
|
||||
for (Entry<Integer, Location> entry : LILITH_SPAWN.entrySet())
|
||||
{
|
||||
lilithGroup.add(addSpawn(entry.getKey(), entry.getValue(), false, 0, false, world.getInstanceId()));
|
||||
}
|
||||
world.setParameter("lilithGroup", lilithGroup);
|
||||
final List<Npc> anakimGroup = new ArrayList<>();
|
||||
for (Map.Entry<Integer, Location> entry : ANAKIM_SPAWN.entrySet())
|
||||
for (Entry<Integer, Location> entry : ANAKIM_SPAWN.entrySet())
|
||||
{
|
||||
anakimGroup.add(addSpawn(entry.getKey(), entry.getValue(), false, 0, false, world.getInstanceId()));
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package quests.Q00258_BringWolfPelts;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@@ -122,7 +123,7 @@ public class Q00258_BringWolfPelts extends Quest
|
||||
if (getQuestItemsCount(player, WOLF_PELT) >= WOLF_PELT_COUNT)
|
||||
{
|
||||
final int chance = getRandom(16);
|
||||
for (Map.Entry<Integer, Integer> reward : REWARDS.entrySet())
|
||||
for (Entry<Integer, Integer> reward : REWARDS.entrySet())
|
||||
{
|
||||
if (chance < reward.getValue())
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@@ -129,7 +130,7 @@ public class Q00264_KeenClaws extends Quest
|
||||
if (getQuestItemsCount(player, WOLF_CLAW) >= WOLF_CLAW_COUNT)
|
||||
{
|
||||
final int chance = getRandom(17);
|
||||
for (Map.Entry<Integer, List<ItemHolder>> reward : REWARDS.entrySet())
|
||||
for (Entry<Integer, List<ItemHolder>> reward : REWARDS.entrySet())
|
||||
{
|
||||
if (chance < reward.getKey())
|
||||
{
|
||||
|
||||
@@ -190,7 +190,7 @@ public class BotReportTable
|
||||
{
|
||||
st.execute(SQL_CLEAR_REPORTED_CHAR_DATA);
|
||||
|
||||
for (Map.Entry<Integer, ReportedCharData> entrySet : _reports.entrySet())
|
||||
for (Entry<Integer, ReportedCharData> entrySet : _reports.entrySet())
|
||||
{
|
||||
for (int reporterId : entrySet.getValue()._reporters.keySet())
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
@@ -139,9 +140,9 @@ public class SchemeBufferTable
|
||||
// Save _schemesTable content.
|
||||
try (PreparedStatement st = con.prepareStatement(INSERT_SCHEME))
|
||||
{
|
||||
for (Map.Entry<Integer, Map<String, List<Integer>>> player : _schemesTable.entrySet())
|
||||
for (Entry<Integer, Map<String, List<Integer>>> player : _schemesTable.entrySet())
|
||||
{
|
||||
for (Map.Entry<String, List<Integer>> scheme : player.getValue().entrySet())
|
||||
for (Entry<String, List<Integer>> scheme : player.getValue().entrySet())
|
||||
{
|
||||
// Build a String composed of skill ids seperated by a ",".
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
@@ -100,7 +101,7 @@ public class CHSiegeManager
|
||||
public SiegableHall getNearbyClanHall(int x, int y, int maxDist)
|
||||
{
|
||||
ClanHallZone zone = null;
|
||||
for (Map.Entry<Integer, SiegableHall> ch : _siegableHalls.entrySet())
|
||||
for (Entry<Integer, SiegableHall> ch : _siegableHalls.entrySet())
|
||||
{
|
||||
zone = ch.getValue().getZone();
|
||||
if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist))
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -602,7 +603,7 @@ public class CastleManorManager implements IXmlReader, IStorable
|
||||
ds.executeUpdate();
|
||||
|
||||
// Current production
|
||||
for (Map.Entry<Integer, List<SeedProduction>> entry : _production.entrySet())
|
||||
for (Entry<Integer, List<SeedProduction>> entry : _production.entrySet())
|
||||
{
|
||||
for (SeedProduction sp : entry.getValue())
|
||||
{
|
||||
@@ -617,7 +618,7 @@ public class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
|
||||
// Next production
|
||||
for (Map.Entry<Integer, List<SeedProduction>> entry : _productionNext.entrySet())
|
||||
for (Entry<Integer, List<SeedProduction>> entry : _productionNext.entrySet())
|
||||
{
|
||||
for (SeedProduction sp : entry.getValue())
|
||||
{
|
||||
@@ -638,7 +639,7 @@ public class CastleManorManager implements IXmlReader, IStorable
|
||||
dp.executeUpdate();
|
||||
|
||||
// Current procure
|
||||
for (Map.Entry<Integer, List<CropProcure>> entry : _procure.entrySet())
|
||||
for (Entry<Integer, List<CropProcure>> entry : _procure.entrySet())
|
||||
{
|
||||
for (CropProcure cp : entry.getValue())
|
||||
{
|
||||
@@ -654,7 +655,7 @@ public class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
|
||||
// Next procure
|
||||
for (Map.Entry<Integer, List<CropProcure>> entry : _procureNext.entrySet())
|
||||
for (Entry<Integer, List<CropProcure>> entry : _procureNext.entrySet())
|
||||
{
|
||||
for (CropProcure cp : entry.getValue())
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -224,7 +225,7 @@ public class ClanHallManager
|
||||
public AuctionableHall getNearbyClanHall(int x, int y, int maxDist)
|
||||
{
|
||||
ClanHallZone zone = null;
|
||||
for (Map.Entry<Integer, AuctionableHall> ch : _clanHall.entrySet())
|
||||
for (Entry<Integer, AuctionableHall> ch : _clanHall.entrySet())
|
||||
{
|
||||
zone = ch.getValue().getZone();
|
||||
if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist))
|
||||
@@ -232,7 +233,7 @@ public class ClanHallManager
|
||||
return ch.getValue();
|
||||
}
|
||||
}
|
||||
for (Map.Entry<Integer, AuctionableHall> ch : _freeClanHall.entrySet())
|
||||
for (Entry<Integer, AuctionableHall> ch : _freeClanHall.entrySet())
|
||||
{
|
||||
zone = ch.getValue().getZone();
|
||||
if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist))
|
||||
@@ -246,7 +247,7 @@ public class ClanHallManager
|
||||
public ClanHall getNearbyAbstractHall(int x, int y, int maxDist)
|
||||
{
|
||||
ClanHallZone zone = null;
|
||||
for (Map.Entry<Integer, ClanHall> ch : _allClanHalls.entrySet())
|
||||
for (Entry<Integer, ClanHall> ch : _allClanHalls.entrySet())
|
||||
{
|
||||
zone = ch.getValue().getZone();
|
||||
if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist))
|
||||
@@ -263,7 +264,7 @@ public class ClanHallManager
|
||||
*/
|
||||
public AuctionableHall getClanHallByOwner(Clan clan)
|
||||
{
|
||||
for (Map.Entry<Integer, AuctionableHall> ch : _clanHall.entrySet())
|
||||
for (Entry<Integer, AuctionableHall> ch : _clanHall.entrySet())
|
||||
{
|
||||
if (clan.getId() == ch.getValue().getOwnerId())
|
||||
{
|
||||
@@ -276,14 +277,14 @@ public class ClanHallManager
|
||||
public ClanHall getAbstractHallByOwner(Clan clan)
|
||||
{
|
||||
// Separate loops to avoid iterating over free clan halls
|
||||
for (Map.Entry<Integer, AuctionableHall> ch : _clanHall.entrySet())
|
||||
for (Entry<Integer, AuctionableHall> ch : _clanHall.entrySet())
|
||||
{
|
||||
if (clan.getId() == ch.getValue().getOwnerId())
|
||||
{
|
||||
return ch.getValue();
|
||||
}
|
||||
}
|
||||
for (Map.Entry<Integer, SiegableHall> ch : CHSiegeManager.getInstance().getConquerableHalls().entrySet())
|
||||
for (Entry<Integer, SiegableHall> ch : CHSiegeManager.getInstance().getConquerableHalls().entrySet())
|
||||
{
|
||||
if (clan.getId() == ch.getValue().getOwnerId())
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
@@ -256,7 +257,7 @@ public class SchemeBufferInstance extends Npc
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Map.Entry<String, List<Integer>> scheme : schemes.entrySet())
|
||||
for (Entry<String, List<Integer>> scheme : schemes.entrySet())
|
||||
{
|
||||
final int cost = getFee(scheme.getValue());
|
||||
sb.append("<font color=\"LEVEL\">" + scheme.getKey() + " [" + scheme.getValue().size() + " skill(s)]" + ((cost > 0) ? " - cost: " + NumberFormat.getInstance(Locale.ENGLISH).format(cost) : "") + "</font><br1>");
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
@@ -55,7 +56,7 @@ public class ExShowProcureCropDetail implements IClientOutgoingPacket
|
||||
packet.writeD(_cropId); // crop id
|
||||
packet.writeD(_castleCrops.size()); // size
|
||||
|
||||
for (Map.Entry<Integer, CropProcure> entry : _castleCrops.entrySet())
|
||||
for (Entry<Integer, CropProcure> entry : _castleCrops.entrySet())
|
||||
{
|
||||
final CropProcure crop = entry.getValue();
|
||||
packet.writeD(entry.getKey()); // manor name
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
@@ -55,7 +56,7 @@ public class PartyMemberPosition implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.PARTY_MEMBER_POSITION.writeId(packet);
|
||||
packet.writeD(locations.size());
|
||||
for (Map.Entry<Integer, Location> entry : locations.entrySet())
|
||||
for (Entry<Integer, Location> entry : locations.entrySet())
|
||||
{
|
||||
final Location loc = entry.getValue();
|
||||
packet.writeD(entry.getKey());
|
||||
|
||||
Reference in New Issue
Block a user