From 735b2dc404d090bc2b8fc75562d18e05f9d4a5f9 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 23 Nov 2021 14:00:36 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=B3=95=E5=AE=9D=E4=B9=8B=E7=81=B5?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua | 11 +++++++++++ .../~Lua/Modules/TailsManSoul/TailsManSouPanel.lua | 11 +++++++++-- .../Modules/TailsManSoul/TailsmanSoulMainPanel.lua | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua index f140600d4e..73f027c43c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua @@ -246,6 +246,17 @@ function this.GetManyItems(text) end) return end + if text == "一键法宝之灵" then + local config = (ConfigManager.TryGetAllConfigsDataByKey(ConfigName.ItemConfig,"ItemType",ItemType.talismanSoulChip)) + local cor = coroutine.start(function() + for k,v in ipairs(config) do + local str = "1#" .. v.Id .."#" .. 500 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end) + return + end if text and text ~= "" then local list = string.split(text, "|") local cor = coroutine.start(function() diff --git a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua index 4eaec59cbc..bc5fbd4014 100644 --- a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua @@ -53,9 +53,16 @@ function TailsManSouPanel:BindEvent() local s = function(data) local lis1 = {} for k,v in pairs(data) do - table.insert(lis1,string.format("%s+%s",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v))) + table.insert(lis1,{str = string.format("%s+%s",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v)),sort = propertyConfig[k].SortId}) end - return lis1 + table.sort(lis1,function(a,b) + return a.sort < b.sort + end) + local list2 = {} + for i = 1,#lis1 do + table.insert(list2,lis1[i].str) + end + return list2 end local data = {} local singData = {} diff --git a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulMainPanel.lua index 4f8f302cc5..42f222a333 100644 --- a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulMainPanel.lua @@ -178,9 +178,9 @@ function TailsmanSoulMainPanel:GetProData() end local str = "" for i = 1,#curData do - str = string.format("%s:%s",propertyConfig[curData[i][1]].Info,GetEquipPropertyFormatStr(propertyConfig[curData[i][1]].Style,curData[i][2]) ) + str = string.format("%s:%s",propertyConfig[curData[i][1]].Info,GetPropertyFormatStr(propertyConfig[curData[i][1]].Style,curData[i][2]) ) if nextProData[curData[i][1]] then - str = str..string.format("(+%s)",GetEquipPropertyFormatStr(propertyConfig[curData[i][1]].Style,nextProData[curData[i][1]] - curData[i][2])) + str = str..string.format("(+%s)",GetPropertyFormatStr(propertyConfig[curData[i][1]].Style,nextProData[curData[i][1]] - curData[i][2])) end table.insert(proData,str) end From 9cce1aa31c0c9fe554929e0593c53de5f1a051f5 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 23 Nov 2021 15:13:43 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E8=A1=A8?= =?UTF-8?q?=E7=8E=B0=E3=80=91=3D=3D=3D=3D=3D=3D=E5=89=A7=E6=83=85=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E5=A4=84=E7=90=86=E6=95=8C=E4=BA=BA=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/BattleManager.lua | 1 + .../~Lua/Modules/Battle/View/BattleView.lua | 2 +- .../~Lua/Modules/Battle/View/Unit/BattleUnit.lua | 4 ++-- .../~Lua/Modules/Battle/View/Unit/EnemyView.lua | 13 ++++++++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index ad00846b42..46238437d5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -754,6 +754,7 @@ function this.GetFakeBattleData(fakeId) battleData.enemyData[1].firstCamp = 1 battleData.playerData.firstCamp = 0 end + battleData.enemyId=fakeId return battleData, fakeConfig.TimeSeed end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua index c55c7944c7..f28e3bea2c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua @@ -666,7 +666,7 @@ function this.OnAddRole(data) if this.isBoss and data.position == 2 then isBoss = true end - tbRole[data] = EnemyView.New(go, data, data.position, this, isBoss) + tbRole[data] = EnemyView.New(go, data, data.position, this, isBoss,this.fightData.enemyId) end go.transform.localScale = Vector3.one go.transform.localPosition = Vector3.zero diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BattleUnit.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BattleUnit.lua index 980be8b4a1..d942d0ff7b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BattleUnit.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BattleUnit.lua @@ -6,11 +6,11 @@ function BattleUnit.New(go, role, position, root, isBoss) return o end -function BattleUnit:ctor(go, role, position, root, isBoss) +function BattleUnit:ctor(go, role, position, root, isBoss,enemyId) self._DelayFuncList = {} self._LoopFuncList = {} if self.onCreate then - self:onCreate(go, role, position, root, isBoss) + self:onCreate(go, role, position, root, isBoss,enemyId) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua index 27ed58902c..3242b71337 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua @@ -8,23 +8,23 @@ local reliveEffect1 = "fx_chongsheng_lianhua" local reliveEffect2 = "fx_chongsheng_lizhi" EnemyView = BattleUnit.New() -function EnemyView.New(go, role, position, root, isBoss) +function EnemyView.New(go, role, position, root, isBoss,enemysId) local o = BattleUnit.New(go, role, position, root) setmetatable(o, EnemyView) EnemyView.__index = EnemyView - o:ctor(go, role, position, root, isBoss) + o:ctor(go, role, position, root, isBoss,enemysId) return o end -function EnemyView:onCreate(go, role, position, root, isBoss) +function EnemyView:onCreate(go, role, position, root, isBoss,enemyId) self.spLoader = SpriteLoader.New() self.RootPanel = root self.GameObject = go self.role = role self.camp = role.camp self.isBoss = isBoss - + self.enemysId=enemyId --剧情id,用于处理剧情特殊显示 -- 创建技能播放器 self.castingEfectNode = self.RootPanel.enemySkillCast self.castingNameNode = Util.GetGameObject(self.castingEfectNode, "TongYong_Casting_Shang/DongHua/MingZi") @@ -69,7 +69,10 @@ function EnemyView:onCreate(go, role, position, root, isBoss) self.nameText.text = SubString2(self.readingName,9) self.level.text = role:GetRoleData(RoleDataName.Level) self.elementImg.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(role.roleData.element)) - + if self.enemysId and self.enemysId==1017 then + Util.GetGameObject(go, "Name"):GetComponent("RectTransform").anchoredPosition=Vector3.New(20,-180,0) + Util.GetGameObject(go, "Pro"):GetComponent("RectTransform").anchoredPosition=Vector3.New(-77,-180,0) + end -- self.RoleLiveGO = poolManager:LoadLive(self.livePath, go.transform.parent, Vector3.one, Vector3.zero) self.RoleLiveGOGraphic = self.RoleLiveGO:GetComponent("SkeletonGraphic") From 3f343bb1b2428771d065184a9390563234559337 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 23 Nov 2021 17:22:54 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91?= =?UTF-8?q?=E5=85=B3=E5=8D=A1=E5=92=8C=E6=AF=8F=E6=97=A5=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E6=88=98=E6=96=97=E6=94=B9=E4=B8=BA3=E5=9B=9E=E5=90=88?= =?UTF-8?q?=E5=90=8E=E8=B7=B3=E8=BF=87=EF=BC=8C=E5=85=B6=E4=BB=96=E6=88=98?= =?UTF-8?q?=E6=96=97=E7=9B=B4=E6=8E=A5=E5=8F=AF=E4=BB=A5=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 45 ++++++++++++++----- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 23aa5e5e5f..3d67d74fd4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -27,9 +27,9 @@ local SKIP_STATE = { } local UpdateBtnGMFunc = { [-1] = function() - if not BattleManager.IsUnlockBattlePass() then - return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" - end + -- if not BattleManager.IsUnlockBattlePass() then + -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- end return SKIP_STATE.UNLOCK end, [BATTLE_TYPE.BACK]= function() @@ -48,11 +48,26 @@ local UpdateBtnGMFunc = { -- return SKIP_STATE.NOUSE, "日常副本战斗无法跳过!" -- end, [BATTLE_TYPE.STORY_FIGHT] = function() - if not BattleManager.IsUnlockBattlePass() then - return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- if not BattleManager.IsUnlockBattlePass() then + -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- end + -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then + -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!" + -- end + if this.curRound <= 3 then + return SKIP_STATE.NOUSE, "跳过功能将在第三回合后解锁" end - if FightPointPassManager.GetCurOpenFightIdIsBoss() then - return SKIP_STATE.NOUSE, "首领关卡无法跳过!" + return SKIP_STATE.UNLOCK + end, + [BATTLE_TYPE.DAILY_CHALLENGE] = function() + -- if not BattleManager.IsUnlockBattlePass() then + -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁" + -- end + -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then + -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!" + -- end + if this.curRound <= 3 then + return SKIP_STATE.NOUSE, "跳过功能将在第三回合后解锁" end return SKIP_STATE.UNLOCK end, @@ -363,16 +378,22 @@ function this:InitOption() this.Option:SetActive(true) Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed()) - - local state, tip = self:GetSkipState() - this.jumpLock:SetActive(state == SKIP_STATE.LOCK) - Util.SetColor(this.BtnJumpFight, state == SKIP_STATE.NOUSE and UIColor.DEEPGRAY or UIColor.WRITE) + -- 设置跳过按钮的状态 + this.SetJumpBtnState() -- 初始化战斗时间,刷新前端显示 BattleManager.InitTimeScale() this.SwitchTimeScale() end +-- 设置跳过按钮的状态 +function this.SetJumpBtnState() + local state, tip = this:GetSkipState() + this.jumpLock:SetActive(state == SKIP_STATE.LOCK) + Util.SetColor(this.BtnJumpFight, state == SKIP_STATE.NOUSE and UIColor.DEEPGRAY or UIColor.WRITE) +end + + function this.SwitchTimeScale() local _scale = BattleManager.GetTimeScale() local child = this.BtnTimeScale.transform.childCount - 3 -- 3倍速时-2 @@ -717,6 +738,8 @@ function this.OnRoundChanged(round) end this.roundText.text = string.format(Language[10211], curRound, maxRound) + -- 设置跳过按钮的状态 + this.SetJumpBtnState() end -- 角色轮转回调 function this.RoleTurnChange(role) From 5462a1ad3b0435770ce2c4630f3f1900ac641a83 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 23 Nov 2021 17:23:35 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91?= =?UTF-8?q?=E5=BC=B9=E9=81=93=E7=89=B9=E6=95=88=E8=BD=AC=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/Unit/SkillCaster.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua index add78934de..0713573f27 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua @@ -576,6 +576,7 @@ function SkillCaster:RoleViewBullet(combat, target) if not bulletEffect or bulletEffect == "" or duration == 0 then return end local go = BattleManager.LoadAsset(bulletEffect, self.effectRoot:GetComponent("Canvas").sortingOrder) + self:CheckRotate(go, combat.Orientation) go.transform:SetParent(self.effectRoot.transform) go.transform.localScale = Vector3.one go.transform.position = self.owner.GameObject.transform.position From e947ab68b248c77ee756fdc3c37e419d9ba811b7 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 24 Nov 2021 07:24:17 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=8E=92=E8=A1=8C=E5=A5=96=E5=8A=B1?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=A5=96=E5=8A=B1=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/GeneralPanel/GeneralRankRewardPanel.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralRankRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralRankRewardPanel.lua index 6e374aaeb5..4c0adae007 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralRankRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralRankRewardPanel.lua @@ -223,6 +223,12 @@ function this.RefreshMyInfo() sortNumTabs[i] = Util.GetGameObject(this.myInfo, "sortNum/sortNum ("..i..")") sortNumTabs[i]:SetActive(false) end + if not itemList2 then + itemList2 = {} + end + for i = 1, #itemList2 do + itemList2[i].gameObject:SetActive(false) + end if myrank and myrank > 0 then if myrank < 4 then sortNumTabs[myrank]:SetActive(true) @@ -231,13 +237,6 @@ function this.RefreshMyInfo() Util.GetGameObject(sortNumTabs[4], "rankNumberText"):GetComponent("Text").text = myrank end - if not itemList2 then - itemList2 = {} - end - for i = 1, #itemList2 do - itemList2[i].gameObject:SetActive(false) - end - --获取奖励 if curRankType == 3 then--竞技场 for k,value in ConfigPairs(ConfigList[curRankType]) do From 18648a7622bd5a6fb9fa216dda11dfd2c151f7bc Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Wed, 24 Nov 2021 10:18:36 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E3=80=90=E4=BA=91=E6=B8=B8=E5=95=86?= =?UTF-8?q?=E4=BA=BA=E3=80=91=E8=A3=85=E5=A4=87=E6=96=87=E5=AD=97=E5=8F=A0?= =?UTF-8?q?=E5=8A=A0=E3=80=81=E6=98=BE=E7=A4=BA=E4=BA=BA=E5=90=8D=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Popup/View/GeneralPopup_YunYouMan.lua | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua index 31f28af20d..13db7b4ab2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua @@ -27,6 +27,7 @@ function this:InitComponent(gameObject) self.itemList = {} self.maskList = {} self.maskImageList = {} + self.heroNameList = {}--所有装备对应的英雄明list end function this:BindEvent() @@ -116,32 +117,43 @@ function this:ShowSingleData(item,sdata,index) local equiped = Util.GetGameObject(item,"equiped") maskImage:SetActive(false) equiped:SetActive(sdata.Equiped) - if not self.itemList[index] then - self.itemList[index] = SubUIManager.Open(SubUIConfig.ItemView,itemtrans.transform) - self.itemList[index].gameObject:SetActive(false) + if not self.itemList[item] then + self.itemList[item] = SubUIManager.Open(SubUIConfig.ItemView,itemtrans.transform) + self.itemList[item].gameObject:SetActive(false) + end + + self.itemList[item]:OnOpen(false, {sdata.Id,sdata.Num}, 1,true,false,false,sortingOrder) + self.itemList[item].gameObject:SetActive(true) + self.maskList[item] = itemmask + self.maskImageList[item] = maskImage + self.maskImageList[item]:SetActive(self.selectId == sdata.Id) + + if not self.heroNameList[index] then + if sdata.Equiped then + local data = HeroManager.GetHeroIdListByEquipId(sdata.Id) + for i = 1, #data do + table.insert( self.heroNameList,data[i]) + end + else + self.heroNameList[index] = nil + end end - LogGreen("index:"..tostring(index)) - self.itemList[index]:OnOpen(false, {sdata.Id,sdata.Num}, 1,true,false,false,sortingOrder) - self.itemList[index].gameObject:SetActive(true) - self.maskList[index] = itemmask - self.maskImageList[index] = maskImage - self.maskImageList[index]:SetActive(self.selectId == sdata.Id) - Util.AddOnceClick(self.maskList[index],function () + Util.AddOnceClick(self.maskList[item],function () for i = 1, #self.maskImageList do self.maskImageList[i]:SetActive(false) end if self.selectId == sdata.Id then - self.maskImageList[index]:SetActive(false) + self.maskImageList[item]:SetActive(false) self.selectId = 0 else - self.maskImageList[index]:SetActive(true) + self.maskImageList[item]:SetActive(true) self.selectId = sdata.Id end end) Util.AddOnceClick(equiped,function () - MsgPanel.ShowTwo(string.format("%s穿戴该装备,是否前往卸下?",HeroManager.GetHeroIdListByEquipId(sdata.Id)[index]),function() end,function() + MsgPanel.ShowTwo(string.format("%s穿戴该装备,是否前往卸下?",self.heroNameList[index]),function() end,function() JumpManager.GoJump(22001) end,"取消","确定") end) @@ -152,6 +164,7 @@ function this:OnClose() self.equipList={} self.maskList = {} self.maskImageList = {} + self.heroNameList = {} end function this:OnDestroy() From 2d25ebb61bdcc078893ab25b4a2364fa695d9bb6 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Wed, 24 Nov 2021 11:30:55 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E3=80=90=E4=BF=AE=E4=B8=BA=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E4=B8=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/GeneralPanel/GeneralBigPopup.prefab | 16 ++++---- .../Modules/Practice/CultivationPanel.lua | 18 +++++---- .../~Lua/Modules/Practice/PracticeManager.lua | 37 +++++++++++++++++-- 3 files changed, 52 insertions(+), 19 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/GeneralPanel/GeneralBigPopup.prefab b/Assets/ManagedResources/Prefabs/UI/GeneralPanel/GeneralBigPopup.prefab index ccf3f2a8ac..b6b1f5dc1a 100644 --- a/Assets/ManagedResources/Prefabs/UI/GeneralPanel/GeneralBigPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/GeneralPanel/GeneralBigPopup.prefab @@ -1195,10 +1195,10 @@ RectTransform: m_Father: {fileID: 391854018} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -1.3999023, y: 370} - m_SizeDelta: {x: -172.8, y: 181.9} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1.3999023, y: -624} + m_SizeDelta: {x: 907.2, y: 181.90002} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1220850633 MonoBehaviour: @@ -1601,10 +1601,10 @@ RectTransform: m_Father: {fileID: 391854018} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -1.3999023, y: 985.7202} - m_SizeDelta: {x: -172.8, y: 1049.6} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1.3999023, y: -5.4000244} + m_SizeDelta: {x: 907.2, y: 1111.8999} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1831826791 CanvasRenderer: diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/CultivationPanel.lua b/Assets/ManagedResources/~Lua/Modules/Practice/CultivationPanel.lua index c685697605..003501110a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/CultivationPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/CultivationPanel.lua @@ -7,8 +7,6 @@ local IMAGE = { [4] = "r_hero_jinengdian01", } local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig) -local maxLevel = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,133).Value) -local statePower = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,134).Value) function Cultivation:InitComponent() self.spLoader = SpriteLoader.New() @@ -19,6 +17,7 @@ function Cultivation:InitComponent() self.textPre = Util.GetGameObject(self.grid,"TextPre") self.textPre:SetActive(false) self.Tips = Util.GetGameObject(self.gameObject,"Frame/Tips"):GetComponent("Text") + self.title = Util.GetGameObject(self.gameObject,"Frame/Bg/title/Text"):GetComponent("Text") self.Slide = Util.GetGameObject(self.gameObject,"Frame/Slide") self.level = Util.GetGameObject(self.Slide,"level"):GetComponent("Text") @@ -44,11 +43,11 @@ function Cultivation:BindEvent() self:ClosePanel() end) Util.AddOnceClick(self.upGradeBtn, function() - if (self.curMaxPower-PracticeManager.CultivationLevel*statePower) < statePower then + if (self.curMaxPower-self.achivePower) < self.statePower then PopupTipPanel.ShowTip("战力不足无法升级!") return end - if maxLevel <= PracticeManager.CultivationLevel then + if self.maxLevel <= PracticeManager.CultivationLevel then PopupTipPanel.ShowTip("等级已达上限!") return end @@ -88,8 +87,11 @@ function Cultivation:OnShow() --战力 self.curMaxPower = PlayerManager.maxForce self.lastLevel = PracticeManager.CultivationLevel--上次的等级 + self.maxLevel,self.statePower,self.achivePower = PracticeManager.getDataOfCur() + self.lastPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) self.Tips.text = ConfigManager.GetConfigData(ConfigName.QAConfig,112).content + self.title.text = string.format("最高战力每提升%s万可提升1级修为",self.statePower/10000) --设置四个属性 for i = 1, #self.configData.ProRank do local go = self.textPreList[i] @@ -104,12 +106,12 @@ function Cultivation:OnShow() self.level.text = string.format("%s级",PracticeManager.CultivationLevel) self.power.text = self.curMaxPower --数字 - if maxLevel > PracticeManager.CultivationLevel then - self.value.text = string.format("%s/%s",self.curMaxPower-statePower*PracticeManager.CultivationLevel,statePower) - if self.curMaxPower-statePower*PracticeManager.CultivationLevel > statePower then + if self.maxLevel > PracticeManager.CultivationLevel then + self.value.text = string.format("%s/%s",self.curMaxPower-self.achivePower,self.statePower) + if self.curMaxPower-self.achivePower > self.statePower then self.fill:GetComponent("RectTransform").sizeDelta = Vector3.New(445,26,0) else - local size = (self.curMaxPower%statePower)/statePower + local size = (self.curMaxPower-self.achivePower)/self.statePower self.fill:GetComponent("RectTransform").sizeDelta = Vector3.New(445*size,26,0) end self.btnText.text = "升 级" diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua index b6c4043c7f..fd82f746f1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua @@ -723,12 +723,43 @@ function this.SetCultivationLevel(_level,func) end end +function this.getDataOfCur() + local maxLevel = 0--最大等级 + local statePower = 0--当前升一级需要的战力 + local achivePower = 0--当前等级已达到的战力 + + local levelList = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,133).Value, "#") + local statePowerList = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,134).Value, "#") + local limitPowerList = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,139).Value, "#") + maxLevel = tonumber(levelList[#levelList]) + + for i = #levelList, 1,-1 do + if this.CultivationLevel <= tonumber(levelList[i]) then + statePower = tonumber(statePowerList[i]) + end + end + for i = 1, #levelList do + if this.CultivationLevel <= tonumber(levelList[i]) then + if levelList[i-1] then + achivePower = achivePower + (this.CultivationLevel - tonumber(levelList[i-1]))*statePower + break + else + achivePower = this.CultivationLevel*statePower + break + end + else + achivePower = tonumber(limitPowerList[i]) + end + end + -- LogGreen("修为等级:"..tostring(this.CultivationLevel).." maxLevel:"..tostring(maxLevel).." statePower:"..tostring(statePower).." achivePower:"..tostring(achivePower).." 最高战力:"..tostring(PlayerManager.maxForce)) + return maxLevel,statePower,achivePower +end + function this.CheckPlayerCultivetionRed() - local maxLevel = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,133).Value) - local statePower = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,134).Value) + local maxLevel,statePower,achivePower = this.getDataOfCur() if maxLevel > this.CultivationLevel then FormationManager.UserPowerChanged() - if (PlayerManager.maxForce - statePower*this.CultivationLevel) > statePower then + if (PlayerManager.maxForce - achivePower) > statePower then return true end end From 86dff44ce7a4619ea46203e4179ff0aabfbee3aa Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 24 Nov 2021 11:43:46 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E3=80=90=E4=B8=BB=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E3=80=91=E5=85=BC=E5=AE=B9=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E7=9A=84=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/ActivityGift/ActivityGiftManager.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua index 165541ec73..1ddc960d91 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua @@ -448,7 +448,11 @@ function this.GetActivityTypeFromId(activityId) end function this.IsActivityTypeOpen(type) - local globalActConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.GlobalActivity, "Type", type) + local globalActConfigs = ConfigManager.TryGetAllConfigsDataByKey(ConfigName.GlobalActivity, "Type", type) + if not globalActConfigs or #globalActConfigs <= 0 then + LogError("未找到活动相关配置,类型:"..tostring(type)) + return + end local activityId = nil table.walk(globalActConfigs, function(actConfigInfo) if this.mission and this.mission[actConfigInfo.Id] then From f01889db2196840c60ca9627767c7698cb96aa09 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 24 Nov 2021 14:21:44 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=AC=AC=E4=B8=89=E5=9B=9E=E5=90=88=E6=97=B6?= =?UTF-8?q?=E6=88=98=E6=96=97=E5=B0=B1=E5=8F=AF=E4=BB=A5=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 3d67d74fd4..0a7c2d63cb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -54,8 +54,8 @@ local UpdateBtnGMFunc = { -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!" -- end - if this.curRound <= 3 then - return SKIP_STATE.NOUSE, "跳过功能将在第三回合后解锁" + if this.curRound < 3 then + return SKIP_STATE.NOUSE, "跳过功能将在第三回合解锁" end return SKIP_STATE.UNLOCK end, @@ -66,8 +66,8 @@ local UpdateBtnGMFunc = { -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!" -- end - if this.curRound <= 3 then - return SKIP_STATE.NOUSE, "跳过功能将在第三回合后解锁" + if this.curRound < 3 then + return SKIP_STATE.NOUSE, "跳过功能将在第三回合解锁" end return SKIP_STATE.UNLOCK end, From d1ce54c9a948533b1b19863e5f2d76978859ae01 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 24 Nov 2021 14:22:27 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E3=80=90=E6=B5=8B=E8=AF=95=E6=88=98?= =?UTF-8?q?=E6=96=97=E3=80=91=E6=8A=A5=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua index f28e3bea2c..769a5d3c07 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua @@ -666,7 +666,7 @@ function this.OnAddRole(data) if this.isBoss and data.position == 2 then isBoss = true end - tbRole[data] = EnemyView.New(go, data, data.position, this, isBoss,this.fightData.enemyId) + tbRole[data] = EnemyView.New(go, data, data.position, this, isBoss, this.fightData and this.fightData.enemyId or nil) end go.transform.localScale = Vector3.one go.transform.localPosition = Vector3.zero