PGRData/Script/matrix/xentity/xitem/XGiftTemplate.lua

22 lines
536 B
Lua
Raw Normal View History

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