From 9c5f7ba286ee8fa87f9e348624fee2127b3fe85a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 04 十二月 2025 15:45:44 +0800
Subject: [PATCH] 369 【活动内容】开服冲榜-服务端

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 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..34b4c1e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -21,6 +21,7 @@
 import ChPyNetSendPack
 import NetPackCommon
 import IpyGameDataPY
+import PlayerMail
 import DBDataMgr
 
 import time
@@ -388,3 +389,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(ShareDefine.Def_BT_Arena)
+    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