Proper importing for map entries.
This commit is contained in:
@@ -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();
|
||||
|
@@ -22,6 +22,7 @@ import java.sql.ResultSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
@@ -211,7 +212,7 @@ public class ClanHallManager
|
||||
public ClanHall getNearbyClanHall(int x, int y, int maxDist)
|
||||
{
|
||||
ClanHallZone zone = null;
|
||||
for (Map.Entry<Integer, ClanHall> ch : _clanHall.entrySet())
|
||||
for (Entry<Integer, ClanHall> ch : _clanHall.entrySet())
|
||||
{
|
||||
zone = ch.getValue().getZone();
|
||||
if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist))
|
||||
@@ -219,7 +220,7 @@ public class ClanHallManager
|
||||
return ch.getValue();
|
||||
}
|
||||
}
|
||||
for (Map.Entry<Integer, ClanHall> ch : _freeClanHall.entrySet())
|
||||
for (Entry<Integer, ClanHall> ch : _freeClanHall.entrySet())
|
||||
{
|
||||
zone = ch.getValue().getZone();
|
||||
if ((zone != null) && (zone.getDistanceToZone(x, y) < maxDist))
|
||||
@@ -236,7 +237,7 @@ public class ClanHallManager
|
||||
*/
|
||||
public ClanHall getClanHallByOwner(Clan clan)
|
||||
{
|
||||
for (Map.Entry<Integer, ClanHall> ch : _clanHall.entrySet())
|
||||
for (Entry<Integer, ClanHall> ch : _clanHall.entrySet())
|
||||
{
|
||||
if (clan.getClanId() == ch.getValue().getOwnerId())
|
||||
{
|
||||
|
@@ -23,6 +23,7 @@ import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Future;
|
||||
@@ -263,7 +264,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// Copy the skills of the NPCInstance from its template to the Creature Instance
|
||||
// The skills list can be affected by spell effects so it's necessary to make a copy to avoid that a spell affecting a NPCInstance, affects others NPCInstance of the same type too.
|
||||
_skills = ((NpcTemplate) template).getSkills();
|
||||
for (Map.Entry<Integer, Skill> skill : _skills.entrySet())
|
||||
for (Entry<Integer, Skill> skill : _skills.entrySet())
|
||||
{
|
||||
addStatFuncs(skill.getValue().getStatFuncs(null, this));
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
@@ -240,7 +241,7 @@ public class SchemeBufferInstance extends FolkInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Map.Entry<String, List<Integer>> scheme : schemes.entrySet())
|
||||
for (Entry<String, List<Integer>> scheme : schemes.entrySet())
|
||||
{
|
||||
final int cost = getFee(scheme.getValue());
|
||||
StringUtil.append(sb, "<font color=\"LEVEL\">", scheme.getKey(), " [", scheme.getValue().size(), " / ", player.getMaxBuffCount(), "]", ((cost > 0) ? " - cost: " + StringUtil.formatNumber(cost) : ""), "</font><br1>");
|
||||
|
@@ -23,6 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
@@ -461,7 +462,7 @@ public class ClanHall
|
||||
{
|
||||
_ownerId = 0;
|
||||
_isFree = true;
|
||||
for (Map.Entry<Integer, ClanHallFunction> fc : _functions.entrySet())
|
||||
for (Entry<Integer, ClanHallFunction> fc : _functions.entrySet())
|
||||
{
|
||||
removeFunction(fc.getKey());
|
||||
}
|
||||
|
@@ -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;
|
||||
@@ -56,7 +57,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());
|
||||
|
@@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.taskmanager.tasks;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
@@ -54,7 +55,7 @@ public class TaskRaidPointsReset extends Task
|
||||
final Map<Integer, Integer> rankList = RaidBossPointsManager.getRankList();
|
||||
for (Clan c : ClanTable.getInstance().getClans())
|
||||
{
|
||||
for (Map.Entry<Integer, Integer> entry : rankList.entrySet())
|
||||
for (Entry<Integer, Integer> entry : rankList.entrySet())
|
||||
{
|
||||
final WorldObject obj = World.getInstance().findObject(entry.getKey());
|
||||
if (obj instanceof PlayerInstance)
|
||||
|
Reference in New Issue
Block a user