From 12e2cecaa1e44290c6369e18bf0b9bfe63c1ffbe Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 4 Apr 2023 11:15:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A5=9E=E5=85=B5=E5=B1=9E=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E7=A5=9E=E5=85=B5=E7=BE=81=E7=BB=8A=EF=BC=8C=E7=A5=9E=E5=85=B5?= =?UTF-8?q?=E5=88=86=E8=A7=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Common/GlobalDefine.lua | 1 + .../~Lua/Common/functions.lua | 10 +++ .../~Lua/Modules/Bag/BagManager.lua | 1 + .../GodWeapon/GodWeaponListPanel_UpWar.lua | 9 +++ .../Modules/GodWeapon/GodWeaponManager.lua | 63 +++++++++++++++++-- .../~Lua/Modules/Hero/HeroManager.lua | 23 +++++++ .../~Lua/Modules/Hero/PropFunc.lua | 39 ++++++++++++ .../~Lua/Modules/Net/NetManager.lua | 4 ++ .../View/GeneralPopup_PokemonRestore.lua | 2 + .../Resolve/View/Resolve_GodWeapon.lua | 45 ++++++++----- .../TianShuMiJuan/TianShuMiJuanMainPanel.lua | 2 +- .../TianShuMiJuan/TianShuMiJuanManger.lua | 13 ++++ 12 files changed, 188 insertions(+), 24 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 103440facc..83d36660dd 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -978,6 +978,7 @@ RedPointType = { TianShuMiJuan = 799, --天书秘卷红点 TianShuPokemon_Fetter = 800,--灵兽羁绊 Equip_Fetter = 805, --装备羁绊 + Weapon_Fetter = 806, --神兵羁绊 --跨服天梯 JumpServer_MainCity = 820,--主界面跨服天梯 diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index c8cd5f84ea..65f4734543 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -50,6 +50,16 @@ function CheckListIsContainValue1(_list,_value) return false end +function CheckListIsContainValue2(_list,_value) + if _list and _value then + for key, value in pairs(_list) do + if value[1] ==_value then + return true + end + end + end + return false +end --适配 function screenAdapte(go) diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua index d8d625f646..ab7c3b4abf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua @@ -1136,6 +1136,7 @@ function this.GetItemListFromTempBag(drop, isSave) itemdata.frame = GetHeroQuantityImageByquality(itemConfig.Quantity) itemdata.icon = GetResourcePath(itemConfig.ResourceID) itemdata.num = 1 + GodWeaponManager.AddHandBook(itemdata.sId) table.insert(itemDataList, itemdata) end end diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua index 140465710d..d633734bf5 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua @@ -83,6 +83,10 @@ function this.SingleItemDataShow(_go,_itemData) NetManager.RequestMagicSoldierLocation(_itemData.dynamicId,upPos,function() GodWeaponManager.SetWeaponUpZhen(_itemData.dynamicId,upPos) local godWeaponData=GodWeaponManager.GetSingleWeaponData(_itemData.dynamicId) + local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + --飘战力 + PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) + FormationManager.CheckHeroIdExist() Game.GlobalEvent:DispatchEvent(GameEvent.GodWeapon.RefreshGodWeaponInfoPanel,godWeaponData) parent:ClosePanel() end) @@ -114,6 +118,11 @@ function this.SingleItemDataShow(_go,_itemData) GodWeaponManager.SetWeaponUpZhen(_itemData.dynamicId,upZhenIndex) Game.GlobalEvent:DispatchEvent(GameEvent.Pokemon.PokemonUpZhenRefresh) this:OnShow(parent,nil,upZhenIndex) + local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + --飘战力 + PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) + FormationManager.CheckHeroIdExist() + parent:ClosePanel() end) end end) diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua index 6f4d2ee782..2375bfac47 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua @@ -12,7 +12,7 @@ end function this.InitAllGodWeaponData(msg) - LogError("#msg.infos============"..#msg.infos) + --LogError("#msg.infos============"..#msg.infos) for i = 1, #msg.infos do local GodWeapon={} GodWeapon.Did=msg.infos[i].id @@ -30,16 +30,27 @@ function this.InitAllGodWeaponData(msg) GodWeapon.config=shenBingConfig[staticId] allGodWeapons[GodWeapon.Did]=GodWeapon if pos~=0 then - LogError("pos============================="..pos) + --LogError("pos============================="..pos) godWeaponTeamInfo[pos]=GodWeapon end - LogError("static=="..staticId) + --LogError("static=="..staticId) end for i = 1, #msg.book do - LogError("msg.book[i]====="..msg.book[i]) + --LogError("msg.book[i]====="..msg.book[i]) handBook[msg.book[i]]=msg.book[i] end + HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Weapon) end + +function this.AddHandBook(id) + handBook[id]=id +end + + +function this.GetAllHandData() + return handBook +end + function this.GetAllWeapon() return allGodWeapons end @@ -48,6 +59,30 @@ function this.GetAllTeamWeapon() return godWeaponTeamInfo end +--移除多个灵兽数据 +function this.RemoveWeaponData(ids) + if not ids then + return + end + for i = 1,#ids do + local id=ids[i] + this.RemoveSingleWeaponData(id) + end +end + +--获取所有灵兽羁绊总和属性 (羁绊属性直接加在团队属性上) +function this.GetAllWeaponFetterAddPros() + return TianShuMiJuanManger.GetAllFetterAddProsBy(5) +end + +--移除灵兽数据 +function this.RemoveSingleWeaponData(_did) + if not _did then return end + if allGodWeapons[_did] then + allGodWeapons[_did] = nil + end +end + function this.GetAllTeamWeaponId() local list={} for key, value in pairs(godWeaponTeamInfo) do @@ -74,7 +109,7 @@ function this.InitSingleGodWeaponData(data) GodWeapon.config=shenBingConfig[staticId] allGodWeapons[GodWeapon.Did]=GodWeapon handBook[staticId]=staticId - LogError("single static=="..staticId) + --LogError("single static=="..staticId) end function this.GetSingleWeaponData(_id) @@ -129,7 +164,7 @@ end function this.GetNoUpZhenWeapons() local list={} for i = 1, #allGodWeapons do - LogError("allGodWeapons[i].point=="..allGodWeapons[i].point) + --LogError("allGodWeapons[i].point=="..allGodWeapons[i].point) end for key, value in pairs(allGodWeapons) do @@ -174,6 +209,7 @@ function this.SetWeaponUpZhen(id,pos) allGodWeapons[id].point=pos godWeaponTeamInfo[point1]=nil end + HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Weapon) end end @@ -194,8 +230,10 @@ end --获取灵兽编队属性 function this.GetPokemonFormationAddPro() local allPro = {} + --LogError("获取神兵编对属性-----------------------") for key, value in pairs(godWeaponTeamInfo) do if key and allGodWeapons[value.Did] then + --LogError("value.did=================="..value.Did) local curPokemonAddPro = this.GetSinglePokemonAddProData(value.Did) HeroManager.DoubleTableCompound(allPro, curPokemonAddPro) end @@ -203,6 +241,19 @@ function this.GetPokemonFormationAddPro() return allPro end +--获取神兵编队属性 在编队中的团队属性加成 除以英雄编队人数 +function this.GetWeaponFormationTeamAddPro(heroFormationNum) + local allPro = this.GetPokemonFormationAddPro() + -- local formationHeros = FormationManager.GetWuJinFormationHeroIds(formationIndex) + -- local heroFormationNum = #formationHeros + for key, value in pairs(allPro) do + --LogError("key====="..key.." value=="..value/heroFormationNum) + allPro[key] = math.floor(value/heroFormationNum) + end + return allPro +end + + --获取单个神兵属性 (灵兽属性/编队人数 神兵属性会平分给上阵的所有神将) function this.GetSinglePokemonAddProData(_did,_star,_lv)--_star 传值的话就用此星级计算属性 -- LogPink("_did 1 ".._did) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 3c8f450ab6..c622084122 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -1904,9 +1904,15 @@ function this.GetAllHeroTeamAddProVal(teamHeroInfos,curteamHeroDid) --灵兽编队加成 local pokemonFormationAllHeroProVal = PokemonManager.GetPokemonFormationTeamAddPro(heroAllNum) this.DoubleTableCompound(teamProVal, pokemonFormationAllHeroProVal) + --神兵编队加成 + local weaponFormationAllHeroProVal = GodWeaponManager.GetWeaponFormationTeamAddPro(heroAllNum) + this.DoubleTableCompound(teamProVal, weaponFormationAllHeroProVal) --灵兽羁绊加成 local pokemonFetterAddPro = PokemonManager.GetAllPokemonFetterAddPros() this.DoubleTableCompound(teamProVal, pokemonFetterAddPro) + --神兵羁绊加成 + local weaponFetterAddPro = GodWeaponManager.GetAllWeaponFetterAddPros() + this.DoubleTableCompound(teamProVal, weaponFetterAddPro) --神将羁绊加成 local heroFetterAddPro = TianShuMiJuanManger.GetAllFetterAddProsBy(1) this.DoubleTableCompound(teamProVal, heroFetterAddPro) @@ -2035,10 +2041,25 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt end LogRed_Prop("灵兽加成") LogRedTable_Prop(pokemonFormationAllHeroProVal) + --神兵 现在只在编队战力中计算 因为单个英雄可以上多个编队 + local weaponFormationAllHeroProVal = {} + if formationId then + local formation = FormationManager.GetFormationByID(formationId) + local formationHeroNum = #formation.teamHeroInfos + if formationHeroNum and formationHeroNum > 0 then + weaponFormationAllHeroProVal = GodWeaponManager.GetWeaponFormationTeamAddPro(formationHeroNum) + end + end + LogRed_Prop("神兵加成") + LogRedTable_Prop(weaponFormationAllHeroProVal) --灵兽羁绊 local pokemonFetterAddPro = PokemonManager.GetAllPokemonFetterAddPros() LogRed_Prop("灵兽羁绊 最终 加成 ") LogRedTable_Prop(pokemonFetterAddPro) + --神兵羁绊 + local weaponFetterAddPro=GodWeaponManager.GetAllWeaponFetterAddPros() + LogRed_Prop("神兵羁绊 最终 加成 ") + LogRedTable_Prop(weaponFetterAddPro) --神将羁绊 local heroFetterAddPro = TianShuMiJuanManger.GetAllFetterAddProsBy(1) LogRed_Prop("神将羁绊 最终 加成 ") @@ -2087,9 +2108,11 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt this.DoubleTableCompound(allHeroProVal, heroSkillAllHeroProVal) this.DoubleTableCompound(allHeroProVal, teamAddPro) this.DoubleTableCompound(allHeroProVal, pokemonFetterAddPro) + this.DoubleTableCompound(allHeroProVal, weaponFetterAddPro) this.DoubleTableCompound(allHeroProVal, heroFetterAddPro) this.DoubleTableCompound(allHeroProVal, hunyinFetterAddPro) this.DoubleTableCompound(allHeroProVal, pokemonFormationAllHeroProVal) + this.DoubleTableCompound(allHeroProVal, weaponFormationAllHeroProVal) this.DoubleTableCompound(allHeroProVal, practiceAddPro) end --4公式特殊(减乘)所有属性加成 diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/PropFunc.lua b/Assets/ManagedResources/~Lua/Modules/Hero/PropFunc.lua index 031b79590e..e0254bf742 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/PropFunc.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/PropFunc.lua @@ -18,6 +18,8 @@ Func_Prop_Type = { TailsManSou = 15, -- 法宝之魂 Incarnation = 16, --身外化身 Gem = 17, --命格 + Weapon =18, --神兵 + WeaponFetter=19, --神兵羁绊 } -- 计算需要缓存数据的方法 @@ -114,6 +116,24 @@ Func_Prop_Func = { local allPro = GemManager.GetAllAttri() return allPro end, + --神兵属性加成 + [Func_Prop_Type.Weapon] = function() + --LogError("计算神兵属性+++++++++++++++++++++++++++++") + local allPro = GodWeaponManager.GetPokemonFormationAddPro() + for key, value in pairs(allPro) do + allPro[key] = value + end + return allPro + end, + --神兵羁绊属性加成 + [Func_Prop_Type.WeaponFetter] = function() + --LogError("计算神兵羁绊+++++++++++++++++++++++++++++") + local allPro = GodWeaponManager.GetAllWeaponFetterAddPros() + for key, value in pairs(allPro) do + allPro[key] = value + end + return allPro + end, } @@ -195,4 +215,23 @@ Func_Prop_Filter = { [Func_Prop_Type.Gem] = function(funcData, heroData) return funcData end, + --神兵属性加成 + [Func_Prop_Type.Weapon] = function(funcData, heroData,formationId) + local heroFormationNum = FormationManager.GetCurIndexForMationNum(formationId) + if heroFormationNum <= 0 then + return {} + end + local allPro = {} + for key, value in pairs(funcData) do + if value > 0 then + allPro[key] = math.floor(value/heroFormationNum) + end + end + return allPro + end, + --神兵羁绊属性加成 + [Func_Prop_Type.WeaponFetter] = function(funcData, heroData) + return funcData + end, + } \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index b25348b355..8445a56769 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -277,9 +277,11 @@ function this.AllBookEnableResponse(func) end -- 设置脏数据 HeroPropManager.SetFuncPropDirty(Func_Prop_Type.PokemonFetter) + HeroPropManager.SetFuncPropDirty(Func_Prop_Type.WeaponFetter) HeroPropManager.SetFuncPropDirty(Func_Prop_Type.HeroFetter) HeroPropManager.SetFuncPropDirty(Func_Prop_Type.HunYinFetter) HeroPropManager.SetFuncPropDirty(Func_Prop_Type.EquipFetter) + HeroPropManager.SetFuncPropDirty(Func_Prop_Type.WeaponFetter) end) end @@ -5009,6 +5011,7 @@ function this.PokemonBookEnableRequest(id,func) msg:ParseFromString(data) --设置战斗力脏数据 HeroPropManager.SetFuncPropDirty(Func_Prop_Type.PokemonFetter) + HeroPropManager.SetFuncPropDirty(Func_Prop_Type.WeaponFetter) HeroPropManager.SetFuncPropDirty(Func_Prop_Type.HeroFetter) HeroPropManager.SetFuncPropDirty(Func_Prop_Type.HunYinFetter) HeroPropManager.SetFuncPropDirty(Func_Prop_Type.EquipFetter) @@ -7199,6 +7202,7 @@ function NetManager.RequestMagicSoldierStrong(_id,_type,_num,_costIds,_func) GodWeaponManager.SetGodWeaponUpStarCost(_costIds) end if _func then + HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Weapon) _func(msg) end end) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua index 26fc67c9a6..816357501f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua @@ -53,8 +53,10 @@ function this:OnShow(_parent,...) local type=args[3] if type==1 then this.infoTxt.text=Language[11576] + this.titleText.text=Language[11573] else this.infoTxt.text="确认要分解所选的神兵或神兵碎片?" + this.titleText.text="确认分解" end LogError("#args[1]====="..#args[1]) ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[1]) diff --git a/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_GodWeapon.lua b/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_GodWeapon.lua index d3a15a0be7..58ee3968fd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_GodWeapon.lua +++ b/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_GodWeapon.lua @@ -23,7 +23,7 @@ function this:InitComponent(gameObject) this.helpPos=this.helpBtn:GetComponent("RectTransform").localPosition --回溯按钮 this.confirmBtn=Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/ConfirmBtn") - Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/ConfirmBtn/Image"):GetComponent("Image").sprite=this.spLoader:LoadSprite("lingshou_fangshenganniu_zh") + Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/ConfirmBtn/Image"):GetComponent("Image").sprite=this.spLoader:LoadSprite("h_xianji_fenjieanniu_zh") this.shopBtn=Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/shopBtn") this.selectText = Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/selectNumText"):GetComponent("Text") this.selectBtn = Util.GetGameObject(gameObject,"Content/Resolve_GodWeapon/btns/selectBtn") @@ -110,21 +110,33 @@ function this:BindEvent() for key, value in pairs(selectHeroData) do --升级消耗 table.insert(pokemonIds,key) - local lvConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.SpiritAnimalLevel,"Level",value.lv,"Quality",value.quality) + local lvConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ShenBingLevel,"Level",value.lv,"Quality",value.quality) if lvConfig then local matrs=lvConfig.SumConsume if matrs then - for i = 1, #matrs do - local mat=matrs[i] - table.insert(allMaterials,{mat[1],mat[2]}) - end + for i = 1, #matrs do + local mat=matrs[i] + if CheckListIsContainValue2(allMaterials,mat[1]) then + --allMaterials[mat[1]]=allMaterials[mat[1]]+mat[2] + + for key, value in pairs(allMaterials) do + if value[1]==mat[1] then + value[2]=value[2]+mat[2] + end + end + else + table.insert(allMaterials,{mat[1],mat[2]}) + end + + end end end --升星消耗 - local lingshouConfig=ConfigManager.GetConfigData(ConfigName.SpiritAnimal,value.id) + local lingshouConfig=ConfigManager.GetConfigData(ConfigName.ShenBing,value.id) local haveNum=0 - if value.star>0 then - local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.SpiritAnimalStar,"Star",value.star,"Quality",value.quality) + if value.star>=0 then + LogError("value.star====="..value.star) + local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ShenbingStar,"Star",value.star,"Quality",value.quality) if starConfig then haveNum=starConfig.SumItemNum local starMatrs=starConfig.SumConsume @@ -136,12 +148,14 @@ function this:BindEvent() end end end + --消耗本体数量,分解成碎片 + LogError("havenum==="..haveNum) + allCoin=allCoin+starConfig.CoinReturn[2] end - --消耗本体数量,分解成碎片 - allCoin=allCoin+lingshouConfig.CoinReturn[2]*(haveNum+1) + end --加上所有的分解币 - table.insert(allMaterials,{1205,allCoin}) + table.insert(allMaterials,{22302,allCoin}) else--灵兽碎片 local itemConfig=ConfigManager.GetConfigData(ConfigName.ItemConfig,selectChipId) if itemConfig then @@ -162,10 +176,10 @@ function this:BindEvent() LogError("灵兽长度 "..#pokemonIds.."碎片id "..selectChipId.." num"..selectChipNum) if isPokemon then - NetManager.PokemonFreeRequest(pokemonIds,selectChipId,selectChipNum,function(msg) + NetManager.RequestMagicSoldierSpilt(pokemonIds,function(msg) UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1) if pokemonIds and #pokemonIds>0 then - PokemonManager.RemovePokemonData(pokemonIds) + GodWeaponManager.RemoveWeaponData(pokemonIds) end selectChipId = 0 oldChoosed = nil @@ -181,9 +195,6 @@ function this:BindEvent() UIManager.OpenPanel(UIName.RewardItemPopup,drop) end) end - - - end,2) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanMainPanel.lua index c448f58f3d..fe63a1a8f5 100644 --- a/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanMainPanel.lua @@ -25,7 +25,7 @@ local tabs = { -- }, [5] = { --神兵 default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = "神兵篇", - rpType = RedPointType.Equip_Fetter,funcType = FUNCTION_OPEN_TYPE.COMPOUND,bg = "t_tianshumijuan_shengjiangditu",zi = "GodWeaponAtlas_handbook_title_zh", + rpType = RedPointType.Weapon_Fetter,funcType = FUNCTION_OPEN_TYPE.POKEMON,bg = "t_tianshumijuan_shengjiangditu",zi = "GodWeaponAtlas_handbook_title_zh", }, } local status = { diff --git a/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanManger.lua b/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanManger.lua index ddf3897b61..9d1858fa62 100644 --- a/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanManger.lua +++ b/Assets/ManagedResources/~Lua/Modules/TianShuMiJuan/TianShuMiJuanManger.lua @@ -24,6 +24,7 @@ function this.OnLevelChange() this.CheckFetterStatus(2) this.CheckFetterStatus(3) this.CheckFetterStatus(4) + this.CheckFetterStatus(5) end function this.CheckRedPointType(redType) @@ -35,6 +36,8 @@ function this.CheckRedPointType(redType) return this.CheckRedPoint(3) elseif redType == RedPointType.Equip_Fetter then return this.CheckRedPoint(4) + elseif redType == RedPointType.Weapon_Fetter then + return this.CheckRedPoint(5) end end @@ -73,6 +76,7 @@ function this.UpdateFetterId(ids) this.CheckFetterStatus(2) this.CheckFetterStatus(3) this.CheckFetterStatus(4) + this.CheckFetterStatus(5) end --检测条件变化,判断羁绊是否可激活 @@ -94,6 +98,10 @@ function this.CheckFetterStatus(fetterType) local curPokemonSidList = EquipManager.GetHaveEquipDatas() this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList) CheckRedPointStatus(RedPointType.Equip_Fetter) + elseif fetterType ==5 then + local curPokemonSidList = GodWeaponManager.GetAllHandData() + this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList) + CheckRedPointStatus(RedPointType.Weapon_Fetter) end end @@ -101,6 +109,7 @@ end function this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList) local SpiritAnimalBookList = {} for k,v in pairs(this.fetterData) do + --LogError("fetterType=="..fetterType.." v.fettertype=="..v.fetterType) if v.fetterType == fetterType and v.enabled == -1 then if this.IsCompound(v.teamers,curPokemonSidList,v.fetterType) then v.enabled = 0 @@ -154,6 +163,7 @@ end --根据type获取羁绊数据 function this.GetFetterDataByFetterType(fetterType) local data = {} + --LogError("fetterType===="..fetterType) for k,v in pairs(this.fetterData) do if v.fetterType == fetterType and v.enabled ~= -2 then -- 神将篇判断神将是否加入版本,有一个不在版本内就不显示 @@ -170,6 +180,7 @@ function this.GetFetterDataByFetterType(fetterType) table.insert(data,v) end else + --LogError("+++++++++++++++++++++++") table.insert(data,v) end end @@ -227,6 +238,8 @@ function this.IsHaveItem(fetterType,id,num) data = PokemonManager.GetAllPokemonGetDatas() elseif fetterType == 4 then data = EquipManager.GetHaveEquipDatas() + elseif fetterType ==5 then + data = GodWeaponManager.GetAllHandData() end if fetterType == 4 then if data[id] and data[id] >= num then