From f397f8712fb5297a8dc44f02e4470cbbc93e755f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 16 十二月 2025 12:13:16 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(武将招募未激活永久卡时不增加幸运;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBDataMgr.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBDataMgr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBDataMgr.py
index 99dc267..d1cd307 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBDataMgr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBDataMgr.py
@@ -122,9 +122,9 @@
GameWorld.Log("加载数据未完成,不存储备档")
return
curTime = int(time.time())
- if saveToDB:
- if curTime - PyGameData.g_lastRTBTime < BackupInterval * 60:
- GameWorld.Log("备档冷却中!")
+ if not saveToDB:
+ if curTime > PyGameData.g_lastRTBTime and curTime - PyGameData.g_lastRTBTime < BackupInterval * 60:
+ #GameWorld.DebugLog("备档冷却中! 上次备档时间=%s" % (GameWorld.ChangeTimeNumToStr(PyGameData.g_lastRTBTime)))
return
serverID = GameWorld.GetGameWorld().GetServerID()
@@ -158,9 +158,12 @@
# 删除多余备档
for bakInfo in bakFileList[BackupCopyMax:]:
filePath = bakInfo[-1]
- os.remove(filePath)
- GameWorld.Log("删除多余备档文件: %s" % filePath)
-
+ try:
+ os.remove(filePath)
+ GameWorld.Log("删除多余备档文件: %s" % filePath)
+ except:
+ GameWorld.ErrLog("删除多余备档文件失败: %s" % filePath)
+
if saveToDB:
SaveGameWorldDataToDB(saveData)
return
--
Gitblit v1.8.0