From ec5de0b415bb3fd2c12367b1babfe0d4351a2827 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 17 三月 2026 15:03:38 +0800
Subject: [PATCH] 405 【公会】自动转让会长规则调整(优化优先传位配置;优化跨服邮件发送;)

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 1262e72..24c2e93 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -1441,12 +1441,6 @@
     #    return serverID
     #return MainServerDict[serverID]
 
-##获得当前服务器平台
-# @param 无
-# @return
-def GetPlatform():
-    return ReadChConfig.GetPyMongoConfig("platform", "PlatformName")
-
 def GetAppID():
     ## 获取渠道ID
     return ReadChConfig.GetPyMongoConfig("platform", "AppID")
@@ -2030,7 +2024,11 @@
     return datetime.datetime.strptime(timeStr, timeFormat)
 
 def ChangeStrToDatetime(timeStr, timeFormat=ChConfig.TYPE_Time_Format):
-    return datetime.datetime.strptime(timeStr, timeFormat)
+    try:
+        return datetime.datetime.strptime(timeStr, timeFormat)
+    except:
+        # 转化失败返回默认,如传入0也可转换
+        return datetime.datetime(1970, 1, 1, 8, 0, 0)
 
 ## 时间格式转换成数值时间
 # @param dateT: datetime.datetime
@@ -2478,6 +2476,8 @@
         import CrossMsg
         CrossMsg.SendToClientServer(ShareDefine.C2S_GMDebugAnswer, {"text":text}, [mainServerID], playerID)
         return
+    if hasattr(curPlayer, "GetPlayer"):
+        curPlayer = curPlayer.GetPlayer()
     DebugLog(text, playerID)
     text = text.decode(ShareDefine.Def_Game_Character_Encoding).encode(GetCharacterEncoding())
     curPlayer.DebugAnswer(text)

--
Gitblit v1.8.0