c1_lua/lua/app/module/item/item_manager.lua
2023-08-07 18:15:19 +08:00

27 lines
721 B
Lua

local ItemManager = class("ItemManager", BaseModule)
function ItemManager:getItemIcon(id)
return GConst.ATLAS_PATH.ICON_ITEM, ConfigManager:getConfig("item")[id].icon
end
function ItemManager:getItemName(id)
return I18N:getConfig("item")[id].name
end
function ItemManager:getItemDesc(id)
return I18N:getConfig("item")[id].desc
end
function ItemManager:getItemType(id)
return I18N:getConfig("item")[id].desc
end
function ItemManager:rspRecoveryNtf(result)
if result and result.id == GConst.ItemConst.ITEM_ID_VIT then
if result.count and result.count > 0 then
BIReport:postVitGet(result.count, BIReport.ITEM_GET_TYPE.OFFLINE_RECOVERY)
end
end
end
return ItemManager