From 27e4ab6e1a7475a747d7753a24b0e17ce4c47784 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 30 Mar 2021 11:08:55 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=20=E8=8E=B7=E5=8F=96=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E7=9A=84=E9=95=BF=E5=BA=A6=E6=96=B9=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 9 ++++++++- .../Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua | 2 +- .../~Lua/Modules/Battle/Logic/Role/Skill.lua | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index e4db578d20..8d1dd35252 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -931,7 +931,14 @@ function BattleUtil.CheckIsHit(atkRole, defRole,skill) end - +--获取table的长度 +function BattleUtil.LengthOfTable(table) + local length = 0 + for i, v in pairs(table) do + length = length + 1 + end + return length +end function BattleUtil.RandomAction(rand, action) if Random.Range01() <= rand and action then diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua index 7a3d1d1a00..f09ad9c3ec 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Monster/MonsterSkill/MSkill.lua @@ -66,7 +66,7 @@ function MSkill:Cast(func) --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26 --为解决攻击目标只剩被放逐的单位导致技能播放异常 self.effectCaster:ChooseTarget() - local targets=LengthOfTable(self:GetDirectTargetsNoExile()) + local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile()) if targets==0 and self.castDoneFunc then self.castDoneFunc() return diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 92533efb58..b8a4efca4f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -67,7 +67,7 @@ function Skill:Cast(func) --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26 --为解决攻击目标只剩被放逐的单位导致技能播放异常 self.effectCaster:ChooseTarget() - local targets=LengthOfTable(self:GetDirectTargetsNoExile()) + local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile()) if targets==0 and self.castDoneFunc then self.isRage=false self.castDoneFunc() From 54dec77b6bf7085f5c1473812e458fa2c0126adc Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Tue, 30 Mar 2021 10:38:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E3=80=90=E8=8B=B1=E9=9B=84=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E7=89=B9=E6=95=88=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index 726a966323..7abf17f47a 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -559,9 +559,10 @@ function RoleInfoLayout:DeleteLvUpMaterials(isSingleLvUp,msg) local allAddProValOld = allAddProVal parent:UpdateHeroInfoData()--刷新界面 this.ShowProAddVal(allAddProValOld) - - parent.upLvEffect:SetActive(false) - parent.upLvEffect:SetActive(true) + if isSingleLvUp then + parent.upLvEffect:SetActive(false) + parent.upLvEffect:SetActive(true) + end -- _isReqLvUp = false Timer.New(function() _isReqLvUp = false @@ -585,6 +586,8 @@ function RoleInfoLayout:DeleteLvUpMaterials2(msg) HeroManager.UpdateSingleHeroDatas(curHeroData.dynamicId,curHeroData.lv,curHeroData.star,curHeroData.breakId,curHeroData.upStarId,true) end parent:UpdateHeroInfoData()--刷新界面 + parent.upLvEffect:SetActive(false) + parent.upLvEffect:SetActive(true) end --长按升级处理 function this.OnUpdate() From 187ec35fbd3403fbdb1f9779250f1e575285b255 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 30 Mar 2021 17:25:03 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=90GM=E3=80=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=88=98=E6=96=97=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?GM=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index 2356484caa..dd4a9b93a4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -985,7 +985,7 @@ end -- 通过接口获取战斗数据 function this.RequestBattleDataByFightId(fightId, func) local uid = string.split(fightId, "_")[1] - local requestUrl = string.format("http://60.1.1.244:8888/req/getFightRecord?uid=%s&fightid=%s", uid, fightId) + local requestUrl = string.format("http://119.28.114.198:8888/req/getFightRecord?uid=%s&fightid=%s", uid, fightId) LogGreen(requestUrl) networkMgr:SendGetHttp(requestUrl, function(str) LogGreen(str) From 1689489c3c25c82ca7f9107069d727ca1246319c Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 30 Mar 2021 17:43:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=8C=E6=96=B9=E7=81=B5=E5=85=BD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF=EF=BC=8C=E6=88=91?= =?UTF-8?q?=E6=96=B9=E6=B2=A1=E6=9C=89=E7=81=B5=E5=85=BD=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=95=8C=E6=96=B9=E7=81=B5=E5=85=BD=E6=B6=88?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index dd4a9b93a4..9d41cf551e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -441,7 +441,7 @@ function this.GetBattleServerData(msg, isFightPlayer) fightData.enemyData[i].outData = data2.specialPassive -- 灵兽数据 fightData.enemyData[i].monsterList ={} - if data.pokemonUnitList then + if data2.pokemonUnitList then for k = 1, #data2.pokemonUnitList do fightData.enemyData[i].monsterList[k] = this.PokemonUnitAdapter(data2.pokemonUnitList[k],1) end