From ad9ca5656fe2b0af83ca3d3cd6b7cc5511047ba9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 16 七月 2024 11:35:48 +0800
Subject: [PATCH] 9415 【主干】【港台】【越南】【砍树】【后端】古神战场(C107增加战场分区通知)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py | 40 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py
index 81b335e..4e12dba 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py
@@ -175,10 +175,10 @@
drDict = {"BillboardType":self.__billboardType, "GroupValue1":self.__groupValue1, "GroupValue2":self.__groupValue2,
"DataCount":len(self.__billboardList)}
DataRecordPack.SendEventPack(eventTypeName, drDict)
- for billboardData in self.__billboardList:
+ for index, billboardData in enumerate(self.__billboardList):
dataDict = {"BillboardType":billboardData.BillboardType, "GroupValue1":billboardData.GroupValue1,
"GroupValue2":billboardData.GroupValue2, "Type2":billboardData.Type2,
- "ID":billboardData.ID, "ID2":billboardData.ID2,
+ "ID":billboardData.ID, "ID2":billboardData.ID2, "Place":index,
"Name1":billboardData.Name1, "Name2":billboardData.Name2,
"Value1":billboardData.Value1, "Value2":billboardData.Value2,
"Value3":billboardData.Value3, "Value4":billboardData.Value4,
@@ -318,6 +318,42 @@
return
+def CopyBillboardEx(fromBillboardType, toBillboardType, groupValue1, groupValue2=0):
+ ## 将某个类型的榜单完全拷贝到其他榜单 - 一般用于备份、转移数据
+
+ billboardMgr = PyDataManager.GetCrossBillboardManager()
+ frbillboardObj = billboardMgr.GetCrossBillboard(fromBillboardType, groupValue1, groupValue2)
+ toBillboardObj = billboardMgr.GetCrossBillboard(toBillboardType, groupValue1, groupValue2)
+ toBillboardObj.ClearData()
+ GameWorld.Log("CopyBillboardEx: fromBillboardType=%s,toBillboardType=%s,groupValue1=%s,groupValue2=%s"
+ % (fromBillboardType, toBillboardType, groupValue1, groupValue2))
+ for frbillboardData in frbillboardObj.GetBillboardDataList():
+ tobillboardData = PyGameDataStruct.tagDBCrossBillboard()
+ tobillboardData.GroupValue1 = groupValue1
+ tobillboardData.GroupValue2 = groupValue2
+ tobillboardData.BillboardType = toBillboardType
+ tobillboardData.ID = frbillboardData.ID
+ tobillboardData.ID2 = frbillboardData.ID2
+ tobillboardData.Name1 = frbillboardData.Name1
+ tobillboardData.Name2 = frbillboardData.Name2
+ tobillboardData.Type2 = frbillboardData.Type2
+ tobillboardData.Value1 = frbillboardData.Value1
+ tobillboardData.Value2 = frbillboardData.Value2
+ tobillboardData.Value3 = frbillboardData.Value3
+ tobillboardData.Value4 = frbillboardData.Value4
+ tobillboardData.Value5 = frbillboardData.Value5
+ tobillboardData.Value6 = frbillboardData.Value6
+ tobillboardData.Value7 = frbillboardData.Value7
+ tobillboardData.Value8 = frbillboardData.Value8
+ tobillboardData.UserData = frbillboardData.UserData
+ tobillboardData.DataLen = len(tobillboardData.UserData)
+ tobillboardData.CmpValue = frbillboardData.CmpValue
+ tobillboardData.CmpValue2 = frbillboardData.CmpValue2
+ tobillboardData.CmpValue3 = frbillboardData.CmpValue3
+ toBillboardObj.AddBillboardData(tobillboardData)
+
+ return
+
#// C0 04 查看跨服排行榜 #tagCGViewCrossBillboard
#
#struct tagCGViewCrossBillboard
--
Gitblit v1.8.0