From 5909666c81bd9a14a88d79d9f27229b1f14d2e55 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期五, 29 八月 2025 18:30:47 +0800 Subject: [PATCH] 125 【战斗】战斗系统 --- Main/System/Battle/BattleManager.cs | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Main/System/Battle/BattleManager.cs b/Main/System/Battle/BattleManager.cs index 0467960..66d7964 100644 --- a/Main/System/Battle/BattleManager.cs +++ b/Main/System/Battle/BattleManager.cs @@ -263,6 +263,7 @@ if (!battlePackRelationList.TryGetValue(guid, out uidList)) { uidList = new List<ulong>(); + battlePackRelationList.Add(guid, uidList); } uidList.Add(vNetPack.packUID); @@ -387,9 +388,16 @@ public void Run() { - foreach (var battleField in battleFields) + try { - battleField.Value?.Run(); + foreach (var battleField in battleFields) + { + battleField.Value?.Run(); + } + } + catch (System.Exception ex) + { + Debug.LogError(ex); } } -- Gitblit v1.8.0