From c17ea51996a3b30e1e717b5237fb6233dd2813da Mon Sep 17 00:00:00 2001 From: gaoxin Date: Fri, 17 Sep 2021 16:09:39 +0800 Subject: [PATCH 01/28] =?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 02/28] =?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 03/28] =?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 04/28] =?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 05/28] =?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 06/28] =?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 07/28] =?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 08/28] =?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 09/28] =?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 10/28] =?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 11/28] =?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 12/28] =?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, {}) From 74cdc4374fce4f739291f758efabecbd4803836b Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Sat, 18 Sep 2021 11:03:54 +0800 Subject: [PATCH 13/28] =?UTF-8?q?=E3=80=90=E6=83=8A=E5=96=9C=E7=A4=BC?= =?UTF-8?q?=E7=9B=92=E3=80=91=E7=A4=BC=E5=8C=85=E9=A1=BA=E5=BA=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/NewActivity/CommonActPageManager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPageManager.lua b/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPageManager.lua index 50c9ff0e73..97502de52b 100644 --- a/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPageManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPageManager.lua @@ -138,6 +138,7 @@ local TypeUpdateFunc = { for j = 1, #configData do if curData.rewards[i].missionId == configData[j].Id then curData.rewards[i].otherData.PackId = configData[j].PackId + curData.rewards[i].otherData.Sort = configData[j].Sort curData.rewards[i].otherData.BuyDay = configData[j].BuyDay curData.rewards[i].otherData.Name = rechargeConfig[configData[j].PackId].Name curData.rewards[i].otherData.Reward = rechargeConfig[configData[j].PackId].RewardShow @@ -153,7 +154,7 @@ local TypeUpdateFunc = { end end table.sort(curData.rewards,function (a,b) - return a.otherData.PackId < b.otherData.PackId + return a.otherData.Sort < b.otherData.Sort end) end, From a15bd40b96e84c4976e73ec12a98360c988f2ad2 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Sat, 18 Sep 2021 11:33:46 +0800 Subject: [PATCH 14/28] =?UTF-8?q?=E3=80=90=E5=AF=BB=E5=AE=9D=E8=BF=B7?= =?UTF-8?q?=E8=B8=AA=E3=80=91=E8=B7=B3=E8=BD=AC=E6=83=8A=E5=96=9C=E7=A4=BC?= =?UTF-8?q?=E7=9B=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/View/UpView.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/View/UpView.lua b/Assets/ManagedResources/~Lua/View/UpView.lua index f9d5f39adb..769c2bf5cd 100644 --- a/Assets/ManagedResources/~Lua/View/UpView.lua +++ b/Assets/ManagedResources/~Lua/View/UpView.lua @@ -354,8 +354,8 @@ function UpView:RechargeType(_type) JumpManager.GoJump(40014) elseif _type == UpViewRechargeType.HuaLingFu then--跳灵兽特惠 JumpManager.GoJump(40010) - elseif _type == UpViewRechargeType.XunBaoMiZong then--寻宝迷踪->主题活动日任务 - JumpManager.GoJump(40011) + elseif _type == UpViewRechargeType.XunBaoMiZong then--寻宝迷踪->惊喜礼盒 + JumpManager.GoJump(36041) elseif _type == UpViewRechargeType.GrowthAmulet or _type == UpViewRechargeType.Yaoh or _type == UpViewRechargeType.Panacea or From a3bc2786243cf668316b8ca068fe775b7052efd9 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 12:02:16 +0800 Subject: [PATCH 15/28] =?UTF-8?q?=E3=80=90=E9=85=8D=E7=BD=AE=E3=80=91?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=85=8D=E7=BD=AE=E5=89=8D=EF=BC=8C=E6=8B=89?= =?UTF-8?q?=E5=8F=96=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Editor/ClientConfigManager.cs | 4 ++++ Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Editor/ClientConfigManager.cs b/Assets/Editor/ClientConfigManager.cs index 5abc4a1359..19ab1cfb0d 100644 --- a/Assets/Editor/ClientConfigManager.cs +++ b/Assets/Editor/ClientConfigManager.cs @@ -41,6 +41,7 @@ public class ClientConfigManager // 获取所有的version文件列表 public string[] GetVersionList() { + SVN_Update(); string versionPath = localPath + "/Version"; string[] list = Directory.GetDirectories(versionPath); Debug.LogError(list.Length); @@ -50,6 +51,7 @@ public class ClientConfigManager // 获取热更新用的配置文件 public Hashtable GetHotFixConfig() { + SVN_Update(); string hotfixConfig = localPath + "/HotFixWindow.txt"; Hashtable config = null; if (File.Exists(hotfixConfig)) @@ -64,6 +66,7 @@ public class ClientConfigManager // 获取打包工具配置文件 public Hashtable GetAutoPackConfig() { + SVN_Update(); string hotfixConfig = localPath + "/AutoPack.txt"; Hashtable config = null; if (File.Exists(hotfixConfig)) @@ -76,6 +79,7 @@ public class ClientConfigManager // 获取校验服同步工程配置文件 public Hashtable GetFightServerConfig() { + SVN_Update(); string hotfixConfig = localPath + "/FightServer.txt"; Hashtable config = null; if (File.Exists(hotfixConfig)) diff --git a/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs b/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs index 234d150246..9049b9e7dc 100644 --- a/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs +++ b/Assets/Scripts/Editor/GameEditor/FrameTool/BuildWindow.cs @@ -326,7 +326,6 @@ namespace GameEditor.FrameTool { { //if (!string.IsNullOrEmpty(versionPath) && Directory.Exists(versionPath)) //{ - ClientConfigManager.Instance.SVN_Update(); m_Files = ClientConfigManager.Instance.GetVersionList();//Directory.GetFiles(versionPath, "*.txt", SearchOption.AllDirectories); m_Choose = new bool[m_Files.Length]; //} From 2bfe122214f9d182b640ade31259c8433257dc9d Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 13:41:26 +0800 Subject: [PATCH 16/28] =?UTF-8?q?=E6=98=93=E7=BB=8F=E5=AE=9D=E5=BA=93?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 8ae7a3174fea8e34a79ea4d0ecf7bcbd459e78a0) (cherry picked from commit 20ccbed3c930357da58b5669f1242397193654ef) --- .../Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index 4b6d8ba18c..2f310123c9 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -153,6 +153,7 @@ end function this:OnDestroy() this.spLoader:Destroy() itemIconList={} + goList = {} end return this \ No newline at end of file From a80d16fbda53b72ba8f5487391e75e816f3d2008 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 14:19:26 +0800 Subject: [PATCH 17/28] =?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=E6=94=B9=E9=80=89=E6=8B=A9=E5=A5=96?= =?UTF-8?q?=E5=8A=B1=E7=95=8C=E9=9D=A2=E7=9A=84=E6=8E=92=E5=BA=8F=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index 4b6d8ba18c..68bf003680 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -63,6 +63,12 @@ function this:OnShow(_parent,...) this.titleText.text = Language[10760] curId = ActData.selectId or nil local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",ActData.curFinalPool) + table.sort(RewardConfig, function(a, b) + if a.FloorLimit == b.FloorLimit then + return a.Id < b.Id + end + return a.FloorLimit < b.FloorLimit + end) this.ScrollView:SetData(RewardConfig, function(index, go) this:SetSingleData(index,go, RewardConfig[index]) end) From 7e954b997af38ebd397ee1b913cab9e41f95074d Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 15:15:22 +0800 Subject: [PATCH 18/28] =?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=9F=A5=E7=9C=8B=E5=89=A9?= =?UTF-8?q?=E4=BD=99=E5=A5=96=E5=8A=B1=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/DynamicActivity/DynamicActivityManager.lua | 3 ++- .../View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua index cfcd34bf51..b2f6731cce 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityManager.lua @@ -221,6 +221,7 @@ function this.GetBaoKuData() if v.missionId == 100 then actData.curLevel = v.progress curBasicPool = tonumber(BasicPoolId[v.progress]) + actData.poolId = curBasicPool curFinalPool = BlessingConfigNew.FinalPoolId elseif v.missionId > 1000 then local data = {} @@ -271,7 +272,7 @@ end function this.GetLeftRewardData() local actData = this.GetBaoKuData() local finalCardDatas = actData.finalCardDatas - local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",actData.curLevel)--初始所有奖励数据 + local RewardConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.BlessingRewardPoolNew,"PoolId",actData.poolId)--初始所有奖励数据 local data={} for i = 1, #RewardConfig do data[RewardConfig[i].Id] = {} diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua index e6ecc4fdc1..bb5b0c265f 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua @@ -81,7 +81,7 @@ function this:OnShow(_parent,...) table.insert(tempData,value) end this.ScrollView:SetData(tempData, function(index, go) - this:SetSingleData(index,go,leftRewardData[index + (ActData.curLevel-1)*10]) + this:SetSingleData(index,go,leftRewardData[index + (ActData.poolId-1)*10]) end) end From 50f2a7389857a33d1001507057f383b4271bc34f Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 15:53:13 +0800 Subject: [PATCH 19/28] =?UTF-8?q?=E3=80=90=E5=AF=BB=E5=AE=9D=E8=BF=B7?= =?UTF-8?q?=E8=B8=AA=E3=80=91=E4=BF=AE=E5=A4=8D=E7=95=8C=E9=9D=A2=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=8D=E5=8F=8A=E6=97=B6=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/XunBaoMiZong/XunBaoMiZongPanel.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua index 3ab50c3801..d346409d3a 100644 --- a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua @@ -69,10 +69,16 @@ end --添加事件监听(用于子类重写) function XunBaoMiZong:AddListener() + Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, self.UpdateGoldVal, self) end --移除事件监听(用于子类重写) function XunBaoMiZong:RemoveListener() + Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.UpdateGoldVal, self) +end + +function XunBaoMiZong:UpdateGoldVal() + self:Refresh() end function XunBaoMiZong:OnSortingOrderChange(_sortingOrder) From a3ff527bc9444ceb1a8559f9a6df137928004a47 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 16:14:03 +0800 Subject: [PATCH 20/28] =?UTF-8?q?=E3=80=90=E6=98=93=E7=BB=8F=E5=AE=9D?= =?UTF-8?q?=E5=BA=93=E3=80=91=E9=80=89=E6=8B=A9=E5=A5=96=E5=8A=B1=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=80=89=E4=B8=AD=E5=A5=96=E5=8A=B1=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index a346db65c4..3dd14a4d9c 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -137,11 +137,13 @@ function this:SetSingleData(index,item,data) t2 = false end -- LogRed(ActData.allData[index].rewardId..":"..tostring(ActData.allData[index].progress)) - if ActData.allData[index].progress > data.InitializeNum then + if ActData.allData[index].progress >= data.InitializeNum then t3 = false - elseif ActData.allData[index].progress == data.InitializeNum and ActData.curLevel > data.InitializeNum then - t3 = false - num.text = ""..(data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum.."" + -- 如果是当前层选中的特殊奖励 + if ActData.allData[index].progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum + t3 = true + num.text = ""..(data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum.."" + end else t3 = true num.text = (data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum From e3f480893676e2e2394c7cdd1343313ef568e78f Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 16:32:52 +0800 Subject: [PATCH 21/28] =?UTF-8?q?=E3=80=90=E6=98=93=E7=BB=8F=E5=AE=9D?= =?UTF-8?q?=E5=BA=93=E3=80=91=E9=80=89=E6=8B=A9=E5=A5=96=E5=8A=B1=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index 3dd14a4d9c..7eb7f770e2 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -142,8 +142,8 @@ function this:SetSingleData(index,item,data) -- 如果是当前层选中的特殊奖励 if ActData.allData[index].progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum t3 = true - num.text = ""..(data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum.."" end + num.text = ""..(data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum.."" else t3 = true num.text = (data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum From 13e0865cc210b4b0b518c4e26a7419ef572afa55 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 17:07:01 +0800 Subject: [PATCH 22/28] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E5=8A=A9=E6=88=98?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/GeneralBigPopup_FourElementHelpFight.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua index f028309cd0..7bc09624be 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua @@ -152,6 +152,10 @@ end function this:SetMyHeightPower() heightPower = 0 + if not myHeros or #myHeros < 0 then + heightPower = 0 + return + end for k,v in ipairs(myHeros) do if v.warPower > heightPower then heightPower = v.warPower From 3f24f4cd86cc3ed3e54d292fbc3556de7f5478c9 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 17:58:28 +0800 Subject: [PATCH 23/28] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E8=AF=95=E7=82=BC=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/GeneralPanel/GeneralBigPopup.lua | 2 +- .../View/GeneralBigPopup_ExpertRewardSortPanel.lua | 4 ++-- .../View/GeneralBigPopup_FourElementHelpFight.lua | 12 ++++++++---- .../View/GeneralBigPopup_JinJieYuLan.lua | 4 ++-- .../View/GeneralBigPopup_RecrutDetail.lua | 4 ++-- .../GeneralPanel/View/GeneralBigPopup_WishDraw.lua | 4 ++-- .../View/GeneralBigPopup_WuJinShuXing.lua | 4 ++-- .../View/GeneralBigPopup_XiuXingSelectHero.lua | 4 ++-- .../View/GeneralBigPopup_XunBaoMiZong.lua | 4 ++-- .../View/GeneralBigPopup_YiJingBaoKu.lua | 4 ++-- .../GeneralBigPopup_YiJingBaoKuRewardPreview.lua | 4 ++-- 11 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua index 081219a67b..db9595827e 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua @@ -98,7 +98,7 @@ end function GeneralBigPopup:OnShow() contentPrefabs[this.popupKey].gameObject:SetActive(true) - contentScripts[this.popupKey].view:OnShow(this, unpack(this.args))--1、传入自己 2、传入不定参 + contentScripts[this.popupKey].view:OnShow(this,this.args)--1、传入自己 2、传入不定参 end function GeneralBigPopup:OnClose() diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua index d710f02c07..e1cf0918ff 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua @@ -35,10 +35,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,data) parent=_parent sortingOrder = _parent.sortingOrder - local args = {...} + local args = data activityId = args[1] activityType = args[2] local rewardTabs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRankingReward,"ActivityId",activityId) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua index 7bc09624be..092cbf60b0 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua @@ -50,13 +50,16 @@ function this:BindEvent() end function this:BtnClick(i) + if curIndex == i then return end + curIndex = i + LogGreen("curIndex:"..curIndex) this.selectBtn.transform:SetParent(tabs[i].transform) this.selectBtn:GetComponent("RectTransform").localPosition = Vector3.zero this.selectBtn.transform:SetAsFirstSibling() - curIndex = i + for k,v in pairs(itemList) do v.gameObject:SetActive(false) end @@ -69,14 +72,15 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data waveId = args[1] curType = args[2] friendHelpHeros = args[3] myHeros = args[4] + LogGreen("myHeros:"..#myHeros) this:SetMyHeightPower() this.titleText.text = FourElementName[curType] rate = tonumber(string.format("%.2f",ConfigManager.GetConfigData(ConfigName.CampTowerSetting,1).HelpFightMax / 10000)) @@ -152,7 +156,7 @@ end function this:SetMyHeightPower() heightPower = 0 - if not myHeros or #myHeros < 0 then + if not myHeros or #myHeros < 1 then heightPower = 0 return end diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua index 53a5280c39..1d5203ff7f 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua @@ -27,11 +27,11 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder parent.BG:SetActive(false) - local args = {...} + local args = _Data local curHeroData = args[1] if not curHeroData or not HeroConfig[curHeroData.heroConfig.Id] or #HeroConfig[curHeroData.heroConfig.Id].RankupConsumeMaterial < 1 then parent:ClosePanel() diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua index 0e9a6935d1..be97d08e62 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua @@ -48,10 +48,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data local helpType = args[1] local str = ConfigManager.TryGetConfigData(ConfigName.QAConfig,helpType).content str = string.gsub(str,"{","") diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua index 1f89fc8bb4..0498e6d27e 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua @@ -70,10 +70,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) self.parent=_parent self.sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data NetManager.ChoiceWishHeroRequest(nil,function () if args[1] then self.curSelect = args[1] diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua index a6491ed4f7..6998665880 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua @@ -26,11 +26,11 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder parent.BG:SetActive(false) - local args = {...} + local args = _Data local data = args[1] for i = 1, #data do if not attriList[i] then diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua index 97840833dc..edf703087c 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua @@ -58,11 +58,11 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 - local _args = {...} + local _args = _Data data = _args[1] func = _args[2] self.heroList = HeroManager.GetHeroDataByPropertyAndProfession(data.FitList[1],data.FitList[2],1) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua index 844596a8d3..8d75d6deaf 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua @@ -30,10 +30,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) self.parent=_parent self.sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data self.actData = args[1] self.timeText.text = string.format("概率有效期:%s ~ %s",os.date("%Y-%m-%d", self.actData.startTime),os.date("%Y-%m-%d", self.actData.endTime)) this:Refresh(true,true) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index 7eb7f770e2..b636697c29 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -51,13 +51,13 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,data) itemList={} parent=_parent sortingOrder = _parent.sortingOrder --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 - _args = {...} + _args = data ActData = _args[1] func = _args[2] this.titleText.text = Language[10760] diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua index bb5b0c265f..1a8d93277c 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua @@ -44,13 +44,13 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,data) itemList={} parent=_parent sortingOrder = _parent.sortingOrder --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 - _args = {...} + _args = data ActData = _args[1] func = _args[2] this.titleText.text = Language[10763] From 4a494fac119a46a4df9807036a23a3e34da8b8ab Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 18:19:45 +0800 Subject: [PATCH 24/28] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E7=BC=96=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/MonsterCamp/MonsterCampManager.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua index f2694177e0..9c94bbe159 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua @@ -481,6 +481,24 @@ end --设置好友帮助我的英雄 以试炼类型为键 function this.SetFriendHelpHero(helpFightList,trailType) if not trailType then + for i = 1,4 do + local team = FormationManager.GetFormationByID(trailType + 3000) + if this.friendHelpHero and this.friendHelpHero[trailType] and this.friendHelpHero[trailType].hero then + local newteam = {} + for k,v in ipairs(team.teamHeroInfos) do + if v.heroId == this.friendHelpHero[trailType].hero.dynamicId then + else + table.insert(newteam,v) + end + end + if LengthOfTable(newteam) ~= LengthOfTable(team.teamHeroInfos) then + FormationManager.RefreshFormation( + trailType + 3000, + newteam, + FormationManager.formationList[trailType + 3000].teamPokemonInfos) + end + end + end this.friendHelpHero = {} for k,v in ipairs(helpFightList) do if not this.friendHelpHero[v.trailType] then From a628176640a43a1cbc83151d548c7997e1914117 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 18:25:22 +0800 Subject: [PATCH 25/28] =?UTF-8?q?=E5=9B=9B=E7=81=B5=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 675cda9b4dbd40ea85980b12518c026bb424d3b8) --- .../~Lua/Modules/MonsterCamp/MonsterCampManager.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua index 9c94bbe159..d5e0caded5 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua @@ -482,20 +482,20 @@ end function this.SetFriendHelpHero(helpFightList,trailType) if not trailType then for i = 1,4 do - local team = FormationManager.GetFormationByID(trailType + 3000) - if this.friendHelpHero and this.friendHelpHero[trailType] and this.friendHelpHero[trailType].hero then + local team = FormationManager.GetFormationByID(i + 3000) + if this.friendHelpHero and this.friendHelpHero[i] and this.friendHelpHero[i].hero then local newteam = {} for k,v in ipairs(team.teamHeroInfos) do - if v.heroId == this.friendHelpHero[trailType].hero.dynamicId then + if v.heroId == this.friendHelpHero[i].hero.dynamicId then else table.insert(newteam,v) end end if LengthOfTable(newteam) ~= LengthOfTable(team.teamHeroInfos) then FormationManager.RefreshFormation( - trailType + 3000, + i + 3000, newteam, - FormationManager.formationList[trailType + 3000].teamPokemonInfos) + FormationManager.formationList[i + 3000].teamPokemonInfos) end end end From 2ca77d75ef9c90d074900c46466f4a0ddb7f04bd Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 18 Sep 2021 18:40:21 +0800 Subject: [PATCH 26/28] =?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=E6=9C=8D=E9=80=89=E4=B8=AD=E5=A4=A7?= =?UTF-8?q?=E5=A5=96=E5=90=8E=E6=AC=A1=E6=95=B0=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/GeneralBigPopup_YiJingBaoKu.lua | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index b636697c29..431c116a52 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -136,17 +136,18 @@ function this:SetSingleData(index,item,data) limit2.text = Language[10262]..data.FloorLimit..Language[10762] t2 = false end - -- LogRed(ActData.allData[index].rewardId..":"..tostring(ActData.allData[index].progress)) - if ActData.allData[index].progress >= data.InitializeNum then + local aData = this.GetDataByRewardId(data.Id) + -- LogRed(aData.rewardId..":"..tostring(aData.progress)) + if aData.progress >= data.InitializeNum then t3 = false -- 如果是当前层选中的特殊奖励 - if ActData.allData[index].progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum + if aData.progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum t3 = true end - num.text = ""..(data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum.."" + num.text = ""..(data.InitializeNum-aData.progress).."/"..data.InitializeNum.."" else t3 = true - num.text = (data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum + num.text = (data.InitializeNum - aData.progress).."/"..data.InitializeNum end num.gameObject:SetActive(t1 and t2) @@ -154,6 +155,16 @@ function this:SetSingleData(index,item,data) end +-- 获取数量 +function this.GetDataByRewardId(rId) + for k, v in ipairs(ActData.allData) do + if v.rewardId == rId then + return v + end + end +end + + function this:OnClose() end From 4e5ef30243866c116506c7f636b90fe16073e97e Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 18:55:07 +0800 Subject: [PATCH 27/28] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=9B=9B=E7=81=B5?= =?UTF-8?q?=E7=BC=96=E9=98=9F=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Logic/GameEvent.lua | 1 + .../~Lua/Modules/Formation/FormationPanelV2.lua | 2 ++ .../Modules/Formation/View/FourElementFormation.lua | 12 +++++++++++- .../~Lua/Modules/MonsterCamp/MonsterCampManager.lua | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua index 4916d9c080..4cd6d5abf2 100644 --- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua +++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua @@ -60,6 +60,7 @@ GameEvent = { OnResetFormationHp = "Formation.OnResetFormationHp", -- 掉血消息 OnMapTeamHpReduce = "Formation.OnMapTeamHpReduce", + OnFormationChange1 = "OnFormationChange1", }, Mission = { --新增任务 diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 3cc298e984..aa3d0c55da 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -196,10 +196,12 @@ end function this:AddListener() Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower) + Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange1, this.RefreshPower) end function this:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower) + Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange1, this.RefreshPower) end function this:OnSortingOrderChange() diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/FourElementFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/FourElementFormation.lua index fb17081f86..5fe4e22719 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/FourElementFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/FourElementFormation.lua @@ -93,10 +93,20 @@ function this.On_Btn2_Click() if LengthOfTable(this.root.choosedList) < 1 then PopupTipPanel.ShowTip("挑战编队为空") return + end + local newteam = {} + for i = 1,#this.root.choosedList do + if HeroManager.GetSingleHeroData(this.root.choosedList[i].heroId) then + table.insert(newteam, this.root.choosedList[i]) + end + end + if #newteam < 1 then + PopupTipPanel.ShowTip("挑战编队为空") + return end FormationManager.RefreshFormation( this.root.curFormationIndex, - this.root.choosedList, + newteam, FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos ) this.StartFight() diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua index d5e0caded5..825af867d2 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua @@ -509,6 +509,7 @@ function this.SetFriendHelpHero(helpFightList,trailType) local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false) this.friendHelpHero[v.trailType].hero.warPower = allAddProVal[HeroProType.WarPower] end + Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange1) else if not this.friendHelpHero then this.friendHelpHero = {} From 488753ab83a0f289f49b21da6146824520d64780 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 19:19:05 +0800 Subject: [PATCH 28/28] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E7=BC=96=E9=98=9F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 191603b77ffc29aa08effdae5466c38bd258b5c7) --- .../~Lua/Modules/Formation/FormationPanelV2.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index aa3d0c55da..a334883598 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -196,12 +196,12 @@ end function this:AddListener() Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower) - Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange1, this.RefreshPower) + Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange1, this.OnShow) end function this:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower) - Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange1, this.RefreshPower) + Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange1, this.OnShow) end function this:OnSortingOrderChange()