Search in sources :

Example 51 with Pair

use of tools.Pair in project HeavenMS by ronancpl.

the class MapleItemInformationProvider method getAllEtcItems.

public List<Pair<Integer, String>> getAllEtcItems() {
    if (!itemNameCache.isEmpty()) {
        return itemNameCache;
    }
    List<Pair<Integer, String>> itemPairs = new ArrayList<>();
    MapleData itemsData;
    itemsData = stringData.getData("Etc.img").getChildByPath("Etc");
    for (MapleData itemFolder : itemsData.getChildren()) {
        itemPairs.add(new Pair<>(Integer.parseInt(itemFolder.getName()), MapleDataTool.getString("name", itemFolder, "NO-NAME")));
    }
    return itemPairs;
}
Also used : MapleData(provider.MapleData) ArrayList(java.util.ArrayList) Pair(tools.Pair)

Aggregations

Pair (tools.Pair)51 ArrayList (java.util.ArrayList)34 Point (java.awt.Point)16 Item (client.inventory.Item)15 LinkedList (java.util.LinkedList)12 MapleData (provider.MapleData)11 SQLException (java.sql.SQLException)10 PreparedStatement (java.sql.PreparedStatement)7 List (java.util.List)7 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)7 MobSkill (server.life.MobSkill)6 MapleCharacter (client.MapleCharacter)5 Connection (java.sql.Connection)5 ResultSet (java.sql.ResultSet)5 MapleMap (server.maps.MapleMap)5 LinkedHashMap (java.util.LinkedHashMap)4 CharacterIdChannelPair (net.server.channel.CharacterIdChannelPair)4 MaplePartyCharacter (net.server.world.MaplePartyCharacter)4 MapleStatEffect (server.MapleStatEffect)4 DatabaseConnection (tools.DatabaseConnection)4