PGRData/Resources/Scripts/XEntity/XItem/XGiftTemplate.lua
2022-12-26 14:06:01 +05:30

22 lines
No EOL
536 B
Lua

local XGiftTemplate = {}
function XGiftTemplate.New(itemTemplate)
local extendObj = {
GiftType = itemTemplate.SubTypeParams[1],
RewardId = itemTemplate.SubTypeParams[2],
SelectCount = itemTemplate.SubTypeParams[3],
}
return setmetatable({}, {
__metatable = false,
__index = function(_, k)
if extendObj[k] ~= nil then
return extendObj[k]
else
return itemTemplate[k]
end
end,
})
end
return XGiftTemplate