From 6d9de6a496d9df8e6e2c65ba98ec92bcc1396c92 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Mon, 15 Mar 2021 19:14:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E6=88=98=E5=8A=9B=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Message/CommonProto_pb.lua | 24 ++++++- .../Modules/Expedition/ExpeditionManager.lua | 4 ++ .../GoodFriend/GoodFriendMainPanel.lua | 13 ++++ .../~Lua/Modules/Hero/HeroManager.lua | 15 ++-- .../~Lua/Modules/Main/GMPanel.lua | 71 ++++++++++++++++--- .../MonsterCamp/MonsterCampManager.lua | 20 ++++-- .../~Lua/Modules/Popup/RoleInfoPopup.lua | 2 +- .../Modules/RoleInfo/EquipTreasureManager.lua | 9 ++- .../~Lua/View/FourTrailSingleHelpHero.lua | 2 + 9 files changed, 128 insertions(+), 32 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua b/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua index a7852b1fbe..335f5140c0 100644 --- a/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua @@ -620,6 +620,8 @@ HELPFIGHTLIST_TRAILTYPE_FIELD = protobuf.FieldDescriptor(); HELPFIGHTLIST_HERO_FIELD = protobuf.FieldDescriptor(); HELPFIGHTLIST_STATE_FIELD = protobuf.FieldDescriptor(); HELPFIGHTLIST_JEWELS_FIELD = protobuf.FieldDescriptor(); +HELPFIGHTLIST_TREELEVEL_FIELD = protobuf.FieldDescriptor(); +HELPFIGHTLIST_FOURTOTAL_FIELD = protobuf.FieldDescriptor(); ERRORRESPONSE_ERRCODE_FIELD.name = "errCode" ERRORRESPONSE_ERRCODE_FIELD.full_name = ".rpc.protocols.ErrorResponse.errCode" @@ -6495,11 +6497,31 @@ HELPFIGHTLIST_JEWELS_FIELD.message_type = EQUIP HELPFIGHTLIST_JEWELS_FIELD.type = 11 HELPFIGHTLIST_JEWELS_FIELD.cpp_type = 10 +HELPFIGHTLIST_TREELEVEL_FIELD.name = "treeLevel" +HELPFIGHTLIST_TREELEVEL_FIELD.full_name = ".rpc.protocols.HelpFightList.treeLevel" +HELPFIGHTLIST_TREELEVEL_FIELD.number = 8 +HELPFIGHTLIST_TREELEVEL_FIELD.index = 7 +HELPFIGHTLIST_TREELEVEL_FIELD.label = 1 +HELPFIGHTLIST_TREELEVEL_FIELD.has_default_value = false +HELPFIGHTLIST_TREELEVEL_FIELD.default_value = 0 +HELPFIGHTLIST_TREELEVEL_FIELD.type = 5 +HELPFIGHTLIST_TREELEVEL_FIELD.cpp_type = 1 + +HELPFIGHTLIST_FOURTOTAL_FIELD.name = "fourTotal" +HELPFIGHTLIST_FOURTOTAL_FIELD.full_name = ".rpc.protocols.HelpFightList.fourTotal" +HELPFIGHTLIST_FOURTOTAL_FIELD.number = 9 +HELPFIGHTLIST_FOURTOTAL_FIELD.index = 8 +HELPFIGHTLIST_FOURTOTAL_FIELD.label = 1 +HELPFIGHTLIST_FOURTOTAL_FIELD.has_default_value = false +HELPFIGHTLIST_FOURTOTAL_FIELD.default_value = 0 +HELPFIGHTLIST_FOURTOTAL_FIELD.type = 5 +HELPFIGHTLIST_FOURTOTAL_FIELD.cpp_type = 1 + HELPFIGHTLIST.name = "HelpFightList" HELPFIGHTLIST.full_name = ".rpc.protocols.HelpFightList" HELPFIGHTLIST.nested_types = {} HELPFIGHTLIST.enum_types = {} -HELPFIGHTLIST.fields = {HELPFIGHTLIST_UID_FIELD, HELPFIGHTLIST_USERNAME_FIELD, HELPFIGHTLIST_GUILDNAME_FIELD, HELPFIGHTLIST_TRAILTYPE_FIELD, HELPFIGHTLIST_HERO_FIELD, HELPFIGHTLIST_STATE_FIELD, HELPFIGHTLIST_JEWELS_FIELD} +HELPFIGHTLIST.fields = {HELPFIGHTLIST_UID_FIELD, HELPFIGHTLIST_USERNAME_FIELD, HELPFIGHTLIST_GUILDNAME_FIELD, HELPFIGHTLIST_TRAILTYPE_FIELD, HELPFIGHTLIST_HERO_FIELD, HELPFIGHTLIST_STATE_FIELD, HELPFIGHTLIST_JEWELS_FIELD, HELPFIGHTLIST_TREELEVEL_FIELD, HELPFIGHTLIST_FOURTOTAL_FIELD} HELPFIGHTLIST.is_extendable = false HELPFIGHTLIST.extensions = {} diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionManager.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionManager.lua index c846de961b..dbd77a618e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionManager.lua @@ -763,6 +763,10 @@ function this.InitSingleTreasureData(_singleData) single.refineLv=_singleData.rebuildLevel single.maxLv=currJewel.Max[1] single.maxRefineLv=currJewel.Max[2] + single.maxTreeLv = currJewel.GodHoodMaxlv + single.treeLv = single.maxTreeLv or 0 + single.fourTotal = 0 + LogGreen("_treeLevel:"..single.treeLv.." single.fourTotal:"..single.fourTotal) single.upHeroDid="" local quantity=currJewel.Level single.quantity=quantity diff --git a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua index 688c0e8011..76b8a2fb3f 100644 --- a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendMainPanel.lua @@ -361,6 +361,19 @@ function GoodFriendMainPanel:FriendListDataShow(isTop,isAni) end end) end + -- for i = 1 ,100 do + -- local friendData = GoodFriendManager.CreateFriendData() + -- friendData.id = i + -- friendData.name = i.."name" + -- friendData.lv = i + -- friendData.offLineTime = 0 + -- friendData.haveReward = 0 + -- friendData.isGive = 0 + -- friendData.head = 0 + -- friendData.frame = 0 + -- friendData.soulVal = 0 + -- table.insert(list,friendData) + -- end this.ScrollView1:SetData(list, function(index, item) local itemData = list[index] this:FriendListRefreshData(item, itemData) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 1d48303f59..25a65b5bd8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -637,7 +637,7 @@ function this.UpdateHeroSingleSoulPrint(heroDId, hasEquipSoulPrintId) end --获取单个英雄数据 function this.GetSingleHeroData(heroDId) - LogGreen("heroDId"..tostring(heroDId)) + --LogGreen("heroDId"..tostring(heroDId)) if heroDatas[heroDId] then return heroDatas[heroDId] elseif ExpeditionManager.GetSingleHeroData(heroDId) then @@ -880,7 +880,7 @@ end function this.UpdateHeroPowerProfession() for _, v in pairs(heroDatas) do if GuildSkillManager.UpdataHeroProList[v.heroConfig.Profession] then - LogGreen("v.dynamicId "..v.dynamicId) + --LogGreen("v.dynamicId "..v.dynamicId) v.warPower = this.CalculateHeroAllProValList(1, v.dynamicId, false)[HeroProType.WarPower] end end @@ -1188,7 +1188,7 @@ local function CalculateEquipTreaSureAddVal(_heroId) end end --神应属性 - local tLv = SacredTreeManager.treeLevel <= curEuipTreaSureConfig.GodHoodMaxlv and SacredTreeManager.treeLevel or curEuipTreaSureConfig.GodHoodMaxlv + local tLv = curEuipTreaSureData.treeLv if configInfo.PoolID == curEuipTreaSureConfig.GodHoodPool and configInfo.Type == 3 and configInfo.Level == tLv @@ -1655,14 +1655,7 @@ end --_type==1 计算当前英雄的所有属性 _type==2 根据_heroDid之后_breakId传过来的值进行计算 _isAllHeroProVal==true 团体加成综合 用字段_allHeroProVal function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upStarId, _isAllHeroProVal, _allHeroProVal,formationHeroNum) local curHeroData = this.GetSingleHeroData(_heroDid) or _heroDid - LogGreen("curHeroData:"..tostring(curHeroData).." curHeroData.dynamicId:"..tostring(curHeroData.dynamicId)) - local curLvNum = curHeroData.lv -- heroLevelConfig[curHeroData.lv].CharacterLevelPara - --local speedNum = heroLevelConfig[curHeroData.lv].SpeedLevelPara - --if _type == 1 then - -- LogError("计算战力英雄数据打印1 lv _breakId _upStarId "..curHeroData.lv.." "..curHeroData.breakId.." "..curHeroData.upStarId) - --else - -- LogError("计算战力英雄数据打印2 lv _breakId _upStarId "..curHeroData.lv.." ".._breakId.." ".._upStarId) - --end + local curLvNum = curHeroData.lv --添加该英雄装备的属性 local allEquipScore = PlayerManager.GetSingHeroAllEquipSkillListScore(curHeroData) --获取单个英雄装备被动技能累计评分 diff --git a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua index feb86f4e1f..0e3c46ea2f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua @@ -147,16 +147,67 @@ function GMPanel:BindEvent() end function this.GetManyItems(text) - local list = string.split(text, "|") - local cor = coroutine.start(function() - for _, str in ipairs(list) do - local str = "1#" .. str - Log(str) - NetManager.GMEvent(str) - coroutine.wait(0.1) - end - LogGreen("物品批量生成完成") - end) + if text == "一键装备" then + local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.EquipConfig)) + local cor = coroutine.start(function() + for k,v in (config) do + if v.Position < 5 then + local str = "1#" .. v.Id .."#" .. 1 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end + end) + return + end + if text == "一键宝器" then + local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.JewelConfig)) + local cor = coroutine.start(function() + for k,v in (config) do + local str = "1#" .. v.Id .."#" .. 10 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end) + return + end + if text == "一键魂印" then + local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.EquipConfig)) + local cor = coroutine.start(function() + for k,v in (config) do + if v.Position == 5 then + local str = "1#" .. v.Id .."#" .. 1 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end + end) + return + end + if text and text ~= "" then + local list = string.split(text, "|") + local cor = coroutine.start(function() + for _, str in ipairs(list) do + local item = string.split(str, "#") + local itemid = tonumber(item[1]) + if not itemid then + local config = ConfigManager.GetConfigDataByKey(ConfigName.ItemConfig,"Name",item[1]) + if config then + itemid = config.Id + else + itemid = nil + end + end + if itemid then + local str = "1#" .. itemid .."#" .. item[2] + Log(str) + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end + LogGreen("物品批量生成完成") + end) + end end function this.GetManyHeros(text) diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua index 4269cbe567..0e4f5992a1 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua @@ -281,7 +281,7 @@ function this.UpdateHeroDatas(_msgHeroData,_msgPlayerData) EquipManager.SetEquipUpHeroDid(heroData.equipIdList[i],heroData.dynamicId) end heroData.jewels=_msgHeroData.jewels - this.InitBaoDatas(_msgPlayerData.jewels) + this.InitBaoDatas(_msgPlayerData.jewels,_msgPlayerData.fourTotal,_msgPlayerData.treeLevel) for i = 1 , #heroData.jewels do this.SetEquipTreasureUpHeroDid(heroData.jewels[i],heroData.dynamicId) end @@ -315,24 +315,24 @@ function this.UpdateHeroDatas(_msgHeroData,_msgPlayerData) end heroData.name = _configData.ReadingName heroData.property = _configData.PropertyName - heroData.warPower = HeroManager.CalculateHeroAllProValList(1, heroData, false)[HeroProType.WarPower] heroData.createtype = 1 + heroData.warPower = 0 return heroData end --宝器 local jewelConfig = ConfigManager.GetConfig(ConfigName.JewelConfig) -function this.InitBaoDatas(_soulEquips) +function this.InitBaoDatas(_soulEquips,_fourTotal,_treeLevel) if not this.allTreasures then this.allTreasures = {} end if not _soulEquips then return end for i = 1, #_soulEquips do - this.InitSingleTreasureData(_soulEquips[i]) + this.InitSingleTreasureData(_soulEquips[i],_fourTotal,_treeLevel) end end --初始化单个宝物的数据 -function this.InitSingleTreasureData(_singleData) +function this.InitSingleTreasureData(_singleData,_fourTotal,_treeLevel) if not _singleData or not _singleData.equipId then return end @@ -349,7 +349,9 @@ function this.InitSingleTreasureData(_singleData) single.maxRefineLv=currJewel.Max[2] single.upHeroDid="" single.maxTreeLv = currJewel.GodHoodMaxlv - single.treeLv = SacredTreeManager.treeLevel <= single.maxTreeLv and SacredTreeManager.treeLevel or single.maxTreeLv + single.treeLv = _treeLevel + single.fourTotal = _fourTotal + LogGreen("_treeLevel:"..single.treeLv.." single.fourTotal:"..single.fourTotal) local quantity=currJewel.Level single.quantity=quantity single.frame=GetQuantityImageByquality(quantity) @@ -405,6 +407,8 @@ function this.GetFriendHelpHeros(trailType,func) tempdata.player = v tempdata.hero = this.UpdateHeroDatas(v.hero,v) table.insert(this.friendHelpHeros[v.trailType],tempdata) + local allAddProVal = HeroManager.CalculateHeroAllProValList(1, tempdata.hero, false) + tempdata.hero.warPower = allAddProVal[HeroProType.WarPower] end if func then func(this.friendHelpHeros[trailType]) @@ -427,6 +431,8 @@ function this.SetFriendHelpHero(helpFightList,trailType) end this.friendHelpHero[v.trailType].player = v this.friendHelpHero[v.trailType].hero = this.UpdateHeroDatas(v.hero,v) + local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false) + this.friendHelpHero[v.trailType].hero.warPower = allAddProVal[HeroProType.WarPower] end else if not this.friendHelpHero then @@ -439,6 +445,8 @@ function this.SetFriendHelpHero(helpFightList,trailType) if helpFightList then this.friendHelpHero[trailType].player = helpFightList this.friendHelpHero[trailType].hero = this.UpdateHeroDatas(helpFightList.hero,helpFightList) + local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[trailType].hero, false) + this.friendHelpHero[trailType].hero.warPower = allAddProVal[HeroProType.WarPower] else this.friendHelpHero[trailType] = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua index a083e443dd..c1f493362d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua @@ -150,7 +150,7 @@ function RoleInfoPopup:OnOpen(...) this.selsectSkillImage:SetActive(false) local arg = { ... } curHeroData = arg[1] - this.isOther = arg[2] + this.isOther = arg[2] choosedList = arg[3] or nil formationHeroNum = arg[4] or nil end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua index 8d0eb1f1b6..7d4a763b12 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua @@ -35,8 +35,11 @@ function this.InitSingleTreasureData(_singleData) single.maxRefineLv = currJewel.Max[2] single.maxTreeLv = currJewel.GodHoodMaxlv single.upHeroDid = "" - single.treeLv = SacredTreeManager.treeLevel <= single.maxTreeLv and SacredTreeManager.treeLevel or single.maxTreeLv - + single.TreeLv = function() + return SacredTreeManager.treeLevel <= single.maxTreeLv and SacredTreeManager.treeLevel or single.maxTreeLv + end + single.treeLv = single.TreeLv() + single.fourTotal = MonsterCampManager.GetFourElementTotalWave() local quantity = currJewel.Level single.quantity = quantity single.race = currJewel.Race @@ -45,7 +48,7 @@ function this.InitSingleTreasureData(_singleData) single.itemConfig = itemConfig[staticId] single.levelPool = currJewel.LevelupPool single.proIcon = GetProStrImageByProNum(currJewel.Race) - single.refinePool = currJewel.RankupPool + single.refinePool = currJewel.RankupPool single.treePool = currJewel.GodHoodPool single.equipType = currJewel.Location if currJewel.Location == 1 then diff --git a/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua b/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua index 4e93103452..a793577575 100644 --- a/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua +++ b/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua @@ -61,6 +61,8 @@ function FourTrailSingleHelpHero:OnShow(curType,...) self.proIcon.sprite = Util.LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName)) SetHeroStars(self.starGrid , heroData.star) self.name.text = itemConfig[heroData.heroConfig.Id].Name + local allAddProVal = HeroManager.CalculateHeroAllProValList(1, heroData, false) + --LogGreen(heroData.dynamicId.." allAddProVal[HeroProType.WarPower]:"..allAddProVal[HeroProType.WarPower]) self.num.text = heroData.warPower if curType == 1 then local from = ""