From 849f499eceec264b1abd0bae174f7b7a10b99433 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 27 一月 2026 19:39:35 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(战斗初始化同步命格PosNum=99)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 3a7ede6..652b5f1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -133,7 +133,9 @@
             reload(reloadPath)
         except Exception:
             continue
-
+        
+    import DataRecordPack
+    DataRecordPack.DR_Reload("script")
     Log("Reload Begin : time = %s"%GetCurrentDataTimeStr())
     return
 
@@ -903,6 +905,22 @@
         return
     
     return
+
+## 获得指定的时间格式
+#  @param timeStr 时间列表
+#  @param timeFormat 指定的转换格式
+#  @return 时间datetime格式
+#  @remarks 获得指定的时间格式
+def GetDateTimeByFormatStr(timeStr, timeFormat):
+    timeStr = timeStr.strip().split(".")[0]
+    try:
+        return  datetime.datetime.strptime(timeStr, timeFormat)
+    except BaseException , e :
+        Log("%s : %s"%(e, timeStr))
+        return
+
+    return
+
 #---------------------------------------------------------------------
 ##获得与现实时间差距的小时数
 # @param dateTimeStr 比较时间字符 如"2010-05-26 11:21:25"
@@ -1343,6 +1361,14 @@
 def GetServerVersion():
     return GetGameWorld().GetServerVersion()
 
+def IsBattleServer():
+    ## 是否战斗服务器
+    return ToIntDef(ReadChConfig.GetPyMongoConfig("platform", "BattleServer"), 0) == 1
+
+def GetServerGroupName():
+    ## 服务器组名,取 ServersRoute 中的配置
+    return ReadChConfig.GetServersRouteConfig("platform", "GroupName")
+
 def GetServerGroupID():
     ## 服务器组ID,必须唯一,代表这台物理服务器
     return ToIntDef(ReadChConfig.GetPyMongoConfig("platform", "GroupID"), 0)

--
Gitblit v1.8.0