bug修复

dev_chengFeng
ZhangBiao 2020-07-20 16:42:20 +08:00
parent c471a9ccd5
commit 054f1558bc
5 changed files with 19 additions and 4 deletions

View File

@ -87,7 +87,6 @@ function DeathPosInfoPanel:BindEvent()
PopupTipPanel.ShowTip(Language[11047])
return
end
LogYellow("DeathPosManager.allowchallange:"..DeathPosManager.allowchallange)
if DeathPosManager.allowchallange==DeathPosStatus.Belated then
PopupTipPanel.ShowTip("<color=red>挑战阶段加入公会,不允许参与本轮十绝阵!</color>")
return

View File

@ -182,6 +182,7 @@ function TrialMapPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.RefreshBombNum)
Game.GlobalEvent:AddEvent(GameEvent.Map.ShowEnemyInfo, this.ShowEnemyInfo)
Game.GlobalEvent:AddEvent(GameEvent.Map.RefreshHeroHp, this.SetSelectHero)
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.InitShopInfo)
end
--移除事件监听(用于子类重写)
@ -192,6 +193,7 @@ function TrialMapPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.RefreshBombNum)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.ShowEnemyInfo, this.ShowEnemyInfo)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.RefreshHeroHp, this.SetSelectHero)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.InitShopInfo)
end
--界面打开时调用(用于子类重写)

View File

@ -24,7 +24,7 @@ end
--绑定事件(用于子类重写)
function BuffChoosePanel:BindEvent()
Util.AddClick(this.btnBack, function()
this:ClosePanel()
-- this:ClosePanel()
end)
end

View File

@ -219,7 +219,6 @@ end
function QianKunBox:refreshMagicNum()
local actData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.QianKunBox)
-- LogYellow("ID:"..actData.activityId.." value"..actData.value)
self.leftUptips1.text = lotterySpecialConfig[20].Count-math.floor(actData.value/1000)
self.btnTimes.text = tostring(lotterySpecialConfig[21].Count-actData.value%1000).."次内必得金色魂印"
self.midDowntips1.text = Language[12239]

View File

@ -189,6 +189,7 @@ function this.RequestBuyShopItem(shopType, shopItemId, num, func)
end
-- 检测商店红点
this.CheckShopRedpot(shopType)
this.SortItemList(shopType)
-- 更新事件
Game.GlobalEvent:DispatchEvent(GameEvent.Shop.OnShopInfoChange)
@ -363,7 +364,7 @@ end
-- 刷新商店物品列表排序
function this.SortItemList(shopType)
-- 试炼副本商店不按sort字段排序
if shopType == SHOP_TYPE.TRIAL_SHOP then return end
-- if shopType == SHOP_TYPE.TRIAL_SHOP then return end--森罗商店上来就被🈲了,但是现在对森罗商店有了处理
-- 排序
local shopData = nil
for _, v in ipairs(this.allShopData) do
@ -393,6 +394,20 @@ function this.SortItemList(shopType)
-- 按sort排序
return aInfo.Sort < bInfo.Sort
end)
else--是试炼商店
table.sort(v.storeItem, function(a, b)
local aId = a.id % _StoreItemIdFilter
local bId = b.id % _StoreItemIdFilter
local aInfo = ConfigManager.GetConfigData(ConfigName.StoreConfig, aId)
local bInfo = ConfigManager.GetConfigData(ConfigName.StoreConfig, bId)
if a.buyNum == 0 and b.buyNum > 0 then
return true
end
if a.buyNum > 0 and b.buyNum == 0 then
return false
end
return aInfo.Sort < bInfo.Sort
end)
end
end
end