From 388823edfe6308cba6f76ca6dc4f20022c5cb2be Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 30 六月 2025 19:03:50 +0800
Subject: [PATCH] 10431 【英文】看广告获得限时代金券

---
 ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py |   93 ++++++++++++++++++++++++----------------------
 1 files changed, 49 insertions(+), 44 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
index a6335f1..84a474e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py
@@ -65,6 +65,8 @@
 import GameWorld
 import datetime
 import ShareDefine
+import PlayerControl
+import PlayerBillboard
 import ChConfig
 #===============================================================================
 ##发送事件记录给EventShell
@@ -75,7 +77,9 @@
     if curPlayer:
         pid = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PlayerFromPID)
         dataDict["pid"] = pid
-        dataDict["fightPower"] = curPlayer.GetFightPower()
+        dataDict["fightPower"] = PlayerControl.GetFightPower(curPlayer)
+        dataDict["PlayerLV"] = curPlayer.GetLV()
+        dataDict["IP"] = curPlayer.GetIP()
         
     dataDict["time"] = str(datetime.datetime.today()).split(".")[0]
     
@@ -230,13 +234,6 @@
     SendEventPack("GameMapOnLinePlayerCnt", dataDict)
     return
 
-## 每天记录排行榜数据
-#  @param billboardType: 排行榜类型
-#  @return: None
-def DR_BillboardDataByDay(billboardType):
-    DR_BillboardData(billboardType, "BillboardDataByDay")
-    return
-
 ## 记录排行榜数据
 #  @param billboardType: 排行榜类型
 #  @return: None
@@ -245,33 +242,46 @@
     if not billBoard:
         #找不到排行榜
         return
+    dataCount = billBoard.GetCount()
+    if not dataCount:
+        return
     
-    for index in range(0, billBoard.GetCount()):
+    billboardMgr = PlayerBillboard.GetBillboardMgr()
+    billboardObj = billboardMgr.GetBillboardObj(billboardType)
+    idOrderDict = billboardObj.GetIDOrderDict()
+    
+    serverTime = GameWorld.GetServerTime()
+    timeStr = "%02d%02d%02d%s" % (serverTime.hour, serverTime.minute, serverTime.second, str(serverTime.microsecond)[:3])
+    eventTypeStr = "Billboard_%s_%s_%s" % (billboardType, eventName, timeStr)
+    
+    dataDict = {"BillboardType":billboardType, "DataCount":dataCount, "addDataDict":addDataDict}
+    SendEventPack(eventTypeStr, dataDict)
+    
+    for index in range(0, dataCount):
         billBoardData = billBoard.At(index)
         if not billBoardData:
             continue
-        
-        objID = billBoardData.GetID()
-        objID2 = billBoardData.GetID2()
-        name1 = billBoardData.GetName1()
-        name2 = billBoardData.GetName2()
-        type2 = billBoardData.GetType2()
-        value1 = billBoardData.GetValue1()
-        value2 = billBoardData.GetValue2()
-        cmpValue = billBoardData.GetCmpValue()
-        cmpValue2 = billBoardData.GetCmpValue2()
-        cmpValue3 = billBoardData.GetCmpValue3()
-        
-        dataDict = {"BillboardType":billboardType,
-                    "Place":index,  "ObjID":objID, "ObjID2":objID2, "Name1":name1, 
-                    "Name2":name2,  "Type2":type2, "Value1":value1, "Value2":value2,
-                    "CmpValue":cmpValue, "CmpValue2":cmpValue2, "CmpValue3":cmpValue3,
+        rank = idOrderDict.get(billBoardData.GetID(), index + 1)
+        dataDict = {"Rank":rank, "Index":index,
+                    "ID":billBoardData.GetID(),
+                    "ID2":billBoardData.GetID2(),
+                    "Name1":billBoardData.GetName1(),
+                    "Name2":billBoardData.GetName2(),
+                    "Type2":billBoardData.GetType2(),
+                    "Value1":billBoardData.GetValue1(),
+                    "Value2":billBoardData.GetValue2(),
+                    "Value3":billBoardData.GetValue3(),
+                    "Value4":billBoardData.GetValue4(),
+                    "Value5":billBoardData.GetValue5(),
+                    "Value6":billBoardData.GetValue6(),
+                    "Value7":billBoardData.GetValue7(),
+                    "Value8":billBoardData.GetValue8(),
+                    "CmpValue":billBoardData.GetCmpValue(),
+                    "CmpValue2":billBoardData.GetCmpValue2(),
+                    "CmpValue3":billBoardData.GetCmpValue3(),
+                    "UserData":billBoardData.GetUserData(),
                     }
-        
-        dataDict.update(addDataDict)
-        
-        #发送封包
-        SendEventPack(eventName, dataDict)
+        SendEventPack(eventTypeStr, dataDict)
     return
 
 ## GM执行命令操作
@@ -381,20 +391,6 @@
     #发送封包
     SendEventPack("ResetGameDataRecord", dataDict)
     return
-
-
-## 复制的排行榜记录
-#  @param Place: 名次
-#  @param playerID: 玩家ID
-#  @param playerName: 玩家名字
-#  @param playerLV: 玩家等级
-#  @param playerJob: 玩家职业
-#  @param totalPoint: 积分
-#  @return: None
-def DR_BillboardCopy(billboardType):
-    DR_BillboardData(billboardType, "BillboardCopy")
-    return
-
 
 ## 弹劾玩家家族职位变更
 #  @param familyID: 家族ID
@@ -552,6 +548,15 @@
     SendEventPack("CompensationPersonal", dataDict)
     return 
 
+## 删除个人补偿流向
+#  @param curPlayerID, GUID, ItemDictList
+#  @return: None 
+def DR_DelPersonalCompensation(playerID, GUID, eventName):
+    dataDict = {'PlayerID':playerID, 'GUID':GUID, 'eventName':eventName}
+    #发送封包
+    SendEventPack("CompensationPersonalDel", dataDict)
+    return 
+
 ## 添加全服补偿流向
 #  @param GUID, ItemDictList
 #  @return: None 

--
Gitblit v1.8.0