Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c

dev_chengFeng
ZhangBiao 2021-04-27 21:17:51 +08:00
commit 4e0b5a9033
9 changed files with 107 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 KiB

After

Width:  |  Height:  |  Size: 808 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 KiB

After

Width:  |  Height:  |  Size: 796 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 KiB

After

Width:  |  Height:  |  Size: 852 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 KiB

After

Width:  |  Height:  |  Size: 801 KiB

View File

@ -123,7 +123,7 @@ function ShengYiTianJiang:OnShowData()
rechargeData = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.DirectPurchaseGift, rechargeConfigId)
if rechargeData then
this.buytimes.text = Language[10492]..(rechargeData.dynamicBuyTimes - rechargeData.buyTimes)
this.buytimes.text = Language[10492].. OperatingManager.GetLeftBuyTime(GoodsTypeDef.DirectPurchaseGift, rechargeConfigId)--(rechargeData.dynamicBuyTimes - rechargeData.buyTimes)
else
--LogGreen("找不到数据了:"..rechargeConfigId)
end

View File

@ -3,7 +3,7 @@ RewardItemPopup = Inherit(BasePanel)
local this = RewardItemPopup
local userLevelData = ConfigManager.GetConfig(ConfigName.PlayerLevelConfig)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local itemListPrefab
local itemListPrefab = {}
-- local itemListPrefabMax
local func
local bagType=0 --1 正常背包 2 临时背包 3 公会车迟显示
@ -99,6 +99,13 @@ end
--func 回调
function RewardItemPopup:OnOpen(...)
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
destroy(itemListPrefab[i].gameObject)
end
end
itemListPrefab = {}
itemDataList = {}
isBackBattle = false
isPlayerAniEnd = true
isOpenGeiSSRAvtivity = 0
@ -184,20 +191,28 @@ function RewardItemPopup:OnOpen(...)
end
function this.InitGrid()
this.dropGrid:SetActive(#itemDataList <= 20 )
this.dropGridArena:SetActive(#itemDataList > 20 )
itemListPrefab = {}
if #itemDataList <= 20 then
this.dropGrid:SetActive(#itemDataList <= 25 )
this.dropGridArena:SetActive(#itemDataList > 25 )
-- LogYellow("itemListPrefab "..#itemListPrefab)
-- LogYellow("itemDataList "..#itemDataList)
for i = 1, #itemListPrefab do
itemListPrefab[i].gameObject:SetActive(false)
end
if #itemDataList <= 25 then
for i = 1, #itemDataList do --初始缓存<= 20
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
if not itemListPrefab[i] then
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
end
end
else
for i = 1, #itemDataList do --初始缓存> 20
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid2.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
if not itemListPrefab[i] then
local view = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid2.transform)
view.gameObject.name = "frame"..i
itemListPrefab[i] = view
end
end
end
end
@ -278,7 +293,8 @@ function RewardItemPopup:OnSortingOrderChange()
if itemListPrefab[i] and itemDataList[i] then
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
-- view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view:SetEffectLayer(self.sortingOrder)
end
end
end
@ -291,70 +307,79 @@ function RewardItemPopup:SetItemShow(drop)
itemDataList[i].itemConfig = itemConfig[itemDataList[i].sId]
end
self:ItemDataListSort(itemDataList)
for i = 1, math.max(#itemDataList, #itemListPrefab) do
local go = itemListPrefab[i]
if not go then
go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
go.gameObject.name = "frame"..i
itemListPrefab[i] = go
end
go.gameObject:SetActive(false)
end
callList:Clear()
callList:Push(function ()
if isOpenGeiSSRAvtivityTime then
isOpenGeiSSRAvtivityTime:Stop()
isOpenGeiSSRAvtivityTime = nil
end
isOpenGeiSSRAvtivityTime = Timer.New(function ()
isPlayerAniEnd = true
if isOpenGeiSSRAvtivity > 0 then
HeroManager.DetectionOpenFiveStarActivity(isOpenGeiSSRAvtivity)
end
end, 0.5):Start()
--在关卡界面获得装备 刷新下btview成员红点
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
end)
for i = #itemDataList, 1, -1 do
isPlayerAniEnd = false
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
--view.gameObject:SetActive(false)
-- for i = 1, math.max(#itemDataList, #itemListPrefab) do
-- local go = itemListPrefab[i]
-- if not go then
-- go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
-- go.gameObject.name = "frame"..i
-- itemListPrefab[i] = go
-- end
-- go.gameObject:SetActive(false)
-- end
if #itemDataList <= 25 then
callList:Clear()
callList:Push(function ()
local func = function()
view.gameObject:SetActive(true)
local btn = Util.GetGameObject(view.gameObject, "item/frame"):GetComponent("Button")
btn.enabled = false
PlayUIAnim(view.gameObject, function()
btn.enabled = true
end)
--改为后端更新
--this.SetItemData2(itemDataList[i])
Timer.New(function ()
isPopGetSSR = false
callList:Pop()()
end, 0.05):Start()
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 then
HeroManager.DetectionOpenFiveStarActivity(curItemData.configData.Star)
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 and showHero then
isPopGetSSR = true
isOpenGeiSSRAvtivity = curItemData.configData.Star
UIManager.OpenPanel(UIName.DropGetSSRHeroShopPanel,curItemData.backData, func)
elseif curItemData.configData and curItemData.itemType==1 and
(curItemData.configData.ItemType == ItemType.Title or curItemData.configData.ItemType == ItemType.Ride) then--皮肤 坐骑
-- isPopGetSSR = true
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
func()
else
func()
if isOpenGeiSSRAvtivityTime then
isOpenGeiSSRAvtivityTime:Stop()
isOpenGeiSSRAvtivityTime = nil
end
isOpenGeiSSRAvtivityTime = Timer.New(function ()
isPlayerAniEnd = true
if isOpenGeiSSRAvtivity > 0 then
HeroManager.DetectionOpenFiveStarActivity(isOpenGeiSSRAvtivity)
end
end, 0.5):Start()
--在关卡界面获得装备 刷新下btview成员红点
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
end)
for i = #itemDataList, 1, -1 do
isPlayerAniEnd = false
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view.gameObject:SetActive(false)
callList:Push(function ()
local func = function()
view.gameObject:SetActive(true)
local btn = Util.GetGameObject(view.gameObject, "item/frame"):GetComponent("Button")
btn.enabled = false
PlayUIAnim(view.gameObject, function()
btn.enabled = true
end)
--改为后端更新
--this.SetItemData2(itemDataList[i])
Timer.New(function ()
isPopGetSSR = false
callList:Pop()()
end, 0.05):Start()
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 then
HeroManager.DetectionOpenFiveStarActivity(curItemData.configData.Star)
end
if curItemData.configData and curItemData.itemType==3 and curItemData.configData.Quality == 5 and showHero then
isPopGetSSR = true
isOpenGeiSSRAvtivity = curItemData.configData.Star
UIManager.OpenPanel(UIName.DropGetSSRHeroShopPanel,curItemData.backData, func)
elseif curItemData.configData and curItemData.itemType==1 and
(curItemData.configData.ItemType == ItemType.Title or curItemData.configData.ItemType == ItemType.Ride) then--皮肤 坐骑
-- isPopGetSSR = true
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
func()
else
func()
end
end)
end
callList:Pop()()
else
for i = 1, #itemDataList do
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view.gameObject:SetActive(true)
end
end
callList:Pop()()
end
--存储本地
function this.SetItemData2(itemdata)
@ -452,6 +477,9 @@ function RewardItemPopup:OnClose()
end
--检测是否需要弹每日任务飘窗
TaskManager.RefreshShowDailyMissionTipPanel()
end
--界面销毁时调用(用于子类重写)
function RewardItemPopup:OnDestroy()
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
destroy(itemListPrefab[i].gameObject)
@ -460,7 +488,4 @@ function RewardItemPopup:OnClose()
itemListPrefab = {}
itemDataList = {}
end
--界面销毁时调用(用于子类重写)
function RewardItemPopup:OnDestroy()
end
return RewardItemPopup

View File

@ -433,7 +433,7 @@ function this.SingleItemDataShow2(go, data,curShopDataId)
end)
end
function this.SingleItemDataShow(go, data)
if not curServerTaskList[data.Id] then return end
if not data or not curServerTaskList[data.Id] then return end
local curServerTask = curServerTaskList[data.Id]
if not itemList[go.name] then
itemList[go.name] = {}

View File

@ -28,17 +28,17 @@ end
--界面打开时调用(用于子类重写)
function this:OnOpen(...)
end
function this:OnShow()
local rewardList=ConfigManager.GetConfigDataByKey(ConfigName.FreeTravel,"MapID",XiaoYaoManager.curMapId).Exhibition
for i = 1, #rewardList do
Log(rewardList[i])
local _rewardObj= SubUIManager.Open(SubUIConfig.ItemView, this.grid.transform)
_rewardObj:OnOpen(false, {rewardList[i]}, 1,true)
end
end
function this:OnShow()
end
--界面关闭时调用(用于子类重写)