From e584db1eaafced2bb12f03dec813db8f987198c7 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 16 Sep 2021 20:31:12 +0800 Subject: [PATCH 01/19] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=E8=A2=AB=E5=8A=A8196=20200=20188=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/Logic/Base/Passivity.lua | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 7b544e6826..cb166211fc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -3961,8 +3961,8 @@ local passivityList = { table.insert(cl, {v, ct}) end end - role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill) - atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill) + role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill,atkRole) + atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill,role) ff = BattleUtil.CountChangeList(ff, cl) -- 计算分摊伤害 @@ -4108,7 +4108,6 @@ local passivityList = { if maxNum and maxNum > 0 then cf = cf/maxNum end - local targets = skill:GetDirectTargets() if not targets or #targets == 0 then return end @@ -4169,15 +4168,18 @@ local passivityList = { end) end, - -- 对敌方造成伤害如被分摊其分摊比降低[a]% - -- a[float] + -- 对敌方造成伤害如被分摊其分摊比降低[a]%,判断类型[b](b:1 技能 2 普攻 3 所有 4:燃烧目标 ) + -- a[float],b[int] [196] = function(role, args,id,judge) local f1 = args[1] local type = args[2] - local onDamageBeShare = function(func,skill) + local onDamageBeShare = function(func,skill,target) if skill and not skill.isTriggerJudge and judge==1 then return - end + end + if type==4 and not BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==1 end,role,1) then + return + end --普攻不会被降低分摊 2020/11/17 wangzhenxing lihaiyang if type==1 and skill and skill.type~=BattleSkillType.Normal then return @@ -4288,8 +4290,8 @@ local passivityList = { table.insert(cl, {v, ct}) end end - role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill) - atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill) + role.Event:DispatchEvent(BattleEventName.PassiveDamageShare, _CallBack,skill,atkRole) + atkRole.Event:DispatchEvent(BattleEventName.PassiveDamageBeShare, _CallBack,skill,defRole) ff = BattleUtil.CountChangeList(ff, cl) local shareDamage = floor(BattleUtil.ErrorCorrection(damage * f1*ff)) -- 被攻击武将自身伤害 From 38fcf555ddaea54f7e8519cfb6a151c50d75cb64 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 16 Sep 2021 22:43:38 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E3=80=90=E5=B1=B1=E6=B2=B3=E7=A4=BE?= =?UTF-8?q?=E7=A8=B7=E5=9B=BE=E3=80=91=E4=BF=AE=E5=A4=8D=E6=88=98=E6=96=97?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 2 +- .../~Lua/Modules/FightLevel/FightLevelManager.lua | 6 +++--- 2 files 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 ed6fc43ada..db0b820057 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -461,7 +461,7 @@ function this.BattleEnd(result) -- 判断是否需要进行结果检测 if this.fightResult then if result ~= this.fightResult then - BattleRecordManager.SubmitCheckFight(this.fightResult, result) + BattleRecordManager.SubmitCheckFight(result, this.fightResult) end end -- 直接显示结果 diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua index 71d0c5b252..193ff8320a 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua @@ -163,13 +163,13 @@ function this.FightLevelFightBattle(_fightLevelData, callBack) -- Log("山河社稷图回复战斗 星级 "..msg.stars.." drop "..#msg.drop.itemlist) HardStageFightResponseMsg = msg curBattlefightLevelData = _fightLevelData - local result = msg.stars > 0 and 1 or 0 + -- local result = msg.stars > 0 and 1 or 0 if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then local fightData = BattleManager.GetBattleServerData(msg,0) - UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHTLEVEL, callBack):SetResult(result) + UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHTLEVEL, callBack)--:SetResult(result) elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then local fightData = BattleManager.GetBattleServerData(msg,0) - UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack):SetResult(result) + UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack)--:SetResult(result) elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function() --刷新数据刷新界面 From 4511eec3835ea246c195a2af1a79c6ae1882c221 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 17 Sep 2021 11:55:18 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=E8=A2=AB=E5=8A=A8196=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index cb166211fc..85cb17778c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -4168,7 +4168,7 @@ local passivityList = { end) end, - -- 对敌方造成伤害如被分摊其分摊比降低[a]%,判断类型[b](b:1 技能 2 普攻 3 所有 4:燃烧目标 ) + -- 对敌方造成伤害如被分摊其分摊比降低[a]%,判断类型[b](b:1 普攻 2 技能 3 所有 4:燃烧目标 技能 ) -- a[float],b[int] [196] = function(role, args,id,judge) local f1 = args[1] @@ -4177,7 +4177,8 @@ local passivityList = { if skill and not skill.isTriggerJudge and judge==1 then return end - if type==4 and not BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==1 end,role,1) then + if type==4 and not BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==1 end,role,1) and + skill and skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra and skill.type~=BattleSkillType.DeadSkill then return end --普攻不会被降低分摊 2020/11/17 wangzhenxing lihaiyang From 80c4f8cd236c7aa0b270db56b6c7867efe640dc8 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 17 Sep 2021 13:34:15 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E3=80=90ID1018487=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E9=B8=BF=E8=92=99=E9=98=B5=E3=80=91=E5=85=B1=E9=B8=A3=E7=9A=84?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=92=8C=E5=AE=9D=E7=89=A9=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=85=B1=E9=B8=A3=E7=9A=84=E7=AE=AD=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/RoleInfo/RoleEquipPanel.prefab | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipPanel.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipPanel.prefab index 2bca11d6d5..44164f8b8b 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipPanel.prefab @@ -4799,8 +4799,8 @@ RectTransform: m_Children: - {fileID: 1038286848797717324} - {fileID: 8773250241928916216} - - {fileID: 7192500783854778062} - {fileID: 9213494320095827108} + - {fileID: 7192500783854778062} - {fileID: 726478980537134316} - {fileID: 6787750521099172436} - {fileID: 4326763871812024314} @@ -5346,8 +5346,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 8773970828275836580} - - {fileID: 7802777161117319042} - {fileID: 8717039602528262249} + - {fileID: 7802777161117319042} - {fileID: 1473804682652306613} - {fileID: 6434840553229058696} m_Father: {fileID: 224353427390833726} @@ -6452,8 +6452,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 8773887651407534236} - - {fileID: 5134932089081327844} - {fileID: 3664213903146751088} + - {fileID: 5134932089081327844} - {fileID: 841610737445374472} - {fileID: 8440128951764089854} m_Father: {fileID: 224353427390833726} @@ -6533,8 +6533,8 @@ RectTransform: m_Children: - {fileID: 4916783252602824613} - {fileID: 8773545490129017070} - - {fileID: 4359432188486531703} - {fileID: 7370870530407204259} + - {fileID: 4359432188486531703} - {fileID: 5075066562634089231} - {fileID: 4772160518092357000} - {fileID: 767536665978574478} @@ -6700,8 +6700,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 224158546098438708} - - {fileID: 2042786427835682893} - {fileID: 8519913330498722392} + - {fileID: 2042786427835682893} - {fileID: 5958971747525970482} - {fileID: 7225922217035970132} m_Father: {fileID: 224353427390833726} @@ -12277,8 +12277,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 8773833043905852742} - - {fileID: 4534655569651322158} - {fileID: 3071424370041062767} + - {fileID: 4534655569651322158} - {fileID: 3999081153343366784} - {fileID: 1901042942284068930} m_Father: {fileID: 224353427390833726} @@ -18034,7 +18034,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224950323983480262} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -42497,7 +42497,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224292030102175808} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -47545,7 +47545,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224737750581944100} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -72351,7 +72351,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224252541779665038} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -72424,7 +72424,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224346343574370934} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -77543,7 +77543,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224346343574370934} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -77735,7 +77735,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224252541779665038} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -126122,7 +126122,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224737750581944100} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -150264,7 +150264,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224292030102175808} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -164762,7 +164762,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224461338842806296} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -174443,7 +174443,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224461338842806296} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -184467,7 +184467,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224950323983480262} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} From 52221aca04765afbffc4412541b5209d8e1ae1c9 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 17 Sep 2021 14:26:30 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=E8=A2=AB=E5=8A=A8196=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 85cb17778c..37e6aa9276 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -4177,8 +4177,8 @@ local passivityList = { if skill and not skill.isTriggerJudge and judge==1 then return end - if type==4 and not BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==1 end,role,1) and - skill and skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra and skill.type~=BattleSkillType.DeadSkill then + if type==4 and (not BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==1 end,role,1) + or (skill and (skill.type==BattleSkillType.Normal or skill.type==BattleSkillType.ChaosNormal))) then return end --普攻不会被降低分摊 2020/11/17 wangzhenxing lihaiyang From 32ba399115401415a8bd4251ad67f1634f209935 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 17 Sep 2021 14:47:20 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E3=80=90ID1018484=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E6=A3=AE=E7=BD=97=E5=B9=BB=E5=A2=83=E3=80=91=E6=8A=BD=E5=88=B0?= =?UTF-8?q?=E6=95=B4=E5=8F=AA=E7=81=B5=E5=85=BD=EF=BC=8C=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E9=87=8D=E7=99=BB=E6=89=8D=E4=BC=9A=E6=98=BE=E7=A4=BA=E5=9C=A8?= =?UTF-8?q?=E8=83=8C=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua index aa4ebb4962..0ea106770b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua @@ -62,6 +62,7 @@ function this.Show() --转起来 resultId = msg.resultId LogYellow("掉落的Id:"..resultId) + BagManager.GoIntoBackData(msg.drop) this.test() --4秒后显示掉落 -- Timer.New(function() From df1409717d266f785ffea77768f7fec48b6de136 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 17 Sep 2021 15:20:44 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5=E9=87=8A=E6=94=BE=E5=A4=84?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E7=9B=AE=E6=A0=87=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=88=99=E4=B8=8D=E8=83=BD=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Role/RoleLogic.lua | 9 +++++++++ .../~Lua/Modules/Battle/Logic/Role/Skill.lua | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index dc0828b95f..86e37bd94f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -327,6 +327,15 @@ end -- 判断角色是否可以释放技能 function RoleLogic:IsAvailable(skill) + if skill and skill.effectCaster then + --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/09/17 + --为解决攻击目标只剩被放逐的单位导致我方不放技能扣除怒气 + skill.effectCaster:ChooseTarget() + local targets=BattleUtil.LengthOfTable(skill.effectCaster:GetDirectTargetsNoExile()) + if targets==0 then + return false + end + end --角色没有真正死亡 在 被眩晕/沉默的 情况下 任然能释放死亡技能 if (self.ctrl_dizzy or self.ctrl_slient) and self:IsDead() and skill and skill.type==BattleSkillType.DeadSkill then return true diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 25ab3b6ca8..dde4102dea 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -52,15 +52,6 @@ function Skill:GetOwner() end -- 是否可以释放 function Skill:canCastSkill() - if self.effectCaster then - --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26 - --为解决攻击目标只剩被放逐的单位导致技能播放异常 - self.effectCaster:ChooseTarget() - local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile()) - if targets==0 then - return false - end - end return true end From c17ea51996a3b30e1e717b5237fb6233dd2813da Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 17 Sep 2021 16:09:39 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E3=80=90=E5=85=88=E9=81=A3=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=91=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E5=92=8C?= =?UTF-8?q?=E6=88=98=E6=96=97=E6=A0=A1=E9=AA=8C=E6=9C=8D=E5=88=86=E6=94=AF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Editor/AutoPack.cs | 6 +++--- .../Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Editor/AutoPack.cs b/Assets/Editor/AutoPack.cs index 872b077e16..4f3f27377e 100644 --- a/Assets/Editor/AutoPack.cs +++ b/Assets/Editor/AutoPack.cs @@ -27,9 +27,9 @@ public class AutoPack : EditorWindow new string[]{ "灵动商务", "Logo_mht_sw", "MHT_GN_SW" , "china/mht_sw"}, //先遣 - new string[]{ "跨服", "LogoChinaXQCS", "MHT_GN_KUAFU", "china/test"}, - new string[]{ "先遣-测试", "LogoChinaXQCS", "MHT_GN_XQ_TEST", "china/test"}, - new string[]{ "先遣", "LogoChinaXQ", "MHT_GN_XQ", "china/test"}, + new string[]{ "跨服", "LogoChinaXQCS", "MHT_GN_KUAFU", "china/xq"}, + new string[]{ "先遣-测试", "LogoChinaXQCS", "MHT_GN_XQ_TEST", "china/xq"}, + new string[]{ "先遣", "LogoChinaXQ", "MHT_GN_XQ", "china/xq"}, }; diff --git a/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs b/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs index a6dbc7e48e..7e3fe69c3f 100644 --- a/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs +++ b/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs @@ -35,7 +35,7 @@ namespace GameEditor.Core.DataConfig { ServerBattleConfig.Clear(); ServerBattleConfig.Add("china/dev", "test"); - ServerBattleConfig.Add("china/test", "master_zh_test"); + ServerBattleConfig.Add("china/xq", "master_zh_test"); ServerBattleConfig.Add("china/zf_test", "master_zh_online_special"); m_CurGitBench = GitUtil.GetCurBenchName(); ServerBattleConfig.TryGetValue(m_CurGitBench, out m_CurServerBattlePath); From 06db8bd21a6511f37bdd5eda9effa0436bd85032 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 17 Sep 2021 16:12:45 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E3=80=90=E4=B8=93=E6=9C=8D=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=91=E4=BF=AE=E6=94=B9=E4=B8=93=E6=9C=8D=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Editor/AutoPack.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Editor/AutoPack.cs b/Assets/Editor/AutoPack.cs index 4f3f27377e..f8b1c1ca05 100644 --- a/Assets/Editor/AutoPack.cs +++ b/Assets/Editor/AutoPack.cs @@ -15,7 +15,9 @@ public class AutoPack : EditorWindow // 专服 new string[]{ "C轮v2", "Logo_gm_nosdk", "TCX_TEST_C_V2", "china/zf_test"}, new string[]{ "灵动专服-测试", "Logo_gn_zf_test", "MHT_GN_ZF_TEST" , "china/zf_test"}, - new string[]{ "灵动专服-正式", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE3" , "china/zf_test"}, + new string[]{ "灵动专服-正式1", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE" , "china/zf_test"}, + new string[]{ "灵动专服-正式2", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE2" , "china/zf_test"}, + new string[]{ "灵动专服-正式3", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE3" , "china/zf_test"}, new string[]{ "喜扑", "Logo_cn_xipu", "MHT_CN_XIPU", "china/zf_test"}, new string[]{ "草花", "Logo_cn_caohua", "MHT_CN_MIDDLE_WARE" , "china/zf_test"}, new string[]{ "游心", "Logo_cn_youxin", "MHT_CN_YOUXIN", "china/zf_test"}, From cb4c81b42071119b9f16f4f8b09a9a85dac51814 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 17 Sep 2021 17:00:59 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A3=85=E5=A4=87=E7=95=8C=E9=9D=A2=E5=8D=A1?= =?UTF-8?q?=E9=A1=BF=EF=BC=8C=E4=B8=80=E9=94=AE=E5=8D=B8=E4=B8=8B/?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=8D=A1=E9=A1=BF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Net/NetManager.lua | 2 + .../Modules/RoleInfo/EquipTreasureManager.lua | 71 +++++++++++++++---- 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 04217055c0..1b56379a40 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -599,6 +599,8 @@ function this.EquipTreasureBuildRequest(_IdDyn, _type,_mats,func) if func then func(msg) end + -- 宝物属性改变需要重新计算战斗力 + EquipTreasureManager.SetTreasureDirty(_IdDyn, true) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua index 9ff76e992b..2fa4343018 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua @@ -8,6 +8,7 @@ local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig) local EquipTreasureData = require("Modules.RoleInfo.EquipTreasureData") function this.Initialize() + this.TreasurePowerData = {} end --初始化所有宝器数据 function this.InitAllEquipTreasure(_equipData) @@ -524,21 +525,65 @@ end --计算战斗力 function this.CalculateWarForce(Did) - local curTreasure = allTreasures[Did] - if not curTreasure then - curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did) + -- Log("CalculateWarForce "..Did) + local power = 0 + if this.IsTreasureDirty(Did) then + local curTreasure = allTreasures[Did] + if not curTreasure then + curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did) + end + if not curTreasure then + curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did) + end + if not curTreasure then + curTreasure = GoodFriendManager.GetSingleTreasureByIdDyn(Did) + end + if curTreasure then + power = this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv,curTreasure) + end + this.SetTreasurePower(Did, power) + this.SetTreasureDirty(Did, false) + else + if this.TreasurePowerData and this.TreasurePowerData[Did] then + power = this.TreasurePowerData[Did].power or 0 + end end - if not curTreasure then - curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did) - end - if not curTreasure then - curTreasure = GoodFriendManager.GetSingleTreasureByIdDyn(Did) - end - if curTreasure then - return this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv,curTreasure) - end - return 0 + return power end + +-- 判断脏数据 +function this.IsTreasureDirty(dId) + if not this.TreasurePowerData then + this.TreasurePowerData = {} + end + if not this.TreasurePowerData[dId] then + this.TreasurePowerData[dId] = {} + end + return this.TreasurePowerData[dId].isDirty ~= false +end +-- 设置脏数据 +function this.SetTreasureDirty(dId, isDirty) + if not this.TreasurePowerData then + this.TreasurePowerData = {} + end + if not this.TreasurePowerData[dId] then + this.TreasurePowerData[dId] = {} + end + this.TreasurePowerData[dId].isDirty = isDirty ~= false +end +-- 设置宝物战斗力 +function this.SetTreasurePower(dId, power) + if not this.TreasurePowerData then + this.TreasurePowerData = {} + end + if not this.TreasurePowerData[dId] then + this.TreasurePowerData[dId] = {} + end + this.TreasurePowerData[dId].power = power or 0 +end + + + function this.CalculateWarForceBase(sId, lv, rlv, tlv,curTreasure) -- LogGreen("sId:"..sId.." lv:"..lv.." rlv:"..rlv.." tlv:"..tlv) local curEuipTreaSureConfig = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId) From 071e7db7487d95980a40a56c5879e9810efd0519 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 17 Sep 2021 19:22:45 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E3=80=90=E9=85=8D=E7=BD=AE=E3=80=91?= =?UTF-8?q?=E6=89=93=E5=8C=85=E5=92=8C=E5=90=8C=E6=AD=A5=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=9C=8D=E4=BF=AE=E6=94=B9=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=B7=A5=E7=A8=8B=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Editor/AutoPack.cs | 145 ++++++++++-------- Assets/Editor/ClientConfigManager.cs | 25 +++ .../ExcelTool/DataConfig/DataConfigWindow.cs | 22 ++- 3 files changed, 124 insertions(+), 68 deletions(-) diff --git a/Assets/Editor/AutoPack.cs b/Assets/Editor/AutoPack.cs index f8b1c1ca05..61e38742b4 100644 --- a/Assets/Editor/AutoPack.cs +++ b/Assets/Editor/AutoPack.cs @@ -4,36 +4,30 @@ using System.IO; using System; using GameEditor.FrameTool; using GameEditor.Util; +using System.Collections; +using System.Collections.Generic; + +public class PackConfig +{ + public string name; + public string scene; + public string project; + public string version; + public string bench; + public PackConfig(string _name, string _scene, string _project, string _version, string _bench) + { + name = _name; + scene = _scene; + project = _project; + version= _version; + bench = _bench; + } +} + public class AutoPack : EditorWindow { - static string[][] PackConfig = new string[][] - { - // 内网包 - new string[]{ "内网包", "Logo_gm_nosdk", "TCX_LOCAL", "china/local"}, - - // 专服 - new string[]{ "C轮v2", "Logo_gm_nosdk", "TCX_TEST_C_V2", "china/zf_test"}, - new string[]{ "灵动专服-测试", "Logo_gn_zf_test", "MHT_GN_ZF_TEST" , "china/zf_test"}, - new string[]{ "灵动专服-正式1", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE" , "china/zf_test"}, - new string[]{ "灵动专服-正式2", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE2" , "china/zf_test"}, - new string[]{ "灵动专服-正式3", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE3" , "china/zf_test"}, - new string[]{ "喜扑", "Logo_cn_xipu", "MHT_CN_XIPU", "china/zf_test"}, - new string[]{ "草花", "Logo_cn_caohua", "MHT_CN_MIDDLE_WARE" , "china/zf_test"}, - new string[]{ "游心", "Logo_cn_youxin", "MHT_CN_YOUXIN", "china/zf_test"}, - new string[]{ "动游", "Logo_cn_dongyou", "MHT_CN_DONGYOU", "china/zf_test"}, - new string[]{ "渠道-MHT", "Logo_gn_zf_quick", "MHT_GN_ZF_QUICK", "china/zf_test"}, - new string[]{ "渠道-Quick", "Logo_cn_quick", "MHT_CN_QUICK" , "china/zf_test"}, - - // 灵动商务 - new string[]{ "灵动商务", "Logo_mht_sw", "MHT_GN_SW" , "china/mht_sw"}, - - //先遣 - new string[]{ "跨服", "LogoChinaXQCS", "MHT_GN_KUAFU", "china/xq"}, - new string[]{ "先遣-测试", "LogoChinaXQCS", "MHT_GN_XQ_TEST", "china/xq"}, - new string[]{ "先遣", "LogoChinaXQ", "MHT_GN_XQ", "china/xq"}, - - }; + static List PackConfig = new List(); #if UNITY_ANDROID static string Platform = "Android"; @@ -77,7 +71,25 @@ public class AutoPack : EditorWindow ScenePath = Application.dataPath + "/LuaFramework/Scenes/"; ABPath = Application.dataPath + "/../BuildABs/" + Platform + "/"; ExportType = 2; - Chooser = new bool[PackConfig.Length]; + // 加载配置 + LoadConfig(); + } + + static void LoadConfig() + { + Hashtable config = ClientConfigManager.Instance.GetAutoPackConfig(); + foreach (string k in config.Keys) + { + Hashtable ht = config[k] as Hashtable; + string name = k; + string scene = ht["scene"] as string; + string project = ht["project"] as string; + string version = ht["version"] as string; + string bench = ht["bench"] as string; + PackConfig.Add(new PackConfig(name, scene, project, version, bench)); + } + + Chooser = new bool[PackConfig.Count]; } /// @@ -139,31 +151,31 @@ public class AutoPack : EditorWindow EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.LabelField("请选择要打的包:"); - for(int i = 0; i < PackConfig.Length; i++) + for(int i = 0; i < PackConfig.Count; i++) { - if (PackConfig[i][3].Equals(benchName)) + if (PackConfig[i].bench.Equals(benchName)) { EditorGUILayout.BeginVertical(); - Chooser[i] = EditorGUILayout.ToggleLeft(PackConfig[i][0], Chooser[i]); + Chooser[i] = EditorGUILayout.ToggleLeft(PackConfig[i].name, Chooser[i]); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("编辑Config", GUILayout.Height(20f))) { - string tpath = _MomPackPath + PackConfig[i][2] + "/Config/" + ConfigFileName; + string tpath = ClientConfigManager.Instance.GetClientConfigPath() + "/Version/" + PackConfig[i].version + "/" + ConfigFileName; GameEditor.Util.ProcessUtil.OpenText(tpath); } if (GUILayout.Button("编辑Version", GUILayout.Height(20f))) { - string tpath = _MomPackPath + PackConfig[i][2] + "/Config/" + VersionFileName; + string tpath = ClientConfigManager.Instance.GetClientConfigPath() + "/Version/" + PackConfig[i].version + "/" + VersionFileName; GameEditor.Util.ProcessUtil.OpenText(tpath); } if (GUILayout.Button("编辑Gradle", GUILayout.Height(20f))) { - string tpath = _MomPackPath + PackConfig[i][2] + "/build.gradle"; + string tpath = _MomPackPath + PackConfig[i].project + "/build.gradle"; GameEditor.Util.ProcessUtil.OpenText(tpath); } if (GUILayout.Button("更新蓝鲸SDK", GUILayout.Height(20f))) { - File.Copy(_MomPackPath + "BlueWhaleJar/app/build/outputs/aar/app-release.aar", _MomPackPath + PackConfig[i][2] + "/libs/BlueWhale.aar", true); + File.Copy(_MomPackPath + "BlueWhaleJar/app/build/outputs/aar/app-release.aar", _MomPackPath + PackConfig[i].project + "/libs/BlueWhale.aar", true); Debug.Log("更新完成"); } EditorGUILayout.EndHorizontal(); @@ -197,16 +209,16 @@ public class AutoPack : EditorWindow for (int i = 0; i < Chooser.Length; i++) { if (!Chooser[i]) continue; - string sceneFilePath = ScenePath + PackConfig[i][1]; + string sceneFilePath = ScenePath + PackConfig[i].scene; if (!File.Exists(sceneFilePath + ".unity")) { - Debug.LogError(PackConfig[i][0] + " 未找到场景:" + sceneFilePath); + Debug.LogError(PackConfig[i].name + " 未找到场景:" + sceneFilePath); check_result = true; } - string momPath = _MomPackPath + PackConfig[i][2]; + string momPath = _MomPackPath + PackConfig[i].project; if (!Directory.Exists(momPath)) { - Debug.LogError(PackConfig[i][0] + " 未找到母包:" + momPath); + Debug.LogError(PackConfig[i].name + " 未找到母包:" + momPath); check_result = true; } } @@ -252,7 +264,7 @@ public class AutoPack : EditorWindow public static void CreateLogFile(int index) { - APKPath = _MomPackPath + PackConfig[index][2] + "/APK/"; + APKPath = _MomPackPath + PackConfig[index].project + "/APK/"; if (!Directory.Exists(APKPath)) { Directory.CreateDirectory(APKPath); @@ -268,7 +280,7 @@ public class AutoPack : EditorWindow // 导出android 工程 public static void ExportAS(int index) { - string pName = PackConfig[index][1] + "__" + PackConfig[index][2]; + string pName = PackConfig[index].scene + "__" + PackConfig[index].project; PlayerSettings.productName = pName; PlayerSettings.Android.useAPKExpansionFiles = isObb; if (isObb) @@ -287,8 +299,8 @@ public class AutoPack : EditorWindow EditorUserBuildSettings.exportAsGoogleAndroidProject = true; EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle; // 设置需要打包的场景 - string launchScene = "Assets/LuaFramework/Scenes/" + PackConfig[index][1] + ".unity"; - Debug.Log(PackConfig[index][0] + ":打包场景:" + launchScene); + string launchScene = "Assets/LuaFramework/Scenes/" + PackConfig[index].scene + ".unity"; + Debug.Log(PackConfig[index].name + ":打包场景:" + launchScene); BuildPlayerOptions bpo = new BuildPlayerOptions(); bpo.locationPathName = ExportPackPath; bpo.options = BuildOptions.None; @@ -297,8 +309,8 @@ public class AutoPack : EditorWindow bpo.target = BuildTarget.Android; // 调用开始打包 BuildPipeline.BuildPlayer(bpo); - Debug.Log(PackConfig[index][0] + ":android工程导出路径" + ExportPackPath + "/" + pName); - Debug.Log(PackConfig[index][0] + ":android工程导出完成"); + Debug.Log(PackConfig[index].name + ":android工程导出路径" + ExportPackPath + "/" + pName); + Debug.Log(PackConfig[index].name + ":android工程导出完成"); } static string[] ReplaceDir = new string[] @@ -314,8 +326,8 @@ public class AutoPack : EditorWindow // 从工程中替换 private static void ReplaceFromProject(int index) { - string fromPath = ExportPackPath + "/" + PackConfig[index][1] + "__" + PackConfig[index][2]; - string toPath = _MomPackPath + PackConfig[index][2]; + string fromPath = ExportPackPath + "/" + PackConfig[index].scene + "__" + PackConfig[index].project; + string toPath = _MomPackPath + PackConfig[index].project; for (int i = 0; i < ReplaceDir.Length; i++) { string dir = ReplaceDir[i]; @@ -336,13 +348,13 @@ public class AutoPack : EditorWindow }); EditorUtility.ClearProgressBar(); } - Debug.Log(PackConfig[index][0] + ":母包工程资源替换完成"); + Debug.Log(PackConfig[index].name + ":母包工程资源替换完成"); // 替换build-id EditorUtility.DisplayProgressBar("重写AndroidManifest", "", 0.5f); RewriteManifest(fromPath + "/src/main/AndroidManifest.xml", toPath + "/src/main/AndroidManifest.xml"); - Debug.Log(PackConfig[index][0] + ":母包Manifest修改完成"); + Debug.Log(PackConfig[index].name + ":母包Manifest修改完成"); EditorUtility.ClearProgressBar(); } private static void RewriteManifest(string f, string t) @@ -389,7 +401,7 @@ public class AutoPack : EditorWindow // 从AB包替换 private static void ReplaceFromAB(int index) { - string toPath = _MomPackPath + PackConfig[index][2] + "/src/main/assets/Android"; + string toPath = _MomPackPath + PackConfig[index].project + "/src/main/assets/Android"; if (Directory.Exists(toPath)) Directory.Delete(toPath, true); Directory.CreateDirectory(toPath); GameCore.FileUtils.ReplaceDir(ABPath, toPath, (string dirName, string fileName, float progress) => @@ -397,18 +409,23 @@ public class AutoPack : EditorWindow EditorUtility.DisplayProgressBar("正在复制:" + dirName, fileName, progress); }); EditorUtility.ClearProgressBar(); - Debug.Log(PackConfig[index][0] + ":替换AB包完成"); + Debug.Log(PackConfig[index].name + ":替换AB包完成"); } // 替换配置文件 private static void ReplaceConfigAndVersion(int index) { - EditorUtility.DisplayProgressBar("替换配置文件", "", 0.5f); - string toPath = _MomPackPath + PackConfig[index][2] + "/src/main/assets/Android/"; - string fromPath = _MomPackPath + PackConfig[index][2] + "/Config/"; + EditorUtility.DisplayProgressBar("替换配置文件1", "", 0.5f); + string fromPath = ClientConfigManager.Instance.GetClientConfigPath() + "/Version/" + PackConfig[index].version + "/"; + string toPath = _MomPackPath + PackConfig[index].project + "/Config/"; File.Copy(fromPath + ConfigFileName, toPath + ConfigFileName, true); File.Copy(fromPath + VersionFileName, toPath + VersionFileName, true); - Debug.Log(PackConfig[index][0]+":配置文件替换完成"); + EditorUtility.DisplayProgressBar("替换配置文件2", "", 0.5f); + fromPath = toPath; + toPath = _MomPackPath + PackConfig[index].project + "/src/main/assets/Android/"; + File.Copy(fromPath + ConfigFileName, toPath + ConfigFileName, true); + File.Copy(fromPath + VersionFileName, toPath + VersionFileName, true); + Debug.Log(PackConfig[index].name+":配置文件替换完成"); EditorUtility.ClearProgressBar(); } @@ -416,17 +433,17 @@ public class AutoPack : EditorWindow private static void StartGradleBuild(int index) { EditorUtility.DisplayProgressBar("正在生成APK", "", 0f); - GameEditor.Util.ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "gradlew assembleRelease>>" + APKPath + "/_log.txt"); + GameEditor.Util.ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index].project, "gradlew assembleRelease>>" + APKPath + "/_log.txt"); EditorUtility.DisplayProgressBar("正在导出APK", "", 1f); - string versionStr = GetAPKVersionStr(PackConfig[index][2]); - string apkFilePath = _MomPackPath + PackConfig[index][2] + "/build/outputs/apk/release/" + PackConfig[index][2] + "-release.apk"; + string versionStr = GetAPKVersionStr(PackConfig[index].project); + string apkFilePath = _MomPackPath + PackConfig[index].project + "/build/outputs/apk/release/" + PackConfig[index].project + "-release.apk"; if (File.Exists(apkFilePath)) { - File.Copy(apkFilePath, APKPath + "/" + PackConfig[index][0] +"_"+ PackConfig[index][2] + "_" + versionStr + "_" + PackTime + ".apk"); + File.Copy(apkFilePath, APKPath + "/" + PackConfig[index].name +"_"+ PackConfig[index].project + "_" + versionStr + "_" + PackTime + ".apk"); } - Debug.Log(PackConfig[index][0] + ":打包完成"); + Debug.Log(PackConfig[index].name + ":打包完成"); EditorUtility.ClearProgressBar(); } @@ -460,17 +477,17 @@ public class AutoPack : EditorWindow { if (CommitToGit) { - string versionStr = GetAPKVersionStr(PackConfig[index][2]); + string versionStr = GetAPKVersionStr(PackConfig[index].project); EditorUtility.DisplayProgressBar("正在提交修改", "", 0f); string printlog = ">>" + APKPath + "/_log.txt"; string[] commands = new string[]{ "echo git add ." + printlog, "git add ." + printlog, - "echo git commit -m 'AutoPack:" + PackConfig[index][0] +"_"+ PackConfig[index][2] + "_" + versionStr + "_" + PackTime + ".apk'" + printlog, - "git commit -m 'AutoPack:" + PackConfig[index][0] +"_"+ PackConfig[index][2] + "_" + versionStr + "_" + PackTime + ".apk'" + printlog, + "echo git commit -m 'AutoPack:" + PackConfig[index].name +"_"+ PackConfig[index].project + "_" + versionStr + "_" + PackTime + ".apk'" + printlog, + "git commit -m 'AutoPack:" + PackConfig[index].name +"_"+ PackConfig[index].project + "_" + versionStr + "_" + PackTime + ".apk'" + printlog, "git push", }; - ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], commands); + ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index].project, commands); EditorUtility.ClearProgressBar(); } diff --git a/Assets/Editor/ClientConfigManager.cs b/Assets/Editor/ClientConfigManager.cs index 73f3eb6a35..5abc4a1359 100644 --- a/Assets/Editor/ClientConfigManager.cs +++ b/Assets/Editor/ClientConfigManager.cs @@ -61,6 +61,31 @@ public class ClientConfigManager return config; } + // 获取打包工具配置文件 + public Hashtable GetAutoPackConfig() + { + string hotfixConfig = localPath + "/AutoPack.txt"; + Hashtable config = null; + if (File.Exists(hotfixConfig)) + { + string s = File.ReadAllText(hotfixConfig); + config = MiniJSON.jsonDecode(s) as Hashtable; + } + return config; + } + // 获取校验服同步工程配置文件 + public Hashtable GetFightServerConfig() + { + string hotfixConfig = localPath + "/FightServer.txt"; + Hashtable config = null; + if (File.Exists(hotfixConfig)) + { + string s = File.ReadAllText(hotfixConfig); + config = MiniJSON.jsonDecode(s) as Hashtable; + } + return config; + } + // 获取svn工程根目录路径 public string GetClientConfigPath() { diff --git a/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs b/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs index 7e3fe69c3f..b75b22db7c 100644 --- a/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs +++ b/Assets/Scripts/Editor/ExcelTool/DataConfig/DataConfigWindow.cs @@ -1,6 +1,7 @@ using GameCore; using GameEditor.Util; using System; +using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -33,10 +34,8 @@ namespace GameEditor.Core.DataConfig [MenuItem("Data Config/Export")] private static void ShowConfigWin() { - ServerBattleConfig.Clear(); - ServerBattleConfig.Add("china/dev", "test"); - ServerBattleConfig.Add("china/xq", "master_zh_test"); - ServerBattleConfig.Add("china/zf_test", "master_zh_online_special"); + // 加载配置文件 + LoadConfig(); m_CurGitBench = GitUtil.GetCurBenchName(); ServerBattleConfig.TryGetValue(m_CurGitBench, out m_CurServerBattlePath); @@ -52,6 +51,21 @@ namespace GameEditor.Core.DataConfig win.titleContent = new GUIContent("Export"); win.Show(); } + + // 加载配置文件 + static void LoadConfig() + { + ServerBattleConfig.Clear(); + Hashtable config = ClientConfigManager.Instance.GetFightServerConfig(); + foreach (string k in config.Keys) + { + Hashtable ht = config[k] as Hashtable; + string folder = ht["folder"] as string; + string bench = ht["bench"] as string; + XDebug.Log.l(folder, bench); + ServerBattleConfig.Add(bench, folder); + } + } //提供给打包工具调用的一键导表接口 public static void PyCallBuildData() { From abe720d43d0a85152c5cb6ed7e1961d40386d249 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 17 Sep 2021 20:04:53 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E3=80=90=E9=99=90=E6=97=B6=E5=8F=AC?= =?UTF-8?q?=E5=94=A4=E3=80=91=E4=BF=AE=E5=A4=8D=E5=A5=96=E5=8A=B1=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/GeneralPanel/GeneralBigPopup.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua index fa38d9ca59..081219a67b 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua @@ -93,12 +93,12 @@ function GeneralBigPopup:OnOpen(popupKey,...) this.Mask:SetActive(popupKey ~= GENERAL_POPUP_TYPE.Onhook) this.BG:SetActive(popupKey ~= GENERAL_POPUP_TYPE.Onhook) this.popupKey = popupKey - this.args = ... + this.args = {...} end function GeneralBigPopup:OnShow() contentPrefabs[this.popupKey].gameObject:SetActive(true) - contentScripts[this.popupKey].view:OnShow(this,this.args)--1、传入自己 2、传入不定参 + contentScripts[this.popupKey].view:OnShow(this, unpack(this.args))--1、传入自己 2、传入不定参 end function GeneralBigPopup:OnClose() From 7f988480b1572e0f7d5570e47e8e582045f5c208 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 09:50:37 +0800 Subject: [PATCH 13/19] =?UTF-8?q?=E3=80=90=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=91=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E6=9C=AA?= =?UTF-8?q?=E6=B8=85=E7=90=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Editor/AutoPack.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Editor/AutoPack.cs b/Assets/Editor/AutoPack.cs index 61e38742b4..3f16f85a3e 100644 --- a/Assets/Editor/AutoPack.cs +++ b/Assets/Editor/AutoPack.cs @@ -77,6 +77,7 @@ public class AutoPack : EditorWindow static void LoadConfig() { + PackConfig.Clear(); Hashtable config = ClientConfigManager.Instance.GetAutoPackConfig(); foreach (string k in config.Keys) { @@ -119,7 +120,7 @@ public class AutoPack : EditorWindow benchName = GitUtil.GetCurBenchName(); UnityEngine.Debug.Log("当前分支:" + benchName); //创建窗口 - Rect wr = new Rect(0, 0, 500, 700); + Rect wr = new Rect(0, 0, 500, 1000); var buildWin = GetWindowWithRect(wr, true); buildWin.titleContent = new GUIContent("打包工具"); buildWin.Show(); From e548fa6591283587454a32c80f66e3076109def1 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Sat, 18 Sep 2021 10:38:18 +0800 Subject: [PATCH 14/19] =?UTF-8?q?=E3=80=90=E5=AF=BB=E5=AE=9D=E8=BF=B7?= =?UTF-8?q?=E8=B8=AA=E3=80=91log=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua index 46c9c5c480..eb116e29ac 100644 --- a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua @@ -143,8 +143,8 @@ function XunBaoMiZongMap:LoadMapData() self.oldPos = Vector3.New(2501,-2607,10)--设置初始位置 --最终奖励点信息 self.curRewardPointData = ConfigManager.GetConfigData(ConfigName.MainLevelSettingConfig,math.random(1,15)) + Log("当前奖励点名字:"..tostring(self.curRewardPointData.Name).." 位置:"..tostring(self.curRewardPointData.ChapterCenterPosition[1]).."#"..tostring(self.curRewardPointData.ChapterCenterPosition[2])) self.rewardPos = Vector2.New(self.curRewardPointData.ChapterCenterPosition[1],self.curRewardPointData.ChapterCenterPosition[2]) - Log("当前奖励点名字:"..tostring(self.curRewardPointData.Name)) local thread = coroutine.start(function() coroutine.wait(1) From 45e24095f650496f177a0cf7e0bb521b8d186bfd Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Sat, 18 Sep 2021 10:40:54 +0800 Subject: [PATCH 15/19] =?UTF-8?q?Revert=20"=E3=80=90=E5=AF=BB=E5=AE=9D?= =?UTF-8?q?=E8=BF=B7=E8=B8=AA=E3=80=91log=E5=A2=9E=E5=8A=A0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e548fa6591283587454a32c80f66e3076109def1. --- .../~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua index eb116e29ac..46c9c5c480 100644 --- a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongMapPanel.lua @@ -143,8 +143,8 @@ function XunBaoMiZongMap:LoadMapData() self.oldPos = Vector3.New(2501,-2607,10)--设置初始位置 --最终奖励点信息 self.curRewardPointData = ConfigManager.GetConfigData(ConfigName.MainLevelSettingConfig,math.random(1,15)) - Log("当前奖励点名字:"..tostring(self.curRewardPointData.Name).." 位置:"..tostring(self.curRewardPointData.ChapterCenterPosition[1]).."#"..tostring(self.curRewardPointData.ChapterCenterPosition[2])) self.rewardPos = Vector2.New(self.curRewardPointData.ChapterCenterPosition[1],self.curRewardPointData.ChapterCenterPosition[2]) + Log("当前奖励点名字:"..tostring(self.curRewardPointData.Name)) local thread = coroutine.start(function() coroutine.wait(1) From aa6bb5d606d84140a6d4b68779421d6c7fa9519e Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 10:45:31 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=E3=80=90=E6=98=93=E7=BB=8F=E5=AE=9D?= =?UTF-8?q?=E5=BA=93=E3=80=91=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E8=A1=A8?= =?UTF-8?q?BasicPoolId=E5=88=97=E6=97=A0=E6=B3=95=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=EF=BC=8C=E5=B0=86=E6=95=B0=E6=8D=AE=E6=A0=BC=E5=BC=8F=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/DynamicActivity/DynamicActivityManager.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua index 3921f63529..cfcd34bf51 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua @@ -213,15 +213,14 @@ function this.GetBaoKuData() end end end - + local BasicPoolId = string.split(BlessingConfigNew.BasicPoolId, "#") --大奖和当前层数数据 for i = 1, 1100 do if ActInfo.mission[i] then local v = ActInfo.mission[i] if v.missionId == 100 then - -- LogYellow("层数:"..v.progress) actData.curLevel = v.progress - curBasicPool = BlessingConfigNew.BasicPoolId[v.progress] + curBasicPool = tonumber(BasicPoolId[v.progress]) curFinalPool = BlessingConfigNew.FinalPoolId elseif v.missionId > 1000 then local data = {} From 9da6a4294794518e1a13114998a32488d21eb8e1 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 10:56:35 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=E3=80=90=E6=83=8A=E5=96=9C=E7=A4=BC?= =?UTF-8?q?=E7=9B=92=E3=80=91=E4=BF=AE=E5=A4=8D=E6=B4=BB=E5=8A=A8=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=EF=BC=8C=E7=BB=A7=E7=BB=AD=E8=B4=AD=E4=B9=B0=E5=8D=A1?= =?UTF-8?q?=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/SurpriseBox/SurpriseBoxPanel.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/SurpriseBox/SurpriseBoxPanel.lua b/Assets/ManagedResources/~Lua/Modules/SurpriseBox/SurpriseBoxPanel.lua index 85eaa53cc8..ebf622dc78 100644 --- a/Assets/ManagedResources/~Lua/Modules/SurpriseBox/SurpriseBoxPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/SurpriseBox/SurpriseBoxPanel.lua @@ -143,6 +143,12 @@ function SurpriseBox:ShowSingleData(item,data,index) end Util.AddOnceClick(getBtn,function () + local actData = CommonActPageManager.GetData(ActivityTypeDef.SurpriseBox) + if not actData then + PopupTipPanel.ShowTip("活动已关闭") + self:ClosePanel() + return + end if data.progress == 1 then--完成所有条件,可购买 PayManager.Pay(data.otherData.PackId, function(id) FirstRechargeManager.RefreshAccumRechargeValue(data.otherData.PackId) From 0e86945c5324882ec9847cbf39936ea1f3f3c6df Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 10:56:55 +0800 Subject: [PATCH 18/19] =?UTF-8?q?Revert=20"=E3=80=90=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E8=A3=85=E5=A4=87=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=8D=A1=E9=A1=BF=EF=BC=8C=E4=B8=80=E9=94=AE=E5=8D=B8=E4=B8=8B?= =?UTF-8?q?/=E8=A3=85=E5=A4=87=E5=8D=A1=E9=A1=BF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit cb4c81b42071119b9f16f4f8b09a9a85dac51814. --- .../~Lua/Modules/Net/NetManager.lua | 2 - .../Modules/RoleInfo/EquipTreasureManager.lua | 71 ++++--------------- 2 files changed, 13 insertions(+), 60 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 1b56379a40..04217055c0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -599,8 +599,6 @@ function this.EquipTreasureBuildRequest(_IdDyn, _type,_mats,func) if func then func(msg) end - -- 宝物属性改变需要重新计算战斗力 - EquipTreasureManager.SetTreasureDirty(_IdDyn, true) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua index 2fa4343018..9ff76e992b 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua @@ -8,7 +8,6 @@ local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig) local EquipTreasureData = require("Modules.RoleInfo.EquipTreasureData") function this.Initialize() - this.TreasurePowerData = {} end --初始化所有宝器数据 function this.InitAllEquipTreasure(_equipData) @@ -525,65 +524,21 @@ end --计算战斗力 function this.CalculateWarForce(Did) - -- Log("CalculateWarForce "..Did) - local power = 0 - if this.IsTreasureDirty(Did) then - local curTreasure = allTreasures[Did] - if not curTreasure then - curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did) - end - if not curTreasure then - curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did) - end - if not curTreasure then - curTreasure = GoodFriendManager.GetSingleTreasureByIdDyn(Did) - end - if curTreasure then - power = this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv,curTreasure) - end - this.SetTreasurePower(Did, power) - this.SetTreasureDirty(Did, false) - else - if this.TreasurePowerData and this.TreasurePowerData[Did] then - power = this.TreasurePowerData[Did].power or 0 - end + local curTreasure = allTreasures[Did] + if not curTreasure then + curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did) end - return power + if not curTreasure then + curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did) + end + if not curTreasure then + curTreasure = GoodFriendManager.GetSingleTreasureByIdDyn(Did) + end + if curTreasure then + return this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv,curTreasure) + end + return 0 end - --- 判断脏数据 -function this.IsTreasureDirty(dId) - if not this.TreasurePowerData then - this.TreasurePowerData = {} - end - if not this.TreasurePowerData[dId] then - this.TreasurePowerData[dId] = {} - end - return this.TreasurePowerData[dId].isDirty ~= false -end --- 设置脏数据 -function this.SetTreasureDirty(dId, isDirty) - if not this.TreasurePowerData then - this.TreasurePowerData = {} - end - if not this.TreasurePowerData[dId] then - this.TreasurePowerData[dId] = {} - end - this.TreasurePowerData[dId].isDirty = isDirty ~= false -end --- 设置宝物战斗力 -function this.SetTreasurePower(dId, power) - if not this.TreasurePowerData then - this.TreasurePowerData = {} - end - if not this.TreasurePowerData[dId] then - this.TreasurePowerData[dId] = {} - end - this.TreasurePowerData[dId].power = power or 0 -end - - - function this.CalculateWarForceBase(sId, lv, rlv, tlv,curTreasure) -- LogGreen("sId:"..sId.." lv:"..lv.." rlv:"..rlv.." tlv:"..tlv) local curEuipTreaSureConfig = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId) From ac319513dcdbdec5de2c9fa1407c61978eca3a35 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 11:02:32 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E3=80=90ID1018514=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E5=9B=9B=E7=81=B5=E8=AF=95=E7=82=BC=E3=80=91=E7=BA=BF=E4=B8=8A?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E6=89=93=E5=BC=80=E6=88=98=E6=96=97=E7=BC=96?= =?UTF-8?q?=E9=98=9F=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Formation/FormationManager.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index 82bb152691..376b9f4f6c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -64,21 +64,27 @@ end --刷新编队数据 function this.UpdateFormation(msg) - Log("编队数量:" .. #msg.TeamPosInfo) this.formationList = {} -- this.curFormationIndex = this.SetCurFormationIndex() this.curFormationIndex = 1 for i, team in ipairs(msg.TeamPosInfo) do - LogGreen("team.teamId:"..team.teamId) + local isRefresh = false local oTeam = this.MakeAEmptyTeam(team.teamId) for j = 1, #team.teamHeroInfos do local teamHeroInfo = team.teamHeroInfos[j] - table.insert(oTeam.teamHeroInfos, teamHeroInfo) - HeroManager.SetHeroFormationList(teamHeroInfo.heroId,team.teamId,1) + if HeroManager.GetSingleHeroData(teamHeroInfo.heroId) then + table.insert(oTeam.teamHeroInfos, teamHeroInfo) + HeroManager.SetHeroFormationList(teamHeroInfo.heroId,team.teamId,1) + else + isRefresh = true + end end oTeam.teamPokemonInfos = {} this.formationList[team.teamId] = oTeam + if isRefresh then + FormationManager.RefreshFormation(team.teamId, this.formationList[team.teamId].teamHeroInfos, {}) + end end if #msg.TeamPosInfo == 0 then @@ -205,7 +211,9 @@ function this.GetFormationByID(teamId) local _v=tonumber(v) if teamId==_v and #this.formationList[teamId].teamHeroInfos<=0 then for n = 1, #this.formationList[1].teamHeroInfos do - table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n]) + if HeroManager.GetSingleHeroData(this.formationList[1].teamHeroInfos.heroId) then + table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n]) + end end -- FormationManager.RefreshFormation(teamId, this.formationList[teamId].teamHeroInfos, {})