| | |
| | | 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
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
|
| | | ("LVReset", c_ubyte), #重置等级
|
| | | ("BreakReset", c_ubyte), #重置突破
|
| | | ("AwakeReset", c_ubyte), #重置觉醒
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x39
|
| | | self.ItemIndex = 0
|
| | | self.LVReset = 0
|
| | | self.BreakReset = 0
|
| | | self.AwakeReset = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// B2 39 武将重生 //tagCSHeroRebirth:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ItemIndex:%d
|
| | | ItemIndex:%d,
|
| | | LVReset:%d,
|
| | | BreakReset:%d,
|
| | | AwakeReset:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ItemIndex
|
| | | self.ItemIndex,
|
| | | self.LVReset,
|
| | | self.BreakReset,
|
| | | self.AwakeReset
|
| | | )
|
| | | return DumpString
|
| | |
|