diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua index e70c71d1bf..81bf859d28 100644 --- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua +++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua @@ -161,6 +161,7 @@ GameEvent = { GetNewItem = "Bag.GetNewItem",--得一个新item OnRefreshSoulPanelData="Bag.OnRefreshSoulPanelData", OnBagShowWarPowerChange="Bag.OnBagShowWarPowerChange", + GetNewItemIncarnation = "Bag.GetNewItemIncarnation",--得一个新item }, Adventure = { OnAreaStateChange = "Adventure.OnAreaStateChange", diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua index 5320485c52..bfb8d88d37 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua @@ -73,7 +73,7 @@ function this.UpdateBagData(_itemData, isNoSendNewItemEvent) SoulPrintManager.UpdateAllHavedSoulPrint({itemdata.id}) end end - + -- 货币数据 if itemdata.itemId == 14 or itemdata.itemId == 16 then ThinkingAnalyticsManager.SetSuperProperties({ @@ -93,6 +93,7 @@ function this.UpDataBagItemIdNumber(_itemData) CheckRedPointStatus(RedPointType.tailsmanSoul_gold) CheckRedPointStatus(RedPointType.tailsmanSoul_red) CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold) + Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation) end --后端刷新 @@ -113,6 +114,7 @@ function this.BackDataRefreshEnerny(msgItemInfo) CheckRedPointStatus(RedPointType.tailsmanSoul_gold) CheckRedPointStatus(RedPointType.tailsmanSoul_red) CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold) + Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation) end end @@ -605,6 +607,7 @@ function this.GoIntoBackData(drop) CheckRedPointStatus(RedPointType.tailsmanSoul_gold) CheckRedPointStatus(RedPointType.tailsmanSoul_red) CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold) + Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation) end if (#drop.equipId > 0) then for i = 1, #drop.equipId do @@ -698,6 +701,7 @@ function this.GetTableByBackDropData(drop) CheckRedPointStatus(RedPointType.tailsmanSoul_gold) CheckRedPointStatus(RedPointType.tailsmanSoul_red) CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold) + Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation) end if drop.equipId ~= nil and #drop.equipId > 0 then for i = 1, #drop.equipId do @@ -1132,6 +1136,7 @@ function this.BagIndicationRefresh(msg) CheckRedPointStatus(RedPointType.tailsmanSoul_gold) CheckRedPointStatus(RedPointType.tailsmanSoul_red) CheckRedPointStatus(RedPointType.tailsmanSoul_whiteGold) + Game.GlobalEvent:DispatchEvent(GameEvent.Bag.GetNewItemIncarnation) -- 超出最大数量限制提示 if msg.isMax and msg.isMax == 1 then PopupTipPanel.ShowTip(Language[10169]) diff --git a/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua b/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua index 0c310cece1..de0befd68f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua @@ -28,7 +28,7 @@ function this.InitItemDataList() end this.SingleIncarnationProDes = "" this.SingleIncarnationProDes = this.GetproDesStr(this.SingleIncarnationProDes,this.SingleIncarnationPro) - Game.GlobalEvent:AddEvent(GameEvent.Bag.GetNewItem, this.SetItemDataByCardId) + Game.GlobalEvent:AddEvent(GameEvent.Bag.GetNewItemIncarnation, this.GetbagIncarnationData) end function this.CreatEmptyItemData(id) @@ -106,6 +106,7 @@ function this.SetItemDataList(dataList,isBack) end function this.GetbagIncarnationData() + LogGreen("刷新背包数据刷新变身卡:") local data = BagManager.GetDataByItemType(ItemType.Incarnation) for i = 1,#data do this.SetItemDataByCardId(data[i].id)