From d1cb61fc18b1a0e56060e2c8761a7556c83e5060 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 11 Nov 2021 10:48:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90ID1010636=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E7=81=B5=E5=85=BD=E5=AE=9D=E9=98=81?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Logic/GameEvent.lua | 2 ++ .../DynamicActivityManager.lua | 18 +++++++++++++++++ .../Modules/DynamicActivity/LingShouBaoGe.lua | 20 +++++++++++-------- .../View/GeneralBigPopup_RecrutDetail.lua | 13 +++++++++++- .../Popup/View/GeneralPopup_LingShouBaoGe.lua | 1 + 5 files changed, 45 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua index 56342432d5..6b73d7ea79 100644 --- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua +++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua @@ -212,6 +212,8 @@ GameEvent = { ContinueRechargeRefresh ="Activity.ContinueRechargeRefresh", --限时up的英雄改变 TimeLimitUpHeroChange = "Activity.TimeLimitUpHeroChange", + --灵兽宝阁灵兽改变 + UpMonsterChange = "Activity.UpMonsterChange", }, Carbon = { CarbonCountChange = "Carbon.CarbonCountChange", diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua index dd4eac3efe..27bec14bb2 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua @@ -292,6 +292,24 @@ function this.GetLeftRewardData() return data end +function this.LingShouOrigiUpData() + local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LingShouBaoGe) + local activityId = ActData.activityId + local LSrewardData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",activityId) + local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId) + local singleRecruit = array[1] + local curScore = 0 + local mergePool = singleRecruit.MergePool + local poolId = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",mergePool).pool_id + local tempData = ConfigManager.GetConfigDataByKey(ConfigName.LotteryRewardConfig,"Pool",poolId) + local showData = {} + showData.sasId = 0 + showData.monsterId = tempData.Reward[1] + showData.iconId = LSrewardData[1].Reward[1][1] + showData.battleId = tempData.Fakebattle + return showData +end + function this.LingShouBuildData() local rewardData={} local showData={} diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua index d6d8f2562a..a207d7d32f 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua @@ -74,9 +74,9 @@ function LingShouBaoGe:BindEvent() maxRound = 20 } UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function () - -- Timer.New(function () - -- self:Refresh() - -- end,3):Start() + Timer.New(function () + self:Refresh() + end,3):Start() end) end) end @@ -141,13 +141,13 @@ function LingShouBaoGe:SetData() self.showData={} self.rewardData,self.showData,self.curScore = DynamicActivityManager.LingShouBuildData() self.title.sprite = self.spLoader:LoadSprite(PositionList[self.showData.monsterId].title) + if self.Live then + poolManager:UnLoadLive(self.bgName, self.Live) + end --设置立绘 self.bgName = artConfig[SpiritAnimalConfig[self.showData.monsterId].Live].Name local pos = SpiritAnimalConfig[self.showData.monsterId].Position local scale = SpiritAnimalConfig[self.showData.monsterId].Scale - if self.Live then - poolManager:UnLoadLive(self.bgName, self.Live) - end self.Live = poolManager:LoadLive(self.bgName, self.grid.transform, Vector3.one*scale*0.8, Vector2.New(pos[1],pos[2]+PositionList[self.showData.monsterId].pos)) local RoleLiveGOGraphic = self.Live:GetComponent("SkeletonGraphic") RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true) @@ -345,12 +345,16 @@ end --添加事件监听(用于子类重写) function LingShouBaoGe:AddListener() - + Game.GlobalEvent:AddEvent(GameEvent.Activity.UpMonsterChange, function() + self:Refresh() + end) end --移除事件监听(用于子类重写) function LingShouBaoGe:RemoveListener() - + Game.GlobalEvent:RemoveEvent(GameEvent.Activity.UpMonsterChange, function() + self:Refresh() + end) end return LingShouBaoGe \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua index be97d08e62..48ff16e394 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua @@ -43,9 +43,11 @@ function this:LookDetailBtnAction() end end function this:AddListener() + end function this:RemoveListener() + end function this:OnShow(_parent,_Data) @@ -118,11 +120,20 @@ function this:OnShow(_parent,_Data) itemList[i].Reward[1]=dic[itemList[i].Reward[1]] end end + elseif activityType == ActivityTypeDef.LingShouBaoGe then + local rewardData,showData,curScore = DynamicActivityManager.LingShouBuildData() + local origiUpMonster = DynamicActivityManager.LingShouOrigiUpData() + itemList = RecruitManager.GetRewardPreviewData(poolType) + for i = 1,#itemList do + if itemList[i].Reward[1] == origiUpMonster.monsterId then + UpItemList = {[1] = {Reward = {showData.monsterId,1},WeightShow = itemList[i].WeightShow}} + break + end + end else UpItemList = RecruitManager.GetRewardPreviewData(poolUpType) itemList = RecruitManager.GetRewardPreviewData(poolType) end - end local _upRateList,rateList = this:BuildRateData(activityType,itemList,UpItemList) this:ReFreshUpItem(UpItemList,_upRateList) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_LingShouBaoGe.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_LingShouBaoGe.lua index ad9947e504..7592f2af12 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_LingShouBaoGe.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_LingShouBaoGe.lua @@ -32,6 +32,7 @@ function this:BindEvent() NetManager.ChengeMonsterChooseRequest(ActData.activityId,curMonsterId,function () local selectId = ConfigManager.GetConfigDataByDoubleKey(ConfigName.SpiritAnimalSummon,"ActivityID",ActData.activityId,"FocusID",curMonsterId).Id ActivityGiftManager.ChangeLingShouBaoGeSelectId(ActData.activityId,selectId) + Game.GlobalEvent:DispatchEvent(GameEvent.Activity.UpMonsterChange) parent:ClosePanel() end) end) From d37ed444789e8ded1ab1d6fa7add7ef15ba08f4a Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 11 Nov 2021 10:52:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90ID1010636=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E7=81=B5=E5=85=BD=E5=AE=9D=E9=98=81?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/DynamicActivity/LingShouBaoGe.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua index a207d7d32f..f9ee3edb6a 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/LingShouBaoGe.lua @@ -74,9 +74,9 @@ function LingShouBaoGe:BindEvent() maxRound = 20 } UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test,function () - Timer.New(function () - self:Refresh() - end,3):Start() + -- Timer.New(function () + -- self:Refresh() + -- end,3):Start() end) end) end From 278e309174f6bd3cd4ca43632fb31180f111f8fb Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 11 Nov 2021 11:43:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=95=86=E5=BA=97=E6=96=B0=E5=AD=97?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab b/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab index 6a6b3d906e..c7fa3aea43 100644 --- a/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab +++ b/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab @@ -4546,7 +4546,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -52.1, y: 91.7} + m_AnchoredPosition: {x: 48.3, y: 94.6} m_SizeDelta: {x: 58, y: 58} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5878404588687697688