From ec68dabc97521a7706344e7d038e9f08462f4fe8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 16 十二月 2025 10:26:34 +0800
Subject: [PATCH] 16 卡牌服务端(删除多余备档报错防范;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py |   21 +++++++++++++++++++--
 1 files changed, 19 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 be8839f..dbbb24a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -119,8 +119,12 @@
 # @param eventTypeStr: 事件类型标识
 # @param dataDict: 事件字典
 # @return None
-def SendEventPack(eventTypeStr, dataDict, curPlayer=None):
-
+def SendEventPack(eventTypeStr, dataDict, curPlayer=None, checkBatServer=True):
+    
+    if checkBatServer and GameWorld.IsBattleServer():
+        GameWorld.DebugLogEx("战斗服务器暂不做流向记录")
+        return
+    
     if curPlayer:
         if not GameWorld.IsNormalPlayer(curPlayer):
             return
@@ -282,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