| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 71 命格分解 #tagCMBirthChartDecompose
|
| | |
|
| | | class tagCMBirthChartDecompose(Structure):
|
| | | Head = tagHead()
|
| | | IsAll = 0 #(BYTE IsAll)// 是否全部分解,优先级最高,锁定除外
|
| | | QualityCnt = 0 #(BYTE QualityCnt)// 按全部分解品质数
|
| | | QualityList = list() #(vector<BYTE> QualityList)// 全部分解的品质列表,发送的品质会全部分解,锁定除外
|
| | | Count = 0 #(BYTE Count)// 指定批量分解数,最大不超过50个
|
| | | PlaceIndexList = list() #(vector<WORD> PlaceIndexList)// 批量分解位置索引列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x71
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.QualityCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.QualityCnt):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.QualityList.append(value)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.PlaceIndexList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x71
|
| | | self.IsAll = 0
|
| | | self.QualityCnt = 0
|
| | | self.QualityList = list()
|
| | | self.Count = 0
|
| | | self.PlaceIndexList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1 * self.QualityCnt
|
| | | length += 1
|
| | | length += 2 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.IsAll)
|
| | | data = CommFunc.WriteBYTE(data, self.QualityCnt)
|
| | | for i in range(self.QualityCnt):
|
| | | data = CommFunc.WriteBYTE(data, self.QualityList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteWORD(data, self.PlaceIndexList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | IsAll:%d,
|
| | | QualityCnt:%d,
|
| | | QualityList:%s,
|
| | | Count:%d,
|
| | | PlaceIndexList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.IsAll,
|
| | | self.QualityCnt,
|
| | | "...",
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBirthChartDecompose=tagCMBirthChartDecompose()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBirthChartDecompose.Head.Cmd,m_NAtagCMBirthChartDecompose.Head.SubCmd))] = m_NAtagCMBirthChartDecompose
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 72 命格锁定状态变更 #tagCMBirthChartLock
|
| | |
|
| | | class tagCMBirthChartLock(Structure):
|
| | | Head = tagHead()
|
| | | LockState = 0 #(BYTE LockState)// 锁定状态, 0-锁定,1-解锁
|
| | | Count = 0 #(BYTE Count)// 批量操作数,最大不超过50个
|
| | | PlaceIndexList = list() #(vector<WORD> PlaceIndexList)// 批量操作位置索引列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x72
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.LockState,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.PlaceIndexList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x72
|
| | | self.LockState = 0
|
| | | self.Count = 0
|
| | | self.PlaceIndexList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.LockState)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteWORD(data, self.PlaceIndexList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | LockState:%d,
|
| | | Count:%d,
|
| | | PlaceIndexList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.LockState,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBirthChartLock=tagCMBirthChartLock()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBirthChartLock.Head.Cmd,m_NAtagCMBirthChartLock.Head.SubCmd))] = m_NAtagCMBirthChartLock
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 70 命格升级 #tagCMBirthChartUp
|
| | |
|
| | | class tagCMBirthChartUp(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PlaceType", c_ubyte), # 位置类型;0-命格背包,1-命格孔
|
| | | ("PlaceIndex", c_ushort), # 位置索引
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x70
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x70
|
| | | self.PlaceType = 0
|
| | | self.PlaceIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMBirthChartUp)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 70 命格升级 //tagCMBirthChartUp:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | PlaceType:%d,
|
| | | PlaceIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.PlaceType,
|
| | | self.PlaceIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBirthChartUp=tagCMBirthChartUp()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBirthChartUp.Cmd,m_NAtagCMBirthChartUp.SubCmd))] = m_NAtagCMBirthChartUp
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 52 购买功能NPC采集次数 #tagCMBuyCollectionCnt
|
| | |
|
| | | class tagCMBuyCollectionCnt(Structure):
|
| | |
| | |
|
| | | m_NAtagCSTreasureWishSelect=tagCSTreasureWishSelect()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSTreasureWishSelect.Head.Cmd,m_NAtagCSTreasureWishSelect.Head.SubCmd))] = m_NAtagCSTreasureWishSelect
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 73 解锁命格孔 #tagCMUnLockBirthChartHole
|
| | |
|
| | | class tagCMUnLockBirthChartHole(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BirthChartIndex", c_ubyte), # 孔索引
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x73
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x73
|
| | | self.BirthChartIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMUnLockBirthChartHole)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 73 解锁命格孔 //tagCMUnLockBirthChartHole:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BirthChartIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BirthChartIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMUnLockBirthChartHole=tagCMUnLockBirthChartHole()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUnLockBirthChartHole.Cmd,m_NAtagCMUnLockBirthChartHole.SubCmd))] = m_NAtagCMUnLockBirthChartHole
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 63 战斗预设切换 #tagCSBatPresetSwitch
|
| | |
|
| | | class tagCSBatPresetSwitch(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BatPresetType", c_ubyte), #战斗预设类型:1-主线战斗;2-演武场防守;
|
| | | ("BatPresetID", c_ubyte), #切换至目标战斗预设ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x63
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x63
|
| | | self.BatPresetType = 0
|
| | | self.BatPresetID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSBatPresetSwitch)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 63 战斗预设切换 //tagCSBatPresetSwitch:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BatPresetType:%d,
|
| | | BatPresetID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BatPresetType,
|
| | | self.BatPresetID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSBatPresetSwitch=tagCSBatPresetSwitch()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSBatPresetSwitch.Cmd,m_NAtagCSBatPresetSwitch.SubCmd))] = m_NAtagCSBatPresetSwitch
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 19 红颜激活 #tagCSBeautyActivate
|
| | |
|
| | | class tagCSBeautyActivate(Structure):
|
| | |
| | |
|
| | | m_NAtagCSBeautySkinOP=tagCSBeautySkinOP()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSBeautySkinOP.Cmd,m_NAtagCSBeautySkinOP.SubCmd))] = m_NAtagCSBeautySkinOP
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 62 功能预设切换 #tagCSFuncPresetSwitch
|
| | |
|
| | | class tagCSFuncPresetSwitch(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BatPresetID", c_ubyte), #所属战斗预设ID
|
| | | ("FuncPresetType", c_ubyte), #预设类型,2-阵容;3-命格;
|
| | | ("PresetID", c_ubyte), #本功能切换至目标预设ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x62
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x62
|
| | | self.BatPresetID = 0
|
| | | self.FuncPresetType = 0
|
| | | self.PresetID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSFuncPresetSwitch)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 62 功能预设切换 //tagCSFuncPresetSwitch:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BatPresetID:%d,
|
| | | FuncPresetType:%d,
|
| | | PresetID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BatPresetID,
|
| | | self.FuncPresetType,
|
| | | self.PresetID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSFuncPresetSwitch=tagCSFuncPresetSwitch()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSFuncPresetSwitch.Cmd,m_NAtagCSFuncPresetSwitch.SubCmd))] = m_NAtagCSFuncPresetSwitch
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 60 功能预设解锁 #tagCSFuncPresetUnlock
|
| | |
|
| | | class tagCSFuncPresetUnlock(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("FuncPresetType", c_ubyte), #预设类型,1-全局;2-阵容;3-命格;
|
| | | ("PresetID", c_ubyte), #预设ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x60
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x60
|
| | | self.FuncPresetType = 0
|
| | | self.PresetID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSFuncPresetUnlock)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 60 功能预设解锁 //tagCSFuncPresetUnlock:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | FuncPresetType:%d,
|
| | | PresetID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.FuncPresetType,
|
| | | self.PresetID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSFuncPresetUnlock=tagCSFuncPresetUnlock()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSFuncPresetUnlock.Cmd,m_NAtagCSFuncPresetUnlock.SubCmd))] = m_NAtagCSFuncPresetUnlock
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 61 功能预设改名 #tagCSFuncPresetUpdName
|
| | |
|
| | | class tagCSFuncPresetUpdName(Structure):
|
| | | Head = tagHead()
|
| | | FuncPresetType = 0 #(BYTE FuncPresetType)//预设类型,1-全局;2-阵容;3-命格;
|
| | | PresetID = 0 #(BYTE PresetID)//预设ID
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | PresetName = "" #(String PresetName)//预设名称
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x61
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FuncPresetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PresetName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x61
|
| | | self.FuncPresetType = 0
|
| | | self.PresetID = 0
|
| | | self.NameLen = 0
|
| | | self.PresetName = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += len(self.PresetName)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.FuncPresetType)
|
| | | data = CommFunc.WriteBYTE(data, self.PresetID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.PresetName)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FuncPresetType:%d,
|
| | | PresetID:%d,
|
| | | NameLen:%d,
|
| | | PresetName:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FuncPresetType,
|
| | | self.PresetID,
|
| | | self.NameLen,
|
| | | self.PresetName
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSFuncPresetUpdName=tagCSFuncPresetUpdName()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSFuncPresetUpdName.Head.Cmd,m_NAtagCSFuncPresetUpdName.Head.SubCmd))] = m_NAtagCSFuncPresetUpdName
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 51 命格分解 #tagCSMinggeDecompose
|
| | |
|
| | | class tagCSMinggeDecompose(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | IndexList = list() #(vector<BYTE> IndexList)// 推演背包中的物品格子索引列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x51
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.IndexList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x51
|
| | | self.Count = 0
|
| | | self.IndexList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteBYTE(data, self.IndexList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | IndexList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSMinggeDecompose=tagCSMinggeDecompose()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMinggeDecompose.Head.Cmd,m_NAtagCSMinggeDecompose.Head.SubCmd))] = m_NAtagCSMinggeDecompose
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 52 命格装备替换 #tagCSMinggeEquip
|
| | |
|
| | | class tagCSMinggeEquip(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MGNum", c_ubyte), # 装到哪一套命格,目前支持3套,从1开始
|
| | | ("Index", c_ubyte), # 推演背包中的物品格子索引
|
| | | ("AutoDec", c_ubyte), # 是否自动分解
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x52
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x52
|
| | | self.MGNum = 0
|
| | | self.Index = 0
|
| | | self.AutoDec = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSMinggeEquip)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 52 命格装备替换 //tagCSMinggeEquip:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MGNum:%d,
|
| | | Index:%d,
|
| | | AutoDec:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MGNum,
|
| | | self.Index,
|
| | | self.AutoDec
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSMinggeEquip=tagCSMinggeEquip()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMinggeEquip.Cmd,m_NAtagCSMinggeEquip.SubCmd))] = m_NAtagCSMinggeEquip
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 53 命格祈灵#tagCSMinggeQiling
|
| | |
|
| | | class tagCSMinggeQiling(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("UseCount", c_int), #使用个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x53
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x53
|
| | | self.UseCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSMinggeQiling)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 53 命格祈灵//tagCSMinggeQiling:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | UseCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.UseCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSMinggeQiling=tagCSMinggeQiling()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMinggeQiling.Cmd,m_NAtagCSMinggeQiling.SubCmd))] = m_NAtagCSMinggeQiling
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 50 命格推演 #tagCSMinggeTuiyan
|
| | |
|
| | | class tagCSMinggeTuiyan(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Count", c_ubyte), #推演个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x50
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x50
|
| | | self.Count = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSMinggeTuiyan)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 50 命格推演 //tagCSMinggeTuiyan:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Count:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Count
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSMinggeTuiyan=tagCSMinggeTuiyan()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMinggeTuiyan.Cmd,m_NAtagCSMinggeTuiyan.SubCmd))] = m_NAtagCSMinggeTuiyan
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 07 重置加点 #tagCMResetAttrPoint
|
| | |
|
| | | class tagCMResetAttrPoint(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 12 战斗阵容保存 #tagCSHeroLineupSave
|
| | | # B4 12 战斗阵容预设保存 #tagCSHeroPresetSave
|
| | |
|
| | | class tagCSHeroLineupPos(Structure):
|
| | | class tagCSHeroPresetPos(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
|
| | |
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSHeroLineupPos)
|
| | | return sizeof(tagCSHeroPresetPos)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 12 战斗阵容保存 //tagCSHeroLineupSave:
|
| | | DumpString = '''// B4 12 战斗阵容预设保存 //tagCSHeroPresetSave:
|
| | | ItemIndex:%d,
|
| | | PosNum:%d
|
| | | '''\
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagCSHeroLineupSave(Structure):
|
| | | class tagCSHeroPresetSave(Structure):
|
| | | Head = tagHead()
|
| | | LineupID = 0 #(BYTE LineupID)//阵容ID:1-主阵容;其他待扩展,如某个防守阵容
|
| | | PresetID = 0 #(BYTE PresetID)//阵容方案预设ID
|
| | | ShapeType = 0 #(BYTE ShapeType)//本阵容阵型,0为默认阵型,可扩展不同的阵型
|
| | | PosCnt = 0 #(BYTE PosCnt)
|
| | | HeroPosList = list() #(vector<tagCSHeroLineupPos> HeroPosList)// 保存的阵容,只发送最终的阵容武将位置即可
|
| | | HeroPosList = list() #(vector<tagCSHeroPresetPos> HeroPosList)// 保存的阵容,只发送最终的阵容武将位置即可
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PosCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PosCnt):
|
| | | temHeroPosList = tagCSHeroLineupPos()
|
| | | temHeroPosList = tagCSHeroPresetPos()
|
| | | _pos = temHeroPosList.ReadData(_lpData, _pos)
|
| | | self.HeroPosList.append(temHeroPosList)
|
| | | return _pos
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x12
|
| | | self.LineupID = 0
|
| | | self.PresetID = 0
|
| | | self.ShapeType = 0
|
| | | self.PosCnt = 0
|
| | | self.HeroPosList = list()
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.LineupID)
|
| | | data = CommFunc.WriteBYTE(data, self.PresetID)
|
| | | data = CommFunc.WriteBYTE(data, self.ShapeType)
|
| | | data = CommFunc.WriteBYTE(data, self.PosCnt)
|
| | | for i in range(self.PosCnt):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | LineupID:%d,
|
| | | PresetID:%d,
|
| | | ShapeType:%d,
|
| | | PosCnt:%d,
|
| | | HeroPosList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.LineupID,
|
| | | self.PresetID,
|
| | | self.ShapeType,
|
| | | self.PosCnt,
|
| | | "..."
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSHeroLineupSave=tagCSHeroLineupSave()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroLineupSave.Head.Cmd,m_NAtagCSHeroLineupSave.Head.SubCmd))] = m_NAtagCSHeroLineupSave
|
| | | m_NAtagCSHeroPresetSave=tagCSHeroPresetSave()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroPresetSave.Head.Cmd,m_NAtagCSHeroPresetSave.Head.SubCmd))] = m_NAtagCSHeroPresetSave
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|