ro-table/Asstes/Resources/Script/Com/Data/Auction/AuctionSignUpData.txt
2025-06-04 05:02:57 +08:00

41 lines
943 B
Plaintext
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.

AuctionSignUpData = class("AuctionSignUpData")
function AuctionSignUpData:ctor(data)
self:SetData(data)
end
function AuctionSignUpData:SetData(data)
if data then
self.itemid = data.itemid
self.price = data.price
self.state = AuctionSignUpState.SignUp
self.needEnchant = data.auction -- 0:禁止上架1:物品2:附魔裝備
end
end
function AuctionSignUpData:SetCloseState()
if self.state ~= AuctionSignUpState.Signed then
self.state = AuctionSignUpState.Close
end
end
function AuctionSignUpData:SetState(state)
self.state = state
end
function AuctionSignUpData:GetItemData()
if self.itemData == nil then
self.itemData = ItemData.new("Auction", self.itemid)
end
return self.itemData
end
function AuctionSignUpData:CanSignUp()
return BagProxy.Instance:GetItemNumByStaticID(self.itemid) > 0
end
--是否需要判斷報名附魔條件
function AuctionSignUpData:IsNeedEnchant()
return self.needEnchant == 2
end