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;
}
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();
}
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;
}
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;
}
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;
}
Aggregations