From 3f123a69bbdac800953ed553f30aa1815ec377d1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 13 十二月 2025 14:44:59 +0800
Subject: [PATCH] 389 流向记录(战斗耗时流向;战斗失败明细流向;战斗服务器可记录战斗相关流向;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index 3406937..dbbb24a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -119,9 +119,9 @@
 # @param eventTypeStr: 事件类型标识
 # @param dataDict: 事件字典
 # @return None
-def SendEventPack(eventTypeStr, dataDict, curPlayer=None):
+def SendEventPack(eventTypeStr, dataDict, curPlayer=None, checkBatServer=True):
     
-    if GameWorld.IsBattleServer():
+    if checkBatServer and GameWorld.IsBattleServer():
         GameWorld.DebugLogEx("战斗服务器暂不做流向记录")
         return
     
@@ -286,6 +286,19 @@
     SendEventPack("FBPass_%s" % mapID, dataDict, curPlayer)
     return
 
+def DR_FightStat(reqPlayerID, mapID, funcLineID, isWin, turnNum, turnMax, heroCount, costTime, statInfo, drLineupInfo):
+    ## 战斗统计
+    dataDict = {'PlayerID':reqPlayerID, 'mapID':mapID, 'funcLineID':funcLineID, 'isWin':isWin, 
+                'turnNum':turnNum, 'turnMax':turnMax, 'heroCount':heroCount, 'costTime':costTime}
+    SendEventPack("FightTime", dataDict, checkBatServer=False)
+    
+    #战斗失败的记录明细信息
+    if not isWin:
+        failDRDict = {"statInfo":statInfo, "drLineupInfo":drLineupInfo}
+        failDRDict.update(dataDict)
+        SendEventPack("FightFail_%s" % mapID, failDRDict, checkBatServer=False)
+    return
+
 ##累计登陆礼包
 def DR_LoginDayAward(curPlayer, dayIndex):
     dataDict = {'PlayerID':curPlayer.GetPlayerID(), 

--
Gitblit v1.8.0