| | |
| | | TreasureType = 0 #(BYTE TreasureType)//寻宝类型
|
| | | WishCnt = 0 #(BYTE WishCnt)
|
| | | WishIDList = list() #(vector<DWORD> WishIDList)// 选择的寻宝物品库中的数据ID,注意不是库ID
|
| | | WishCardUseCnt = 0 #(BYTE WishCardUseCnt)
|
| | | WishCardUseLibIDList = list() #(vector<WORD> WishCardUseLibIDList)// 使用心愿卡的库ID列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.WishCnt):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.WishIDList.append(value)
|
| | | self.WishCardUseCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.WishCardUseCnt):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.WishCardUseLibIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.TreasureType = 0
|
| | | self.WishCnt = 0
|
| | | self.WishIDList = list()
|
| | | self.WishCardUseCnt = 0
|
| | | self.WishCardUseLibIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.WishCnt
|
| | | length += 1
|
| | | length += 2 * self.WishCardUseCnt
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.WishCnt)
|
| | | for i in range(self.WishCnt):
|
| | | data = CommFunc.WriteDWORD(data, self.WishIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.WishCardUseCnt)
|
| | | for i in range(self.WishCardUseCnt):
|
| | | data = CommFunc.WriteWORD(data, self.WishCardUseLibIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | Head:%s,
|
| | | TreasureType:%d,
|
| | | WishCnt:%d,
|
| | | WishIDList:%s
|
| | | WishIDList:%s,
|
| | | WishCardUseCnt:%d,
|
| | | WishCardUseLibIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.TreasureType,
|
| | | self.WishCnt,
|
| | | "...",
|
| | | self.WishCardUseCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|