From 458f8ad37f944f5a4334dc9e522e6640e4aa2def Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 19 九月 2024 11:00:48 +0800
Subject: [PATCH] 10267 【越南】【英文】【砍树】仙官新增膜拜

---
 ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_Worship.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_Worship.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_Worship.py
index 78911de..d1a07ae 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_Worship.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_Worship.py
@@ -36,8 +36,12 @@
     playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
     worshipType = GameWorld.ToIntDef(gmCmdDict.get('worshipType', ''), 0)
     worshipValue = GameWorld.ToIntDef(gmCmdDict.get('worshipValue', ''), 0)
-    zoneID = GameWorld.ToIntDef(gmCmdDict.get('zoneID', ''), 0)
     days = GameWorld.ToIntDef(gmCmdDict.get('days', ''), 0)
+    try:
+        serverIDList = eval(gmCmdDict.get('serverIDList', '[]'))
+    except:
+        GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
+        return
     
     opType = gmCmdDict.get('opType', '')
     
@@ -94,7 +98,7 @@
     AccID = cacheDict.get("AccID", "")
     
     if opType == "add":
-        if not GameWorship.AddWorshipPlayer(tagPlayerID, worshipType, worshipValue, days, zoneID):
+        if not GameWorship.AddWorshipPlayer(worshipType, worshipValue, tagPlayerID, serverIDList, days=days):
             GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Unknow, "add error.")
             return
         
@@ -115,13 +119,13 @@
     recDict = playerRecMgr.GetPlayerRecDataDict(ShareDefine.Def_PlayerRecType_WorshipPlayer)
     for recDataList in recDict.values():
         for recData in recDataList:
-            playerInfo = GameWorship.GetModelShowInfo(recData)
+            playerInfo = recData.GetUserDataByKey(ChConfig.Def_RecDataKey_PlayerInfo, {})
             worshipList.append({"PlayerID":recData.GetPlayerID(),
                                 "AddTime":GameWorld.ChangeTimeNumToStr(recData.GetTime()),
                                 "WorshipType":GameWorship.GetWorshipType(recData),
                                 "WorshipValue":GameWorship.GetWorshipValue(recData),
                                 "Days":GameWorship.GetWorshipDays(recData),
-                                "ZoneID":GameWorship.GetWorshipZoneID(recData),
+                                "ServerIDList":str(recData.GetUserDataByKey(ChConfig.Def_RecDataKey_ServerIDList)),
                                 "AccID":playerInfo.get("AccID", ""),
                                 "Name":playerInfo.get("Name", ""),
                                 })

--
Gitblit v1.8.0