| | |
| | | cnt += 1
|
| | | savaData += billboardData.getBuffer()
|
| | |
|
| | | GameWorld.Log("Save DBCrossBillboard cnt :%s" % cnt)
|
| | | GameWorld.Log("Save DBCrossBillboard count :%s len=%s" % (cnt, len(savaData)))
|
| | | return CommFunc.WriteDWORD(cntData, cnt) + savaData
|
| | |
|
| | | # 从数据库载入数据
|
| | | def LoadPyGameData(self, datas, pos, dataslen):
|
| | | cnt, pos = CommFunc.ReadDWORD(datas, pos)
|
| | | GameWorld.Log("Load DBCrossBillboard cnt :%s" % cnt)
|
| | | GameWorld.Log("Load DBCrossBillboard count :%s" % cnt)
|
| | |
|
| | | for _ in xrange(cnt):
|
| | | billboardData = PyGameDataStruct.tagDBCrossBillboard()
|
| | |
| | | SyncCrossBillboardToClientServer(billboardType, groupValue1, groupValue2, [serverGroupID], queryData)
|
| | | return
|
| | |
|
| | | def SyncCrossBillboardToClientServer(billboardType, groupValue1, groupValue2, serverGroupIDList=[], queryData={}):
|
| | | def SyncCrossBillboardToClientServer(billboardType, groupValue1, groupValue2, serverGroupIDList=None, queryData=None):
|
| | | ## 同步跨服榜单到子服
|
| | | if not GameWorld.IsCrossServer():
|
| | | return
|
| | | if serverGroupIDList == None:
|
| | | serverGroupIDList = []
|
| | | if queryData == None:
|
| | | queryData = {}
|
| | | billboardMgr = PyDataManager.GetCrossBillboardManager()
|
| | | billboardObj = billboardMgr.GetCrossBillboard(billboardType, groupValue1, groupValue2)
|
| | | crossServerDataVer = billboardObj.GetCrossServerDataVer()
|
| | |
| | | billboardData.BillboardType = billboardType
|
| | | billboardData.ID = dataID
|
| | | billboardData.ID2 = id2
|
| | | billboardData.Name1 = name1
|
| | | billboardData.Name2 = name2
|
| | | billboardData.Name1 = "" if len(name1) > 33 else name1
|
| | | billboardData.Name2 = "" if len(name2) > 33 else name2
|
| | | billboardData.Type2 = type2
|
| | | billboardData.Value1 = value1
|
| | | billboardData.Value2 = value2
|