PGRData/Script/matrix/xentity/xbiancatheatre/adventure/node/XARewardNode.lua
2024-09-01 22:49:41 +02:00

49 lines
No EOL
1.1 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--奖励选择节点
local XARewardNode = XClass(nil, "XARewardNode")
function XARewardNode:Ctor(data)
--唯一Id
self._Uid = data.Uid
--奖励类型, XBiancaTheatreNodeRewardType
self._RewardType = data.RewardType
--BiancaTheatreItemBox表的ID
--BiancaTheatreGold表的ID,
--BiancaTheatreRecruitTicket表的ID
self._ConfigId = data.ConfigId
--物品数量,保底金币会有系统效果加成,没办法读表
self._Count = data.Count
-- 标签类型XBiancaTheatreConfigs.NodeRewardTagType
self._TagType = data.TagType
--是否已领取
self:UpdateReceived(data.Received)
end
function XARewardNode:GetUid()
return self._Uid
end
function XARewardNode:GetRewardType()
return self._RewardType
end
function XARewardNode:GetConfigId()
return self._ConfigId
end
function XARewardNode:GetCount()
return self._Count
end
function XARewardNode:GetTagType()
return self._TagType
end
function XARewardNode:UpdateReceived(received)
self._Received = received
end
function XARewardNode:IsReceived()
return XTool.IsNumberValid(self._Received)
end
return XARewardNode