神将来源碎皮合成修改提交
parent
a1c397d1f3
commit
b5324c165a
|
@ -261,6 +261,7 @@ function RewardItemSingleShowPopup:OnOpen(...)
|
|||
isNoShowSureBtn = data[4] and data[4] or false
|
||||
end
|
||||
function RewardItemSingleShowPopup:OnShow()
|
||||
LogGreen("1111111111111111111111111111")
|
||||
this.itemName.text = GetStringByEquipQua(itemConfigData.Quantity, GetLanguageStrById(itemConfigData.Name))
|
||||
--判断自选宝箱界面是否开启
|
||||
local isBoxOpen = UIManager.IsOpen(314)
|
||||
|
|
|
@ -26,9 +26,6 @@ end
|
|||
function JumpViewNew:BindEvent()
|
||||
Util.AddOnceClick(self.btnSure, function()
|
||||
self:GoToJumpData()
|
||||
if self.parent then
|
||||
self.parent:ClosePanel()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -73,13 +70,14 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
|||
self.desc.text = "每期轮替可召唤的神将"
|
||||
elseif self.jumpSData.Type == JumpType.Store then
|
||||
if self.jumpSData.Skipfactor[1] == SHOP_TYPE.ENDLESS_SHOP then
|
||||
self.info.text = self.info.text.."需刷新"
|
||||
self.info.text = self.info.text.."(需刷新)"
|
||||
end
|
||||
local storeTypeConfig = ConfigManager.GetConfigDataByKey(ConfigName.StoreTypeConfig,"StoreType",self.jumpSData.Skipfactor[1])
|
||||
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.StoreConfig,"StoreId",storeTypeConfig.Id)
|
||||
local getChipNum = 1
|
||||
local costItemId = 0
|
||||
local costItemNum = 0
|
||||
local rate = 0
|
||||
for i = 1,#configs do
|
||||
if self.needChipId == configs[i].Goods[1][1] then
|
||||
getChipNum = configs[i].Goods[1][2]
|
||||
|
@ -87,12 +85,20 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
|||
local a,b,c,d = configs[i].Cost[2][1],configs[i].Cost[2][2],configs[i].Cost[2][3],configs[i].Cost[2][4]
|
||||
local x = 1
|
||||
costItemNum = a*x^3+b*x^2+c*x+d
|
||||
rate = configs[i].DiscountDegree
|
||||
break
|
||||
end
|
||||
end
|
||||
local needCostNum = math.ceil(self.needChipNum/getChipNum)*costItemNum
|
||||
local needCostNum
|
||||
if rate ~= 0 then
|
||||
needCostNum = math.ceil(self.needChipNum/getChipNum)*costItemNum*rate/10
|
||||
else
|
||||
needCostNum = math.ceil(self.needChipNum/getChipNum)*costItemNum
|
||||
end
|
||||
|
||||
self.desc.text = ItemConfig[costItemId].Name..":"..BagManager.GetItemCountById(costItemId).."/"..needCostNum
|
||||
self.itemView:OnOpen(false, {costItemId,needCostNum}, 0.4, false, false, false, self.parent.sortingOrder)
|
||||
self.costIconPos.gameObject:SetActive(true)
|
||||
self.itemView:OnOpen(false, {costItemId,0}, 0.4, false, false, false, self.parent.sortingOrder)
|
||||
elseif self.jumpSData.Type == JumpType.XingChenShangDian then
|
||||
local storeTypeConfig = ConfigManager.GetConfigDataByKey(ConfigName.StoreTypeConfig,"StoreType",70)
|
||||
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.StoreConfig,"StoreId",storeTypeConfig.Id)
|
||||
|
@ -111,11 +117,15 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
|||
end
|
||||
local needCostNum = math.ceil(self.needChipNum/getChipNum)*costItemNum
|
||||
self.desc.text = ItemConfig[costItemId].Name..":"..BagManager.GetItemCountById(costItemId).."/"..needCostNum
|
||||
self.itemView:OnOpen(false, {costItemId,needCostNum}, 0.4, false, false, false, self.parent.sortingOrder)
|
||||
self.costIconPos.gameObject:SetActive(true)
|
||||
self.itemView:OnOpen(false, {costItemId,0}, 0.4, false, false, false, self.parent.sortingOrder)
|
||||
elseif self.jumpSData.Type == 30003 then
|
||||
self.btnSureText.text = "合成"
|
||||
self.itemView:OnOpen(false, {self.needChipId,self.needChipNum}, 0.4, false, false, false, self.parent.sortingOrder)
|
||||
self.itemView:OnOpen(false, {self.needChipId,0}, 0.4, false, false, false, self.parent.sortingOrder)
|
||||
self.desc.text = ItemConfig[self.needChipId].Name..":"..BagManager.GetItemCountById(self.needChipId).."/"..self.needChipNum
|
||||
elseif self.jumpSData.Type == 40 then
|
||||
self.costIconPos.gameObject:SetActive(false)
|
||||
self.desc.text = "助力玉帝升星"
|
||||
end
|
||||
end
|
||||
function JumpViewNew:GoToJumpData()
|
||||
|
@ -128,7 +138,7 @@ function JumpViewNew:GoToJumpData()
|
|||
local _itemData = BagManager.bagDatas[self.needChipId]
|
||||
if endHeroNum > 0 then
|
||||
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
|
||||
func()
|
||||
self.parent:OnShow()
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[12157])
|
||||
|
@ -142,7 +152,9 @@ function JumpViewNew:GoToJumpData()
|
|||
item.itemNum=compoundNum*self.needChipNum
|
||||
if endHeroNum > 0 then
|
||||
NetManager.HeroComposeRequest(item,function (drop)
|
||||
this.SendBackCompoundReCallBack(drop)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
||||
self.parent:OnShow()
|
||||
end)
|
||||
end)
|
||||
if compoundNum<=0 then
|
||||
PopupTipPanel.ShowTip(Language[10183])
|
||||
|
@ -162,13 +174,12 @@ end
|
|||
--界面关闭时调用(用于子类重写)
|
||||
function JumpViewNew:OnClose()
|
||||
self.spLoader:Destroy()
|
||||
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function JumpViewNew:OnDestroy()
|
||||
SubUIManager.Close(self.itemView)
|
||||
|
||||
self.itemView = nil
|
||||
end
|
||||
|
||||
return JumpViewNew
|
Loading…
Reference in New Issue