From e41e926bbbd0255acde8b4b62d5558a025b83a02 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 11 六月 2025 17:18:27 +0800
Subject: [PATCH] 10263 【越南】【BT】增加后台执行命令清除本服榜单某个玩家ID数据: ClearBillboardData

---
 ServerPython/CoreServerGroup/GameServer/Script/GM/GMTExec/ClearBillboardData.py |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/GMTExec/ClearBillboardData.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/GMTExec/ClearBillboardData.py
new file mode 100644
index 0000000..8fffe06
--- /dev/null
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/GMTExec/ClearBillboardData.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package Script.GM.GMTExec.ClearBillboardData
+#
+# @todo:清除本服榜单某个玩家数据
+# @author hxp
+# @date 2025-06-11
+# @version 1.0
+#
+# 详细描述: 清除本服榜单某个玩家数据
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2025-06-11 17:30"""
+#-------------------------------------------------------------------------------
+
+def runMyCMD(exec_locals):
+    ''' 运行命令函数
+    @param exec_locals: GMT_Execfile 模块中的 DoLogic 函数 locals()
+    
+    import 其他模块需要写在此函数里,不然无法引用到
+    '''
+    import GameWorld
+    import ShareDefine
+    
+    orderId = exec_locals["orderId"]
+    cmdInfo = exec_locals["cmdInfo"]
+    resultDict = exec_locals["resultDict"] # 建议都进行更新结果字典记录详细处理信息,GMT_Execfile 模块会统一写入流向
+    
+    ## ----------------------- 清除设置 -----------------------
+    DelPlayerID = 443560 # 需要删除的玩家ID
+    ## -------------------------------------------------------
+    
+    delInBillboardList = []
+    for billboardIndex in ShareDefine.BillboardTypeList:
+        if billboardIndex in ShareDefine.FamilyBillboardList:
+            continue
+        billboard = GameWorld.GetBillboard().FindBillboard(billboardIndex)
+        if not billboard:
+            continue
+        if not billboard.FindByID(DelPlayerID):
+            continue
+        billboard.DeleteByID(DelPlayerID)
+        billboard.Sort()
+        delInBillboardList.append(billboardIndex)
+        
+    # 以下为详细处理逻辑
+    GameWorld.Log("This is GameServer GMT_Execfile run %s. orderId=%s" % (cmdInfo, orderId))
+    resultDict.update({"ret":1, "DelPlayerID":DelPlayerID, "delInBillboardList":delInBillboardList})
+    return
+
+exec_locals = locals()
+if exec_locals.get("cmdInfo"):
+    runMyCMD(exec_locals)
+    
\ No newline at end of file

--
Gitblit v1.8.0