| | |
| | | import IpyGameDataPY
|
| | | import DBDataMgr
|
| | | import CommFunc
|
| | | import DBComm
|
| | |
|
| | | import json
|
| | | import time
|
| | |
| | |
|
| | | def __init__(self, dbData=None):
|
| | | self.__dbData = DBStruct.tagDBBillboard() if not dbData else dbData
|
| | | self.__dataDict = DBComm.UserDataDict(self.__dbData, "UserData", "DataLen", True)
|
| | | return
|
| | |
|
| | | def GetType(self): return self.__dbData.BillboardType
|
| | |
| | | def SetCmpValue3(self, cmpValue3): self.__dbData.CmpValue3 = cmpValue3
|
| | | def GetTime(self): return self.__dbData.Time
|
| | | def SetTime(self, updTime): self.__dbData.Time = updTime
|
| | | def GetUserData(self): return self.__dbData.UserData
|
| | | def SetUserData(self, userData):
|
| | | if not isinstance(userData, str):
|
| | | if isinstance(userData, dict) or isinstance(userData, list):
|
| | | userData = json.dumps(userData, ensure_ascii=False)
|
| | | else:
|
| | | userData = ""
|
| | | userData = userData.replace(" ", "")
|
| | | self.__dbData.UserData = userData
|
| | | self.__dbData.DataLen = len(self.__dbData.UserData)
|
| | | return
|
| | | def GetUserDict(self): return self.__dataDict.GetData()
|
| | | def GetUserData(self): return self.__dataDict.ToString()
|
| | | def SetUserData(self, value): self.__dataDict.SetData(value)
|
| | | def GetBuffer(self): return self.__dbData.getBuffer()
|
| | | def Clear(self): return self.__dbData.clear()
|
| | | def Copy(self, setType=None):
|