From 4c8a4908e7e0ab1575e6e9a0093f54bd63d85b6f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 04 二月 2026 21:07:17 +0800
Subject: [PATCH] 16 卡牌服务端(删除无用跨服管理模块、跨服功能、其他废弃代码;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py |   68 ++++++++++++++++++++++++++++-----
 1 files changed, 57 insertions(+), 11 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
index b474f25..5c3416a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -21,17 +21,25 @@
 import ChPyNetSendPack
 import NetPackCommon
 import IpyGameDataPY
+import PlayerMail
 import DBDataMgr
 
 import time
 
-def OnDay():
+def OnDay(centerEventValue=0):
+    # @param centerEventValue: 跨服中心事件值,不为0时代表是跨服中心同步的事件,只处理跨服功能需要处理的逻辑
     
     drBillboardTypeList = []
-    if GameWorld.IsCrossServer():
+    if centerEventValue:
+        if not GameWorld.IsCrossServer():
+            # 跨服事件只跨服服务器处理
+            return
         drBillboardTypeList = ShareDefine.CrossBillboardTypeList
+        eventName = "OnDay%s" % centerEventValue
+        
     else:
         drBillboardTypeList = IpyGameDataPY.GetFuncEvalCfg("BillboardSet", 1)
+        eventName = "OnDay"
         
     billboardMgr = DBDataMgr.GetBillboardMgr()
     for billboardType in drBillboardTypeList:
@@ -40,7 +48,7 @@
         groupList = billboardMgr.GetBillboardGroupList(billboardType)
         for billboardType, groupValue1, groupValue2 in groupList:
             billboardObj = billboardMgr.GetBillboard(billboardType, groupValue1, groupValue2)
-            billboardObj.SaveDRData("OnDay")
+            billboardObj.SaveDRData(eventName)
             
     return
 
@@ -86,14 +94,6 @@
 
 def UpdatePlayerFPTotalBillboard(curPlayer, isForceUpdate=False, isCheckRule=True):
     ##更新玩家总战斗力
-    return
-
-def UpdatePyPetBillboard(curPlayer, isForceUpdate=False, isUpdateTotal=True):
-    ## 更新宠物排行榜
-    return
-
-def UpdateRealmBillboard(curPlayer):
-    ##境界榜
     return
 
 #def __CanPlayerBillboardComm(curPlayer):
@@ -388,3 +388,49 @@
         clientPack.ViewIDDataList.append(viewData)
     clientPack.ViewIDDataCnt = len(clientPack.ViewIDDataList)
     return clientPack
+
+def DoGiveBillboardAwardByMail(billboardType, funcName, billboardAwardDict, mailKey):
+    ## 结算排行奖励邮件发放
+    GameWorld.Log("=== %s结算排行奖励! === " % (funcName))
+    if not billboardAwardDict:
+        return
+    orderList = [int(orderStr) for orderStr in billboardAwardDict.keys()]
+    orderList.sort()
+    GameWorld.Log("    奖励名次列表: %s" % orderList)
+    
+    billboardMgr = DBDataMgr.GetBillboardMgr()
+    billBoard = billboardMgr.GetBillboard(billboardType)
+    if not billBoard:
+        return
+    billBoard.SortDelayDo()
+    
+    awardOrder = orderList[0]
+    orderPlayerIDDict = {}
+    billboardCount, billboardMaxCount = billBoard.GetCount(), billBoard.GetMaxCount()
+    GameWorld.Log("    榜单数据数: %s/%s" % (billboardCount, billboardMaxCount))
+    for index in xrange(billboardCount):
+        billBoardData = billBoard.At(index)
+        if not billBoardData:
+            continue
+        order = index + 1
+        
+        if order > awardOrder:
+            nextOrderIndex = orderList.index(awardOrder) + 1
+            if nextOrderIndex >= len(orderList):
+                break
+            awardOrder = orderList[nextOrderIndex]
+            
+        playerID = billBoardData.GetID()
+        if playerID < ShareDefine.RealPlayerIDStart:
+            # 非真人不处理
+            continue
+        
+        orderPlayerIDDict[playerID] = [order, awardOrder]
+        
+        paramList = [order]
+        awardList = billboardAwardDict[str(awardOrder)]
+        PlayerMail.SendMailByKey(mailKey, playerID, awardList, paramList)
+        
+    GameWorld.Log("    奖励玩家名次信息: %s" % orderPlayerIDDict)
+    GameWorld.Log("===================================================")
+    return

--
Gitblit v1.8.0