| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 02 定军阁效果选择 #tagCSDingjungeEffSelect
|
| | |
|
| | | class tagCSDingjungeEffSelect(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("SelectType", c_ubyte), #0-手动选择,1-放弃本次选择,2-一键选择(仅开启了自动选择时有效)
|
| | | ("SelectIndex", c_ubyte), #手动选择索引 0~n
|
| | | ("ReplaceHole", c_ubyte), #手动选择替换槽位 1~n,槽位=槽索引+1,升级时可直接发0
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xB1
|
| | | self.SubCmd = 0x02
|
| | | self.SelectType = 0
|
| | | self.SelectIndex = 0
|
| | | self.ReplaceHole = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCSDingjungeEffSelect)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 02 定军阁效果选择 //tagCSDingjungeEffSelect:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | SelectType:%d,
|
| | | SelectIndex:%d,
|
| | | ReplaceHole:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.SelectType,
|
| | | self.SelectIndex,
|
| | | self.ReplaceHole
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSDingjungeEffSelect=tagCSDingjungeEffSelect()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSDingjungeEffSelect.Cmd,m_NAtagCSDingjungeEffSelect.SubCmd))] = m_NAtagCSDingjungeEffSelect
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 01 定军阁效果预设 #tagCSDingjungeEffSet
|
| | |
|
| | | class tagCSDingjungeEffSet(Structure):
|
| | | Head = tagHead()
|
| | | SelectAuto = 0 #(BYTE SelectAuto)//是否启用自动选择
|
| | | SelectSetCnt = 0 #(BYTE SelectSetCnt)
|
| | | SelectSetAttrIDList = list() #(vector<WORD> SelectSetAttrIDList)//预设优先选择属性ID列表 [优先级1属性ID, ...]
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.SelectAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SelectSetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.SelectSetCnt):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.SelectSetAttrIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x01
|
| | | self.SelectAuto = 0
|
| | | self.SelectSetCnt = 0
|
| | | self.SelectSetAttrIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2 * self.SelectSetCnt
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.SelectAuto)
|
| | | data = CommFunc.WriteBYTE(data, self.SelectSetCnt)
|
| | | for i in range(self.SelectSetCnt):
|
| | | data = CommFunc.WriteWORD(data, self.SelectSetAttrIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | SelectAuto:%d,
|
| | | SelectSetCnt:%d,
|
| | | SelectSetAttrIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.SelectAuto,
|
| | | self.SelectSetCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSDingjungeEffSet=tagCSDingjungeEffSet()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSDingjungeEffSet.Head.Cmd,m_NAtagCSDingjungeEffSet.Head.SubCmd))] = m_NAtagCSDingjungeEffSet
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 08 快速一键过关副本 #tagCMFBQuickPass
|
| | |
|
| | | class tagCMFBQuickPass(Structure):
|