From be9f720590441aadc011f210ae69db1597eae0b8 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 7 Apr 2023 16:11:39 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=E7=A5=9E?= =?UTF-8?q?=E5=85=B5=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=8F=91=E8=BF=87=E6=9D=A5?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/BattleManager.lua | 75 +++++++++++-------- .../~Lua/Modules/Battle/Logic/BattleLogic.lua | 2 +- .../Logic/Weapon/WeaponSkillManager.lua | 2 +- .../Modules/Battle/View/Unit/EnemyView.lua | 3 + .../Modules/Battle/View/Unit/PlayerView.lua | 3 + .../GodWeapon/GodWeaponListPanel_List.lua | 3 +- .../Modules/JumpServer/GodsWayListPanel.lua | 1 + 7 files changed, 54 insertions(+), 35 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index 1825514754..2dc7743f13 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -139,34 +139,38 @@ function this.GetPassivityData(passivityList) local orderList = {} local coverList = {} for i = 1, #passivityList do - local passiveId = tonumber(passivityList[i]) + local passiveId = tonumber(passivityList[i]) + if passiveId then + LogError("passiveId======================"..passiveId) local cfg = PassiveSkillLogicConfig[passiveId] - -- 判断技能是否在战斗中生效 - if cfg and cfg.EffectiveRange == 1 then - -- 判断是否有需要覆盖的被动技能 - local coverId = cfg.CoverID - if coverId and coverId ~= 0 then - if orderList[coverId] then - orderList[coverId] = nil - end - coverList[coverId] = 1 - end - - -- 判断该被动技能是否已经被覆盖 - if not coverList[passiveId] then - -- 没有被覆盖,数据加入 - local pass = {} - if cfg and cfg.Type ~= 0 then - pass[1]=passiveId - pass[2]=cfg.Judge - pass[3] = cfg.Type - for j = 1, #cfg.Value do - pass[j + 3] = cfg.Value[j] + -- 判断技能是否在战斗中生效 + if cfg and cfg.EffectiveRange == 1 then + -- 判断是否有需要覆盖的被动技能 + local coverId = cfg.CoverID + if coverId and coverId ~= 0 then + if orderList[coverId] then + orderList[coverId] = nil + end + coverList[coverId] = 1 + end + + -- 判断该被动技能是否已经被覆盖 + if not coverList[passiveId] then + -- 没有被覆盖,数据加入 + local pass = {} + if cfg and cfg.Type ~= 0 then + pass[1]=passiveId + pass[2]=cfg.Judge + pass[3] = cfg.Type + for j = 1, #cfg.Value do + pass[j + 3] = cfg.Value[j] + end + orderList[passiveId] = pass end - orderList[passiveId] = pass end end - end + end + end -- 构建数据 @@ -354,6 +358,7 @@ function this.GodWeaponUnitAdapter(pokemonUnit,camp,_teamDamage) camp = camp, skill = {}, property = {}, + passivity = {}, } -- 技能 LogError("pokemonUnit.unitSkillIds=="..pokemonUnit.unitSkillIds) @@ -362,19 +367,25 @@ function this.GodWeaponUnitAdapter(pokemonUnit,camp,_teamDamage) if skills then if skills[1] then local actives=string.split(skills[1], "#") - + local passivityList1 = {} for i = 1, #actives do - role.skill[i]= this.WeaponSkillAdapter(tonumber(actives[i])) - local shenbing=ShenBingSkill[tonumber(actives[i])] - if shenbing and shenbing.PassiveSkill then - local passs=string.split(shenbing.PassiveSkill, "#") - local passivityList = {} + local skillId=tonumber(actives[i]) + role.skill[i]= this.WeaponSkillAdapter(skillId) + LogError("tonumber(actives[i])=="..skillId) + local shenbing=ShenBingSkill[skillId] + if shenbing and shenbing.PassiveSkill~=nil and #shenbing.PassiveSkill~=0 then + --local passs=string.split(shenbing.PassiveSkill, "#") + local passs=shenbing.PassiveSkill + for j = 1, #passs do - table.insert(passivityList, tonumber(passs[j])) + if passs[j]~=0 and passs[j]~=nil and tostring(passs[j])~=nil then + --LogError("passs[j]==="..passs[j]) + table.insert(passivityList1, passs[j]) + end end - role.passivity = this.GetPassivityData(passivityList) end end + role.passivity = this.GetPassivityData(passivityList1) end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua index b61ae0d3ec..509b1fa5f9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua @@ -204,7 +204,7 @@ function BattleLogic.InitOrder() local enemyMonsterList = orderList.monsterList if enemyMonsterList then for i=1, #enemyMonsterList do - MonsterManager.AddMonster(enemyMonsterList[i]) + MonsterManager.AddMonster(enemyMonsterList[i]) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Weapon/WeaponSkillManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Weapon/WeaponSkillManager.lua index b8ec6665bf..65829eee81 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Weapon/WeaponSkillManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Weapon/WeaponSkillManager.lua @@ -27,7 +27,7 @@ end -- 创建一个技能 function this.CreateMSkill(monster, group, index, skilldata,groupIndex) - LogError("创建神兵技能====================") + --LogError("创建神兵技能====================") local owner = group:GetOwner() local groupIndex = group.groupIndex local position = owner:GetCamp() * 6 + owner:GetPosition() diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua index f4d39c19a8..4a86281230 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua @@ -353,6 +353,9 @@ function EnemyView:DoScale(scale, dur, func) if self.dsTween then self.dsTween:Kill() end + if self.GameObject==nil then + return + end self.dsTween = self.GameObject.transform.parent:DOScale(Vector3.one * scale, dur) :OnComplete(function () -- Log("DoScale = "..scale) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua index 6d7253a88c..4746bf7def 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua @@ -378,6 +378,9 @@ function PlayerView:DoScale(scale, dur, func) if self.dsTween then self.dsTween:Kill() end + if self.GameObject==nil then + return + end self.dsTween = self.GameObject.transform.parent:DOScale(Vector3.one * scale, dur) :OnComplete(function () -- Log("DoScale = "..scale) diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_List.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_List.lua index 7ecad96717..f93044ae96 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_List.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_List.lua @@ -103,7 +103,7 @@ function this.OnClickTabBtn(_curIndex) this.ScrollParentView2:SetActive(true) pokemonChipList = BagManager.GetDataByItemType(ItemType.GodWeaponChip) this.PokemonChipDataSort(pokemonChipList) - if redPointList[1] then + if redPointList~=nil and redPointList[1]~=nil then redPointList[1]:SetActive(GodWeaponManager.WeaponChipCompoundRedPoint()) end for key, value in pairs(this.ChipItemList) do @@ -229,6 +229,7 @@ end function this:OnDestroy() this.spLoader:Destroy() + redPointList={} end return this diff --git a/Assets/ManagedResources/~Lua/Modules/JumpServer/GodsWayListPanel.lua b/Assets/ManagedResources/~Lua/Modules/JumpServer/GodsWayListPanel.lua index f228976fce..dadf993a36 100644 --- a/Assets/ManagedResources/~Lua/Modules/JumpServer/GodsWayListPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/JumpServer/GodsWayListPanel.lua @@ -80,6 +80,7 @@ function GodsWayListPanel:OnShow(...) --PopupTipPanel.ShowTip(Language[11330]) else PopupTipPanel.ShowTip("需二队塔通关100层后开启") + PopupTipPanel.ShowTip("暂未开启") end end