use of provider.MapleData in project HeavenMS by ronancpl.
the class MapleItemInformationProvider method isConsumeOnPickup.
public boolean isConsumeOnPickup(int itemId) {
if (consumeOnPickupCache.containsKey(itemId)) {
return consumeOnPickupCache.get(itemId);
}
MapleData data = getItemData(itemId);
boolean consume = MapleDataTool.getIntConvert("spec/consumeOnPickup", data, 0) == 1 || MapleDataTool.getIntConvert("specEx/consumeOnPickup", data, 0) == 1;
consumeOnPickupCache.put(itemId, consume);
return consume;
}
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 getEquipmentSlot.
protected String getEquipmentSlot(int itemId) {
if (equipmentSlotCache.containsKey(itemId)) {
return equipmentSlotCache.get(itemId);
}
String ret = "";
MapleData item = getItemData(itemId);
if (item == null) {
return null;
}
MapleData info = item.getChildByPath("info");
if (info == null) {
return null;
}
ret = MapleDataTool.getString("islot", info, "");
equipmentSlotCache.put(itemId, ret);
return ret;
}
use of provider.MapleData in project HeavenMS by ronancpl.
the class MapleItemInformationProvider method getQuestIdFromItem.
public int getQuestIdFromItem(int itemId) {
MapleData data = getItemData(itemId);
int questItem = MapleDataTool.getIntConvert("info/quest", data, 0);
return questItem;
}
use of provider.MapleData in project HeavenMS by ronancpl.
the class MapleItemInformationProvider method getMsg.
public String getMsg(int itemId) {
if (msgCache.containsKey(itemId)) {
return msgCache.get(itemId);
}
MapleData strings = getStringData(itemId);
if (strings == null) {
return null;
}
String ret = MapleDataTool.getString("msg", strings, null);
msgCache.put(itemId, ret);
return ret;
}
Aggregations