Search in sources :

Example 46 with MapleData

use of provider.MapleData in project HeavenMS by ronancpl.

the class MapleItemInformationProvider method isPartyQuestItem.

public boolean isPartyQuestItem(int itemId) {
    if (isPartyQuestItemCache.containsKey(itemId)) {
        return isPartyQuestItemCache.get(itemId);
    }
    MapleData data = getItemData(itemId);
    boolean partyquestItem = (data != null && MapleDataTool.getIntConvert("info/pquest", data, 0) == 1);
    isPartyQuestItemCache.put(itemId, partyquestItem);
    return partyquestItem;
}
Also used : MapleData(provider.MapleData)

Example 47 with MapleData

use of provider.MapleData in project HeavenMS by ronancpl.

the class MapleItemInformationProvider method getWatkForProjectile.

public int getWatkForProjectile(int itemId) {
    Integer atk = projectileWatkCache.get(itemId);
    if (atk != null) {
        return atk.intValue();
    }
    MapleData data = getItemData(itemId);
    atk = Integer.valueOf(MapleDataTool.getInt("info/incPAD", data, 0));
    projectileWatkCache.put(itemId, atk);
    return atk.intValue();
}
Also used : MapleData(provider.MapleData)

Example 48 with MapleData

use of provider.MapleData in project HeavenMS by ronancpl.

the class MapleItemInformationProvider method getWholePrice.

public int getWholePrice(int itemId) {
    if (wholePriceCache.containsKey(itemId)) {
        return wholePriceCache.get(itemId);
    }
    MapleData item = getItemData(itemId);
    if (item == null) {
        return -1;
    }
    int pEntry;
    MapleData pData = item.getChildByPath("info/price");
    if (pData == null) {
        return -1;
    }
    pEntry = MapleDataTool.getInt(pData);
    wholePriceCache.put(itemId, pEntry);
    return pEntry;
}
Also used : MapleData(provider.MapleData)

Example 49 with MapleData

use of provider.MapleData in project HeavenMS by ronancpl.

the class MapleItemInformationProvider method isQuestItem.

public boolean isQuestItem(int itemId) {
    if (isQuestItemCache.containsKey(itemId)) {
        return isQuestItemCache.get(itemId);
    }
    MapleData data = getItemData(itemId);
    boolean questItem = (data != null && MapleDataTool.getIntConvert("info/quest", data, 0) == 1);
    isQuestItemCache.put(itemId, questItem);
    return questItem;
}
Also used : MapleData(provider.MapleData)

Example 50 with MapleData

use of provider.MapleData in project HeavenMS by ronancpl.

the class MapleItemInformationProvider method getMeso.

public int getMeso(int itemId) {
    if (getMesoCache.containsKey(itemId)) {
        return getMesoCache.get(itemId);
    }
    MapleData item = getItemData(itemId);
    if (item == null) {
        return -1;
    }
    int pEntry;
    MapleData pData = item.getChildByPath("info/meso");
    if (pData == null) {
        return -1;
    }
    pEntry = MapleDataTool.getInt(pData);
    getMesoCache.put(itemId, pEntry);
    return pEntry;
}
Also used : MapleData(provider.MapleData)

Aggregations

MapleData (provider.MapleData)90 ArrayList (java.util.ArrayList)19 Pair (tools.Pair)11 File (java.io.File)8 Point (java.awt.Point)7 LinkedList (java.util.LinkedList)6 MapleDataDirectoryEntry (provider.MapleDataDirectoryEntry)6 MapleDataFileEntry (provider.MapleDataFileEntry)6 LinkedHashMap (java.util.LinkedHashMap)5 SQLException (java.sql.SQLException)4 MapleDataProvider (provider.MapleDataProvider)4 Skill (client.Skill)2 IOException (java.io.IOException)2 Node (org.w3c.dom.Node)2 NodeList (org.w3c.dom.NodeList)2 AbstractLoadedMapleLife (server.life.AbstractLoadedMapleLife)2 MapleCharacter (client.MapleCharacter)1 Item (client.inventory.Item)1 MonsterStatus (client.status.MonsterStatus)1 Rectangle (java.awt.Rectangle)1