From 4778d39a0d6aa96f3b29115ff65ce6adb1e8e252 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 22 十二月 2025 20:02:42 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(个人战报支持配置是否仅保留1份;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 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 eb1b7c0..7b0a141 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -2193,13 +2193,15 @@
if not os.path.exists(ReportDir):
os.makedirs(ReportDir)
else:
- items = os.listdir(ReportDir)
- for item in items:
- fullPath = os.path.join(ReportDir, item)
- try:
- os.remove(fullPath)
- except:
- pass
+ isSaveOne = IpyGameDataPY.GetFuncCfg("TurnFightProcess", 2) # 个人战报是否只保留1份
+ if isSaveOne:
+ items = os.listdir(ReportDir)
+ for item in items:
+ fullPath = os.path.join(ReportDir, item)
+ try:
+ os.remove(fullPath)
+ except:
+ pass
saveFilePath = os.path.join(ReportDir, "%s.tfr" % guid)
GameWorld.DebugLogEx("战报路径=%s", saveFilePath)
--
Gitblit v1.8.0