| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 16 法宝状态记录 #tagCMMagicWeaponState
|
| | |
|
| | | class tagCMMagicWeaponState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MWID", c_int), #法宝ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x16
|
| | | 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 = 0x16
|
| | | self.MWID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMMagicWeaponState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 16 法宝状态记录 //tagCMMagicWeaponState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MWID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MWID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMMagicWeaponState=tagCMMagicWeaponState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMMagicWeaponState.Cmd,m_NAtagCMMagicWeaponState.SubCmd))] = m_NAtagCMMagicWeaponState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 15 提升法宝等级 #tagCMMagicWeaponUp
|
| | |
|
| | | class tagCMMagicWeaponUp(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 06 活动物品兑换 #tagCMExchangeActionItem
|
| | |
|
| | | class tagCMExchangeActionItem(Structure):
|
| | | Head = tagHead()
|
| | | ActionKeyLen = 0 #(BYTE ActionKeyLen)
|
| | | ActionKey = "" #(String ActionKey)
|
| | | ItemID = 0 #(DWORD ItemID)// 兑换的目标物品ID
|
| | | ExcCnt = 0 #(WORD ExcCnt)// 兑换个数,默认1个
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAB
|
| | | self.Head.SubCmd = 0x06
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActionKeyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ActionKey,_pos = CommFunc.ReadString(_lpData, _pos,self.ActionKeyLen)
|
| | | self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ExcCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAB
|
| | | self.Head.SubCmd = 0x06
|
| | | self.ActionKeyLen = 0
|
| | | self.ActionKey = ""
|
| | | self.ItemID = 0
|
| | | self.ExcCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.ActionKey)
|
| | | length += 4
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActionKeyLen)
|
| | | data = CommFunc.WriteString(data, self.ActionKeyLen, self.ActionKey)
|
| | | data = CommFunc.WriteDWORD(data, self.ItemID)
|
| | | data = CommFunc.WriteWORD(data, self.ExcCnt)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActionKeyLen:%d,
|
| | | ActionKey:%s,
|
| | | ItemID:%d,
|
| | | ExcCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActionKeyLen,
|
| | | self.ActionKey,
|
| | | self.ItemID,
|
| | | self.ExcCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMExchangeActionItem=tagCMExchangeActionItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExchangeActionItem.Head.Cmd,m_NAtagCMExchangeActionItem.Head.SubCmd))] = m_NAtagCMExchangeActionItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 07 领取节日登陆奖励 #tagCMGetFestivalLoginAward
|
| | |
|
| | | class tagCMGetFestivalLoginAward(Structure):
|
| | |
| | |
|
| | | m_NAtagCMGetFestivalLoginAward=tagCMGetFestivalLoginAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetFestivalLoginAward.Cmd,m_NAtagCMGetFestivalLoginAward.SubCmd))] = m_NAtagCMGetFestivalLoginAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 02 领取领地争夺战每日奖励 #tagCMGetManorWarDailyAward
|
| | |
|
| | | class tagCMGetManorWarDailyAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MapID", c_int), # 领地id
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x02
|
| | | self.MapID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGetManorWarDailyAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 02 领取领地争夺战每日奖励 //tagCMGetManorWarDailyAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MapID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MapID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGetManorWarDailyAward=tagCMGetManorWarDailyAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetManorWarDailyAward.Cmd,m_NAtagCMGetManorWarDailyAward.SubCmd))] = m_NAtagCMGetManorWarDailyAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 01 领取领地争夺战参与奖 #tagCMGetManorWarJoinAward
|
| | |
|
| | | class tagCMGetManorWarJoinAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAB
|
| | | self.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMGetManorWarJoinAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 01 领取领地争夺战参与奖 //tagCMGetManorWarJoinAward:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMGetManorWarJoinAward=tagCMGetManorWarJoinAward()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetManorWarJoinAward.Cmd,m_NAtagCMGetManorWarJoinAward.SubCmd))] = m_NAtagCMGetManorWarJoinAward
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|