From 1e6cef052d81f78ff9834e55d9b0dfa4e03fdf62 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 20 五月 2024 18:00:48 +0800
Subject: [PATCH] 0312 取名屏蔽被拒绝问题

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py
index 534b2d2..02a95d7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py
@@ -26,6 +26,7 @@
 import PyGameData
 import PlayerFB
 import ChConfig
+import CommFunc
 
 import datetime
 import time
@@ -405,10 +406,11 @@
             
             # ipyData 活动时间表信息由跨服服务器同步子服,活动内容取子服自己的
             ipyDataDict = {}
-            for k, v in ipyData.__dict__.items():
-                if k in ["NotifyInfoStart", "NotifyInfoEnd", "NotifyInfoLoop", "ServerIDRangeList"]:
+            methods = CommFunc.get_class_method(ipyData, "Get") # 获取所有Get开头的方法
+            for method_name in methods:
+                if method_name in ["GetNotifyInfoStart", "GetNotifyInfoEnd", "GetNotifyInfoLoop", "GetServerIDRangeList"]:
                     continue
-                ipyDataDict[k] = v
+                ipyDataDict[method_name[3:]] = getattr(ipyData, method_name)()
             ipyDataDict.update({"StartDate":startDateStr, "EndDate":endDateStr})
             GameWorld.Log("        ipyDataDict=%s" % ipyDataDict)
             
@@ -452,7 +454,7 @@
                 GameWorld.Log("        isDayReset=%s,actIDDateTime=%s,actID=%s" % (isDayReset, actIDDateTime, actID))
                 
                 # 模板ID
-                if hasattr(ipyData, "TemplateIDList"):
+                if hasattr(ipyData, "GetTemplateIDList"):
                     templateIDList = ipyData.GetTemplateIDList()
                     templateID = templateIDList[-1] if dayIndex >= len(templateIDList) else templateIDList[dayIndex]
                     

--
Gitblit v1.8.0