From 1ab74881667312b2829e7b8f2041c921e89f5db3 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 29 九月 2025 16:45:38 +0800
Subject: [PATCH] 125 战斗 主线战斗会结算的问题修复

---
 Main/System/Settlement/BattleSettlementManager.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Main/System/Settlement/BattleSettlementManager.cs b/Main/System/Settlement/BattleSettlementManager.cs
index 5678b63..525b3db 100644
--- a/Main/System/Settlement/BattleSettlementManager.cs
+++ b/Main/System/Settlement/BattleSettlementManager.cs
@@ -19,7 +19,7 @@
     public override void Release()
     {
         DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin -= OnBeforePlayerDataInitialize;
-
+        EventBroadcast.Instance.RemoveListener<string, JsonData>(EventName.BATTLE_END, OnSettlement);
     }
 
 
@@ -33,6 +33,9 @@
     //"Msg":{"itemInfo":[{"ItemID":5,"Count":2},{"ItemID":3,"Count":40}],"winFaction":1,"statInfo":{"1":{"1":{"1":{"NPCID":0,"DefHurt":727,"CureHP":0,"AtkHurt":1891,"ObjID":1,"HeroID":530004},"3":{"NPCID":0,"DefHurt":483,"CureHP":1511,"AtkHurt":782,"ObjID":6,"HeroID":520001},"2":{"NPCID":0,"DefHurt":953,"CureHP":0,"AtkHurt":1712,"ObjID":5,"HeroID":510003}}},"2":{"1":{"1":{"NPCID":10101091,"DefHurt":638,"CureHP":0,"AtkHurt":140,"ObjID":2,"HeroID":610001},"3":{"NPCID":10101092,"DefHurt":625,"CureHP":0,"AtkHurt":126,"ObjID":3,"HeroID":610001},"5":{"NPCID":10101093,"DefHurt":3122,"CureHP":0,"AtkHurt":1897,"ObjID":4,"HeroID":510003}}}}}
     public void OnSettlement(string _guid, JsonData _data)
     {
+        if (string.Empty == _guid)
+            return;
+
         battleSettlementDic[_guid] = _data;
         notifyGuid = _guid;
         if (_data.ContainsKey("winFaction"))

--
Gitblit v1.8.0