From c3bbd3b0263fc6c2127cd9f072f497f46f98758b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 07 二月 2026 21:43:20 +0800
Subject: [PATCH] 389 流向记录(简化战斗流向记录,只统计出场的武将ID;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
index 6ae0ee6..fb0f5cf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -2206,23 +2206,25 @@
     heroCount = 0
     batObjMgr = BattleObj.GetBatObjMgr()
     statInfo = {}
-    drLineupInfo = {}
+    drHeroIDDict = {}
     for faction in turnFight.factionDict.keys():
         if str(faction) not in statInfo:
             statInfo[str(faction)] = {}
         facStatInfo = statInfo[str(faction)]
-        if str(faction) not in drLineupInfo:
-            drLineupInfo[str(faction)] = {}
-        facDRLineupInfo = drLineupInfo[str(faction)]
+        if str(faction) not in drHeroIDDict:
+            drHeroIDDict[str(faction)] = {}
+        facDRHeroIDDict = drHeroIDDict[str(faction)]
         batFaction = turnFight.getBatFaction(faction)
         batFaction.totalHurt = 0
         for num in batFaction.lineupDict.keys():
             if str(num) not in facStatInfo:
                 facStatInfo[str(num)] = {}
             lineupStatInfo = facStatInfo[str(num)]
+            if str(num) not in facDRHeroIDDict:
+                facDRHeroIDDict[str(num)] = {}
+            posHeroIDDict = facDRHeroIDDict[str(num)]
             batLineup = batFaction.getBatlineup(num)
             batLineup.totalHurt = 0
-            facDRLineupInfo[str(num)] = batLineup.lineupInfo
             GameWorld.DebugLogEx("阵容明细: faction=%s,num=%s", faction, num)
             for posNum, objID in batLineup.getPosObjIDDict().items():
                 if posNum == ChConfig.TFPosNum_Mingge:
@@ -2242,6 +2244,7 @@
                 dead = 0 if batObj.IsAlive() else 1
                 if heroID:
                     heroCount += 1
+                    posHeroIDDict[str(posNum)] = heroID
                 GameWorld.DebugLogEx("    Pos:%s ID=%s,npcID=%s,heroID=%s,HP=%s/%s, 输出=%s,承伤=%s,治疗=%s", 
                                      posNum, objID, npcID, heroID, batObj.GetHP(), batObj.GetMaxHP(), atkHurt, defHurt, cureHP)
                 lineupStatInfo[str(posNum)] = {"ObjID":objID, "HeroID":heroID, "NPCID":npcID, "AtkHurt":atkHurt, "DefHurt":defHurt, "CureHP":cureHP, 
@@ -2256,7 +2259,7 @@
     # 流向记录
     if mapID != ChConfig.Def_FBMapID_Main and reqPlayerID:
         DataRecordPack.DR_FightStat(reqPlayerID, mapID, funcLineID, turnFight.isWin, turnFight.turnNum, turnFight.turnMax, 
-                                    heroCount, turnFight.costTime, statInfo, drLineupInfo, guid)
+                                    heroCount, turnFight.costTime, drHeroIDDict, guid)
     return
 
 #// B4 14 查看战报 #tagCSTurnFightReportView

--
Gitblit v1.8.0