[gm]======背包使用添加类型

dev_chengFeng
wangzhenxing 2022-11-01 10:09:17 +08:00
parent eacc6ef2f5
commit ddc23a9319
3 changed files with 30 additions and 8 deletions

View File

@ -1119,7 +1119,11 @@ ItemType = {
likeabilityItemChip = 35, --好感度物品碎片
EquipChip = 36, --装备碎片
GMzck =42, --gm直冲卡
GMzcq=43,--gm真充卡
GMzcq =43,--gm真充卡
--GMzcq=44,--gm真充券
GMxjk=44,--gm现金卡
GMxck=45,--gm仙充卡
GMxsZcq=46,--gm限时真充券
GMBigZck =49, --gm直冲卡
CommonChip=50,--通用碎片
}

View File

@ -113,7 +113,10 @@ function BagResolveAnCompoundPanel:BindEvent()
if itemData.itemConfig.ItemType == ItemType.Box
or itemData.itemConfig.ItemType == ItemType.GMzck
or itemData.itemConfig.ItemType == ItemType.GMBigZck
or itemData.itemConfig.ItemType == ItemType.GMzcq then--宝箱
or itemData.itemConfig.ItemType == ItemType.GMzcq
or itemData.itemConfig.ItemType == ItemType.GMxck
or itemData.itemConfig.ItemType == ItemType.GMxjk
or itemData.itemConfig.ItemType == ItemType.GMxsZcq then--宝箱
if compoundNum<compoundMaxNum then
compoundNum=compoundNum+1
this.ShowCompoundNumData(compoundNum)
@ -155,7 +158,10 @@ function BagResolveAnCompoundPanel:BindEvent()
elseif itemData.itemConfig.ItemType==ItemType.Box
or itemData.itemConfig.ItemType == ItemType.GMzck
or itemData.itemConfig.ItemType == ItemType.GMBigZck
or itemData.itemConfig.ItemType == ItemType.GMzcq then
or itemData.itemConfig.ItemType == ItemType.GMzcq
or itemData.itemConfig.ItemType == ItemType.GMxck
or itemData.itemConfig.ItemType == ItemType.GMxjk
or itemData.itemConfig.ItemType == ItemType.GMxsZcq then
if compoundNum>0 then
local item={}
local itemList = {}
@ -347,7 +353,11 @@ function this.OnShowLayout3Data()
elseif itemData.itemConfig.ItemType==ItemType.Box
or itemData.itemConfig.ItemType == ItemType.GMzck
or itemData.itemConfig.ItemType == ItemType.GMBigZck
or itemData.itemConfig.ItemType == ItemType.GMzcq then--宝箱
or itemData.itemConfig.ItemType == ItemType.GMzcq
or itemData.itemConfig.ItemType == ItemType.GMxck
or itemData.itemConfig.ItemType == ItemType.GMxjk
or itemData.itemConfig.ItemType == ItemType.GMxsZcq
then--宝箱
this.nameText.text=Language[10194]
this.btnCompoundText.text=Language[10195]
local maxCompoundValue = itemData.num-- math.floor(itemData.num/itemData.itemConfig.UsePerCount)
@ -499,7 +509,10 @@ function this.ShowCompoundNumData(value)
elseif itemData.itemConfig.ItemType==ItemType.Box
or itemData.itemConfig.ItemType == ItemType.GMzck
or itemData.itemConfig.ItemType == ItemType.GMBigZck
or itemData.itemConfig.ItemType == ItemType.GMzcq then
or itemData.itemConfig.ItemType == ItemType.GMzcq
or itemData.itemConfig.ItemType == ItemType.GMxck
or itemData.itemConfig.ItemType == ItemType.GMxjk
or itemData.itemConfig.ItemType == ItemType.GMxsZcq then
this.numText.text= Language[10202]..value..Language[10200]..GetLanguageStrById(itemData.itemConfig.Name)..""
elseif itemData.itemConfig.ItemType==ItemType.TimeIsGold then--挂机奖励
this.numText.text= Language[10202]..value..Language[10200]..GetLanguageStrById(itemData.itemConfig.Name)..""

View File

@ -142,8 +142,10 @@ function RewardItemSingleShowPopup:BindEvent()
elseif itemConfigData.ItemType == ItemType.Box
or itemConfigData.ItemType == ItemType.GMzck
or itemConfigData.ItemType == ItemType.GMBigZck
or itemConfigData.ItemType == ItemType.GMzcq then
LogError("1111111111111111111")
or itemConfigData.ItemType == ItemType.GMzcq
or itemConfigData.ItemType == ItemType.GMxck
or itemConfigData.ItemType == ItemType.GMxjk
or itemConfigData.ItemType == ItemType.GMxsZcq then
local _itemData = BagManager.bagDatas[itemSid]
if itemConfig[itemSid].UseType ~= 2 then
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 4, _itemData, function()
@ -362,7 +364,10 @@ function RewardItemSingleShowPopup:OnShow()
elseif isBagPanel and (itemConfigData.ItemType == 10
or itemConfigData.ItemType == ItemType.GMzck
or itemConfigData.ItemType == ItemType.GMBigZck
or itemConfigData.ItemType == ItemType.GMzcq) and func then--是否宝箱可使用
or itemConfigData.ItemType == ItemType.GMzcq)
or itemConfigData.ItemType == ItemType.GMxck
or itemConfigData.ItemType == ItemType.GMxjk
or itemConfigData.ItemType == ItemType.GMxsZcq and func then--是否宝箱可使用
this.btnSure:SetActive(true)
this.btnSureText.text = Language[10195]
elseif isBagPanel and itemConfigData.ItemType == 12 and func then-- 改名卡