| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 BD 通知玩家购买副本进入次数 #tagMCBuyEnterInfo
|
| | |
|
| | | class tagMCBuyInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("FBID", c_int), # 副本ID
|
| | | ("BuyCount", c_ubyte), # 已购买次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.FBID = 0
|
| | | self.BuyCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCBuyInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 BD 通知玩家购买副本进入次数 //tagMCBuyEnterInfo:
|
| | | FBID:%d,
|
| | | BuyCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.FBID,
|
| | | self.BuyCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCBuyEnterInfo(Structure):
|
| | | Head = tagHead()
|
| | | FBCount = 0 #(BYTE FBCount)// 副本个数
|
| | | FBInfo = list() #(vector<tagMCBuyInfo> FBInfo)// 副本信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xBD
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FBCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FBCount):
|
| | | temFBInfo = tagMCBuyInfo()
|
| | | _pos = temFBInfo.ReadData(_lpData, _pos)
|
| | | self.FBInfo.append(temFBInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xBD
|
| | | self.FBCount = 0
|
| | | self.FBInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.FBCount):
|
| | | length += self.FBInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.FBCount)
|
| | | for i in range(self.FBCount):
|
| | | data = CommFunc.WriteString(data, self.FBInfo[i].GetLength(), self.FBInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FBCount:%d,
|
| | | FBInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FBCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCBuyEnterInfo=tagMCBuyEnterInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBuyEnterInfo.Head.Cmd,m_NAtagMCBuyEnterInfo.Head.SubCmd))] = m_NAtagMCBuyEnterInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 B0 玩家购买魔魂铜钱经验额外奖励信息 #tagMCBuySomethingReward
|
| | |
|
| | | class tagMCBuySomethingReward(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 0A 副本鼓舞信息通知 #tagMCFBEncourageInfo
|
| | | # A3 20 玩家副本相关信息 #tagSCFBInfoList
|
| | |
|
| | | class tagMCFBEncourageCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("MoneyType", c_ubyte), # 金钱类型
|
| | | ("EncourageCnt", c_ubyte), # 当前鼓舞次数
|
| | | ]
|
| | | class tagSCFBInfo(Structure):
|
| | | MapID = 0 #(DWORD MapID)
|
| | | EnterCnt = 0 #(WORD EnterCnt)//今日累计进入次数
|
| | | ADAddCnt = 0 #(BYTE ADAddCnt)//广告增加次数
|
| | | BuyAddCnt = 0 #(BYTE BuyAddCnt)//购买增加次数
|
| | | ItemAddCnt = 0 #(WORD ItemAddCnt)//物品增加次数
|
| | | PassLineID = 0 #(DWORD PassLineID)//已过关到的lineID
|
| | | PassGradeCnt = 0 #(BYTE PassGradeCnt)//星级值对应个数, 每个key存9个lineID
|
| | | PassGrade = list() #(vector<DWORD> PassGrade)//副本线路对应星级值列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EnterCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ADAddCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.BuyAddCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemAddCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PassLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PassGradeCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PassGradeCnt):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.PassGrade.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.MoneyType = 0
|
| | | self.EncourageCnt = 0
|
| | | self.MapID = 0
|
| | | self.EnterCnt = 0
|
| | | self.ADAddCnt = 0
|
| | | self.BuyAddCnt = 0
|
| | | self.ItemAddCnt = 0
|
| | | self.PassLineID = 0
|
| | | self.PassGradeCnt = 0
|
| | | self.PassGrade = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFBEncourageCnt)
|
| | | length = 0
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4 * self.PassGradeCnt
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteWORD(data, self.EnterCnt)
|
| | | data = CommFunc.WriteBYTE(data, self.ADAddCnt)
|
| | | data = CommFunc.WriteBYTE(data, self.BuyAddCnt)
|
| | | data = CommFunc.WriteWORD(data, self.ItemAddCnt)
|
| | | data = CommFunc.WriteDWORD(data, self.PassLineID)
|
| | | data = CommFunc.WriteBYTE(data, self.PassGradeCnt)
|
| | | for i in range(self.PassGradeCnt):
|
| | | data = CommFunc.WriteDWORD(data, self.PassGrade[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A3 0A 副本鼓舞信息通知 //tagMCFBEncourageInfo:
|
| | | MoneyType:%d,
|
| | | EncourageCnt:%d
|
| | | DumpString = '''
|
| | | MapID:%d,
|
| | | EnterCnt:%d,
|
| | | ADAddCnt:%d,
|
| | | BuyAddCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | PassLineID:%d,
|
| | | PassGradeCnt:%d,
|
| | | PassGrade:%s
|
| | | '''\
|
| | | %(
|
| | | self.MoneyType,
|
| | | self.EncourageCnt
|
| | | self.MapID,
|
| | | self.EnterCnt,
|
| | | self.ADAddCnt,
|
| | | self.BuyAddCnt,
|
| | | self.ItemAddCnt,
|
| | | self.PassLineID,
|
| | | self.PassGradeCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFBEncourageInfo(Structure):
|
| | | class tagSCFBInfoList(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)// |
| | | InfoList = list() #(vector<tagMCFBEncourageCnt> InfoList)// 次数信息
|
| | | FBDataCnt = 0 #(BYTE FBDataCnt)// 副本数据个数
|
| | | FBDataList = list() #(vector<tagSCFBInfo> FBDataList)// 副本数据列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x0A
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | temInfoList = tagMCFBEncourageCnt()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | self.FBDataCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FBDataCnt):
|
| | | temFBDataList = tagSCFBInfo()
|
| | | _pos = temFBDataList.ReadData(_lpData, _pos)
|
| | | self.FBDataList.append(temFBDataList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x0A
|
| | | self.Cnt = 0
|
| | | self.InfoList = list()
|
| | | self.Head.SubCmd = 0x20
|
| | | self.FBDataCnt = 0
|
| | | self.FBDataList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | length += self.InfoList[i].GetLength()
|
| | | for i in range(self.FBDataCnt):
|
| | | length += self.FBDataList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.FBDataCnt)
|
| | | for i in range(self.FBDataCnt):
|
| | | data = CommFunc.WriteString(data, self.FBDataList[i].GetLength(), self.FBDataList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | InfoList:%s
|
| | | FBDataCnt:%d,
|
| | | FBDataList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | self.FBDataCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFBEncourageInfo=tagMCFBEncourageInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Head.Cmd,m_NAtagMCFBEncourageInfo.Head.SubCmd))] = m_NAtagMCFBEncourageInfo
|
| | | m_NAtagSCFBInfoList=tagSCFBInfoList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFBInfoList.Head.Cmd,m_NAtagSCFBInfoList.Head.SubCmd))] = m_NAtagSCFBInfoList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 20 玩家副本相关信息 #tagMCPlayerFBInfoData
|
| | |
|
| | | class tagMCFBInfo(Structure):
|
| | | FBID = 0 #(DWORD FBID)//fbId
|
| | | EnterCnt = 0 #(WORD EnterCnt)//当日进入次数
|
| | | RecoverCnt = 0 #(WORD RecoverCnt)//找回次数
|
| | | ItemAddCnt = 0 #(WORD ItemAddCnt)//物品增加次数
|
| | | PassGradeCnt = 0 #(BYTE PassGradeCnt)//星级值对应个数, 每个key存9个lineID
|
| | | PassGrade = list() #(vector<DWORD> PassGrade)//副本线路对应星级值列表
|
| | | EnterCntTotal = 0 #(DWORD EnterCntTotal)//累计进入次数
|
| | | PassLineID = 0 #(DWORD PassLineID)//已过关到的lineID
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.FBID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EnterCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RecoverCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ItemAddCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PassGradeCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PassGradeCnt):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.PassGrade.append(value)
|
| | | self.EnterCntTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PassLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.FBID = 0
|
| | | self.EnterCnt = 0
|
| | | self.RecoverCnt = 0
|
| | | self.ItemAddCnt = 0
|
| | | self.PassGradeCnt = 0
|
| | | self.PassGrade = list()
|
| | | self.EnterCntTotal = 0
|
| | | self.PassLineID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 2
|
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.PassGradeCnt
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.FBID)
|
| | | data = CommFunc.WriteWORD(data, self.EnterCnt)
|
| | | data = CommFunc.WriteWORD(data, self.RecoverCnt)
|
| | | data = CommFunc.WriteWORD(data, self.ItemAddCnt)
|
| | | data = CommFunc.WriteBYTE(data, self.PassGradeCnt)
|
| | | for i in range(self.PassGradeCnt):
|
| | | data = CommFunc.WriteDWORD(data, self.PassGrade[i])
|
| | | data = CommFunc.WriteDWORD(data, self.EnterCntTotal)
|
| | | data = CommFunc.WriteDWORD(data, self.PassLineID)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | FBID:%d,
|
| | | EnterCnt:%d,
|
| | | RecoverCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | PassGradeCnt:%d,
|
| | | PassGrade:%s,
|
| | | EnterCntTotal:%d,
|
| | | PassLineID:%d
|
| | | '''\
|
| | | %(
|
| | | self.FBID,
|
| | | self.EnterCnt,
|
| | | self.RecoverCnt,
|
| | | self.ItemAddCnt,
|
| | | self.PassGradeCnt,
|
| | | "...",
|
| | | self.EnterCntTotal,
|
| | | self.PassLineID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCPlayerFBInfoData(Structure):
|
| | | Head = tagHead()
|
| | | FBDataCnt = 0 #(BYTE FBDataCnt)// 副本数据个数
|
| | | FBDataList = list() #(vector<tagMCFBInfo> FBDataList)// 副本数据列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FBDataCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FBDataCnt):
|
| | | temFBDataList = tagMCFBInfo()
|
| | | _pos = temFBDataList.ReadData(_lpData, _pos)
|
| | | self.FBDataList.append(temFBDataList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x20
|
| | | self.FBDataCnt = 0
|
| | | self.FBDataList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.FBDataCnt):
|
| | | length += self.FBDataList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.FBDataCnt)
|
| | | for i in range(self.FBDataCnt):
|
| | | data = CommFunc.WriteString(data, self.FBDataList[i].GetLength(), self.FBDataList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FBDataCnt:%d,
|
| | | FBDataList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FBDataCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCPlayerFBInfoData=tagMCPlayerFBInfoData()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerFBInfoData.Head.Cmd,m_NAtagMCPlayerFBInfoData.Head.SubCmd))] = m_NAtagMCPlayerFBInfoData
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 0B 玩家等级奖励领取记录信息 #tagMCPlayerLVAwardGetRecord
|
| | |
|
| | | class tagMCPlayerLVAwardGetRecord(Structure):
|
| | |
| | |
|
| | | m_NAtagMCRealmExpInfo=tagMCRealmExpInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRealmExpInfo.Cmd,m_NAtagMCRealmExpInfo.SubCmd))] = m_NAtagMCRealmExpInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 49 资源找回次数 #tagMCRecoverNum
|
| | |
|
| | | class tagMCRecoverNumInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Index", c_ubyte), # 找回项索引
|
| | | ("RecoverCnt", c_ubyte), # 可找回次数
|
| | | ("ExtraCnt", c_ubyte), # VIP额外次数
|
| | | ("ExtraData", c_ubyte), # 额外参数1
|
| | | ("ExtraData2", c_ubyte), # 额外参数2
|
| | | ("HaveRecover", c_ubyte), # 已找回 1-全部已找回 2-非VIP已找回
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.Index = 0
|
| | | self.RecoverCnt = 0
|
| | | self.ExtraCnt = 0
|
| | | self.ExtraData = 0
|
| | | self.ExtraData2 = 0
|
| | | self.HaveRecover = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCRecoverNumInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 49 资源找回次数 //tagMCRecoverNum:
|
| | | Index:%d,
|
| | | RecoverCnt:%d,
|
| | | ExtraCnt:%d,
|
| | | ExtraData:%d,
|
| | | ExtraData2:%d,
|
| | | HaveRecover:%d
|
| | | '''\
|
| | | %(
|
| | | self.Index,
|
| | | self.RecoverCnt,
|
| | | self.ExtraCnt,
|
| | | self.ExtraData,
|
| | | self.ExtraData2,
|
| | | self.HaveRecover
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCRecoverNum(Structure):
|
| | | Head = tagHead()
|
| | | Num = 0 #(BYTE Num)// 找回信息数
|
| | | NumInfo = list() #(vector<tagMCRecoverNumInfo> NumInfo)// 找回信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x49
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Num,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Num):
|
| | | temNumInfo = tagMCRecoverNumInfo()
|
| | | _pos = temNumInfo.ReadData(_lpData, _pos)
|
| | | self.NumInfo.append(temNumInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x49
|
| | | self.Num = 0
|
| | | self.NumInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Num):
|
| | | length += self.NumInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Num)
|
| | | for i in range(self.Num):
|
| | | data = CommFunc.WriteString(data, self.NumInfo[i].GetLength(), self.NumInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Num:%d,
|
| | | NumInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Num,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCRecoverNum=tagMCRecoverNum()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRecoverNum.Head.Cmd,m_NAtagMCRecoverNum.Head.SubCmd))] = m_NAtagMCRecoverNum
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 22 广告信息列表 #tagSCADInfoList
|
| | |
|
| | | class tagSCADInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ADID", c_ushort), #广告ID
|
| | | ("ADCnt", c_ubyte), #今日已领取广告奖励次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.ADID = 0
|
| | | self.ADCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCADInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A7 22 广告信息列表 //tagSCADInfoList:
|
| | | ADID:%d,
|
| | | ADCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.ADID,
|
| | | self.ADCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCADInfoList(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | ADInfoList = list() #(vector<tagSCADInfo> ADInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x22
|
| | | 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):
|
| | | temADInfoList = tagSCADInfo()
|
| | | _pos = temADInfoList.ReadData(_lpData, _pos)
|
| | | self.ADInfoList.append(temADInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x22
|
| | | self.Count = 0
|
| | | self.ADInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.ADInfoList[i].GetLength()
|
| | |
|
| | | 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.WriteString(data, self.ADInfoList[i].GetLength(), self.ADInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ADInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCADInfoList=tagSCADInfoList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCADInfoList.Head.Cmd,m_NAtagSCADInfoList.Head.SubCmd))] = m_NAtagSCADInfoList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 04 通知世界Boss伤血列表 #tagMCBossHurtList
|
| | |
|
| | | class tagMCHurtPlayer(Structure):
|
| | |
| | |
|
| | | m_NAtagMCEmojiPackInfo=tagMCEmojiPackInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEmojiPackInfo.Head.Cmd,m_NAtagMCEmojiPackInfo.Head.SubCmd))] = m_NAtagMCEmojiPackInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 03 通知进入副本时间 #tagMCFBEnterTickList
|
| | |
|
| | | class tagMCFBEnterTick(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("MapID", c_int), # 副本地图id
|
| | | ("LastEnterTick", c_int), # 上次进入副本时间
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.MapID = 0
|
| | | self.LastEnterTick = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFBEnterTick)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A7 03 通知进入副本时间 //tagMCFBEnterTickList:
|
| | | MapID:%d,
|
| | | LastEnterTick:%d
|
| | | '''\
|
| | | %(
|
| | | self.MapID,
|
| | | self.LastEnterTick
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFBEnterTickList(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)// 信息个数
|
| | | EnterTickList = list() #(vector<tagMCFBEnterTick> EnterTickList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x03
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | temEnterTickList = tagMCFBEnterTick()
|
| | | _pos = temEnterTickList.ReadData(_lpData, _pos)
|
| | | self.EnterTickList.append(temEnterTickList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x03
|
| | | self.Cnt = 0
|
| | | self.EnterTickList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | length += self.EnterTickList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteString(data, self.EnterTickList[i].GetLength(), self.EnterTickList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | EnterTickList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFBEnterTickList=tagMCFBEnterTickList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEnterTickList.Head.Cmd,m_NAtagMCFBEnterTickList.Head.SubCmd))] = m_NAtagMCFBEnterTickList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagMCGiveAwardInfo=tagMCGiveAwardInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGiveAwardInfo.Head.Cmd,m_NAtagMCGiveAwardInfo.Head.SubCmd))] = m_NAtagMCGiveAwardInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 12 守护成功拾取物品 #tagMCGuradPickupItemSucc
|
| | |
|
| | | class tagMCGuradPickupItemSucc(Structure):
|
| | | Head = tagHead()
|
| | | ItemCount = 0 #(WORD ItemCount)
|
| | | MapItemID = list() #(vector<WORD> MapItemID)//size = ItemCount
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x12
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.ItemCount):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.MapItemID.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x12
|
| | | self.ItemCount = 0
|
| | | self.MapItemID = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | length += 2 * self.ItemCount
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.ItemCount)
|
| | | for i in range(self.ItemCount):
|
| | | data = CommFunc.WriteWORD(data, self.MapItemID[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ItemCount:%d,
|
| | | MapItemID:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGuradPickupItemSucc=tagMCGuradPickupItemSucc()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGuradPickupItemSucc.Head.Cmd,m_NAtagMCGuradPickupItemSucc.Head.SubCmd))] = m_NAtagMCGuradPickupItemSucc
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 02 首充信息 #tagMCFirstGoldInfo
|
| | | # AA 02 首充信息 #tagSCFirstChargeInfo
|
| | |
|
| | | class tagMCFirstGoldInfo(Structure):
|
| | | class tagSCFirstCharge(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("FirstGoldRewardState", c_ubyte), #首充奖励领奖记录,按位记录首充第X天是否已领取,第1天为第0索引位
|
| | | ("FirstGoldTry", c_ubyte), #首充试用状态0-不可试用 1-可试用 2-已试用
|
| | | ("FirstGoldServerDay", c_ushort), #首充时是开服第几天,从1开始,0代表未记录充值
|
| | | ("FirstID", c_ubyte), #首充ID
|
| | | ("ChargeTime", c_int), #充值该首充的时间戳
|
| | | ("AwardRecord", c_ushort), #首充奖励领奖记录,按二进制位记录首充第X天是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | |
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x02
|
| | | self.FirstGoldRewardState = 0
|
| | | self.FirstGoldTry = 0
|
| | | self.FirstGoldServerDay = 0
|
| | | self.FirstID = 0
|
| | | self.ChargeTime = 0
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFirstGoldInfo)
|
| | | return sizeof(tagSCFirstCharge)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 02 首充信息 //tagMCFirstGoldInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | FirstGoldRewardState:%d,
|
| | | FirstGoldTry:%d,
|
| | | FirstGoldServerDay:%d
|
| | | DumpString = '''// AA 02 首充信息 //tagSCFirstChargeInfo:
|
| | | FirstID:%d,
|
| | | ChargeTime:%d,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.FirstGoldRewardState,
|
| | | self.FirstGoldTry,
|
| | | self.FirstGoldServerDay
|
| | | self.FirstID,
|
| | | self.ChargeTime,
|
| | | self.AwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFirstGoldInfo=tagMCFirstGoldInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFirstGoldInfo.Cmd,m_NAtagMCFirstGoldInfo.SubCmd))] = m_NAtagMCFirstGoldInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 08 首充提示剩余时间 #tagMCFirstGoldTime
|
| | |
|
| | | class tagMCFirstGoldTime(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("FirstGoldRemainTime", c_int), #首充提示剩余时间
|
| | | ]
|
| | | class tagSCFirstChargeInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | FirstChargeList = list() #(vector<tagSCFirstCharge> FirstChargeList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x08
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temFirstChargeList = tagSCFirstCharge()
|
| | | _pos = temFirstChargeList.ReadData(_lpData, _pos)
|
| | | self.FirstChargeList.append(temFirstChargeList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x08
|
| | | self.FirstGoldRemainTime = 0
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x02
|
| | | self.Count = 0
|
| | | self.FirstChargeList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFirstGoldTime)
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.FirstChargeList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | | 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.WriteString(data, self.FirstChargeList[i].GetLength(), self.FirstChargeList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 08 首充提示剩余时间 //tagMCFirstGoldTime:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | FirstGoldRemainTime:%d
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | FirstChargeList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.FirstGoldRemainTime
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFirstGoldTime=tagMCFirstGoldTime()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFirstGoldTime.Cmd,m_NAtagMCFirstGoldTime.SubCmd))] = m_NAtagMCFirstGoldTime
|
| | | m_NAtagSCFirstChargeInfo=tagSCFirstChargeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFirstChargeInfo.Head.Cmd,m_NAtagSCFirstChargeInfo.Head.SubCmd))] = m_NAtagSCFirstChargeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 08 获得仙缘币信息 #tagMCAddXianyuanCoinMsg
|
| | | # B2 01 天子考验信息 #tagSCTianziKYInfo
|
| | |
|
| | | class tagMCAddXianyuanCoinMsg(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)
|
| | | FuncLineID = 0 #(BYTE FuncLineID)
|
| | | Relation = 0 #(BYTE Relation)// 当时的关系:0-无,1-好友,2-盟友
|
| | | RelationCoinAdd = 0 #(BYTE RelationCoinAdd)// 社交关系总加成
|
| | | XianyuanCoinAdd = 0 #(WORD XianyuanCoinAdd)// 实际增加的仙缘币
|
| | | Reason = 0 #(BYTE Reason)//仙缘币为0时的原因:1-助战次数上限;2-每日获得上限
|
| | | CallPlayerID = 0 #(DWORD CallPlayerID)// 助战的玩家ID,有值时代表真实助战,没有值时为自己打的
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | CallPlayerName = "" #(String CallPlayerName)// 助战的玩家名,size = NameLen
|
| | | IsSweep = 0 #(BYTE IsSweep)// 是否扫荡
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x08
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncLineID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Relation,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RelationCoinAdd,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.XianyuanCoinAdd,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Reason,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CallPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CallPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.IsSweep,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x08
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.Relation = 0
|
| | | self.RelationCoinAdd = 0
|
| | | self.XianyuanCoinAdd = 0
|
| | | self.Reason = 0
|
| | | self.CallPlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.CallPlayerName = ""
|
| | | self.IsSweep = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.CallPlayerName)
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteBYTE(data, self.FuncLineID)
|
| | | data = CommFunc.WriteBYTE(data, self.Relation)
|
| | | data = CommFunc.WriteBYTE(data, self.RelationCoinAdd)
|
| | | data = CommFunc.WriteWORD(data, self.XianyuanCoinAdd)
|
| | | data = CommFunc.WriteBYTE(data, self.Reason)
|
| | | data = CommFunc.WriteDWORD(data, self.CallPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.CallPlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.IsSweep)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | Relation:%d,
|
| | | RelationCoinAdd:%d,
|
| | | XianyuanCoinAdd:%d,
|
| | | Reason:%d,
|
| | | CallPlayerID:%d,
|
| | | NameLen:%d,
|
| | | CallPlayerName:%s,
|
| | | IsSweep:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.Relation,
|
| | | self.RelationCoinAdd,
|
| | | self.XianyuanCoinAdd,
|
| | | self.Reason,
|
| | | self.CallPlayerID,
|
| | | self.NameLen,
|
| | | self.CallPlayerName,
|
| | | self.IsSweep
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCAddXianyuanCoinMsg=tagMCAddXianyuanCoinMsg()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAddXianyuanCoinMsg.Head.Cmd,m_NAtagMCAddXianyuanCoinMsg.Head.SubCmd))] = m_NAtagMCAddXianyuanCoinMsg
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 15 副本买buff信息通知 #tagMCFBBuyBuffInfo
|
| | |
|
| | | class tagMCFBBuyBuffTime(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("MapID", c_int), |
| | | ("MoneyCnt", c_ushort), |
| | | ("BuyTime", c_int), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.MapID = 0
|
| | | self.MoneyCnt = 0
|
| | | self.BuyTime = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFBBuyBuffTime)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 15 副本买buff信息通知 //tagMCFBBuyBuffInfo:
|
| | | MapID:%d,
|
| | | MoneyCnt:%d,
|
| | | BuyTime:%d
|
| | | '''\
|
| | | %(
|
| | | self.MapID,
|
| | | self.MoneyCnt,
|
| | | self.BuyTime
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFBBuyBuffInfo(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)
|
| | | InfoList = list() #(vector<tagMCFBBuyBuffTime> InfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x15
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | temInfoList = tagMCFBBuyBuffTime()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x15
|
| | | self.Cnt = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFBBuyBuffInfo=tagMCFBBuyBuffInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBBuyBuffInfo.Head.Cmd,m_NAtagMCFBBuyBuffInfo.Head.SubCmd))] = m_NAtagMCFBBuyBuffInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 09 副本次数恢复剩余时间 #tagMCFBCntRegainRemainTime
|
| | |
|
| | | class tagMCFBCntRegain(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("DataMapID", c_int), # 地图ID
|
| | | ("RemainTime", c_int), # 剩余时间秒
|
| | | ("RegainCnt", c_ubyte), # 今日已恢复次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.DataMapID = 0
|
| | | self.RemainTime = 0
|
| | | self.RegainCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFBCntRegain)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 09 副本次数恢复剩余时间 //tagMCFBCntRegainRemainTime:
|
| | | DataMapID:%d,
|
| | | RemainTime:%d,
|
| | | RegainCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.DataMapID,
|
| | | self.RemainTime,
|
| | | self.RegainCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFBCntRegainRemainTime(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)// 信息数
|
| | | InfoList = list() #(vector<tagMCFBCntRegain> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | temInfoList = tagMCFBCntRegain()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x09
|
| | | self.Cnt = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFBCntRegainRemainTime=tagMCFBCntRegainRemainTime()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBCntRegainRemainTime.Head.Cmd,m_NAtagMCFBCntRegainRemainTime.Head.SubCmd))] = m_NAtagMCFBCntRegainRemainTime
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 01 通知封魔坛双倍击杀状态 #tagMCFMTDoubleState
|
| | |
|
| | | class tagMCFMTDoubleState(Structure):
|
| | | class tagSCTianziKYInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsDouble", c_ubyte), #是否双倍
|
| | | ("OldDouble", c_ubyte), #是否曾经允许双倍
|
| | | ("LineID", c_ubyte), #今日是哪个lineID,对应副本表的功能线路ID
|
| | | ("HistoryHurt", c_int), #本考验历史最大伤害,求余亿部分
|
| | | ("HistoryHurtEx", c_int), #本考验历史最大伤害,整除亿部分
|
| | | ("TodayHurt", c_int), #本考验今日最大伤害,求余亿部分
|
| | | ("TodayHurtEx", c_int), #本考验今日最大伤害,整除亿部分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x01
|
| | | self.IsDouble = 0
|
| | | self.OldDouble = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFMTDoubleState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 01 通知封魔坛双倍击杀状态 //tagMCFMTDoubleState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsDouble:%d,
|
| | | OldDouble:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsDouble,
|
| | | self.OldDouble
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFMTDoubleState=tagMCFMTDoubleState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFMTDoubleState.Cmd,m_NAtagMCFMTDoubleState.SubCmd))] = m_NAtagMCFMTDoubleState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 03 公共副本扫荡信息 #tagMCPubFBSweepData
|
| | |
|
| | | class tagMCPubFBSweep(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PubNum", c_ubyte), # 公共组编号
|
| | | ("FBMapID", c_int), # 当前扫荡的副本地图ID
|
| | | ("LineID", c_ushort), # lineID
|
| | | ("SweepTime", c_int), # 开始扫荡的时间
|
| | | ("SweepCnt", c_ubyte), # 扫荡次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x03
|
| | | 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 = 0x03
|
| | | self.PubNum = 0
|
| | | self.FBMapID = 0
|
| | | self.LineID = 0
|
| | | self.SweepTime = 0
|
| | | self.SweepCnt = 0
|
| | | self.HistoryHurt = 0
|
| | | self.HistoryHurtEx = 0
|
| | | self.TodayHurt = 0
|
| | | self.TodayHurtEx = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCPubFBSweep)
|
| | | return sizeof(tagSCTianziKYInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 03 公共副本扫荡信息 //tagMCPubFBSweepData:
|
| | | DumpString = '''// B2 01 天子考验信息 //tagSCTianziKYInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | PubNum:%d,
|
| | | FBMapID:%d,
|
| | | LineID:%d,
|
| | | SweepTime:%d,
|
| | | SweepCnt:%d
|
| | | HistoryHurt:%d,
|
| | | HistoryHurtEx:%d,
|
| | | TodayHurt:%d,
|
| | | TodayHurtEx:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.PubNum,
|
| | | self.FBMapID,
|
| | | self.LineID,
|
| | | self.SweepTime,
|
| | | self.SweepCnt
|
| | | self.HistoryHurt,
|
| | | self.HistoryHurtEx,
|
| | | self.TodayHurt,
|
| | | self.TodayHurtEx
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCPubFBSweepData(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)// 信息数
|
| | | SweepDatList = list() #(vector<tagMCPubFBSweep> SweepDatList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x03
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | temSweepDatList = tagMCPubFBSweep()
|
| | | _pos = temSweepDatList.ReadData(_lpData, _pos)
|
| | | self.SweepDatList.append(temSweepDatList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x03
|
| | | self.Cnt = 0
|
| | | self.SweepDatList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | length += self.SweepDatList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteString(data, self.SweepDatList[i].GetLength(), self.SweepDatList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | SweepDatList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCPubFBSweepData=tagMCPubFBSweepData()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPubFBSweepData.Head.Cmd,m_NAtagMCPubFBSweepData.Head.SubCmd))] = m_NAtagMCPubFBSweepData
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 16 开始自定义场景结果 #tagMCStartCustomSceneResult
|
| | |
|
| | | class tagMCStartCustomSceneResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MapID", c_int), |
| | | ("FuncLineID", c_ushort), |
| | | ("Result", c_ubyte), #是否允许
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x16
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.Result = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCStartCustomSceneResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 16 开始自定义场景结果 //tagMCStartCustomSceneResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | Result:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.Result
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCStartCustomSceneResult=tagMCStartCustomSceneResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartCustomSceneResult.Cmd,m_NAtagMCStartCustomSceneResult.SubCmd))] = m_NAtagMCStartCustomSceneResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
|
| | |
|
| | | class tagMCPushNotificationsSetting(Structure):
|
| | | Head = tagHead()
|
| | | OnoffBit = 0 #(DWORD OnoffBit)// 按位约定开关
|
| | | TimeLen = 0 #(BYTE TimeLen)
|
| | | TimeStr = "" #(String TimeStr)// 时间字符串 01:02-05:00
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.OnoffBit,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TimeLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TimeStr,_pos = CommFunc.ReadString(_lpData, _pos,self.TimeLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x02
|
| | | self.OnoffBit = 0
|
| | | self.TimeLen = 0
|
| | | self.TimeStr = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.TimeStr)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.OnoffBit)
|
| | | data = CommFunc.WriteBYTE(data, self.TimeLen)
|
| | | data = CommFunc.WriteString(data, self.TimeLen, self.TimeStr)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | OnoffBit:%d,
|
| | | TimeLen:%d,
|
| | | TimeStr:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.OnoffBit,
|
| | | self.TimeLen,
|
| | | self.TimeStr
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCPushNotificationsSetting=tagMCPushNotificationsSetting()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPushNotificationsSetting.Head.Cmd,m_NAtagMCPushNotificationsSetting.Head.SubCmd))] = m_NAtagMCPushNotificationsSetting
|
| | | m_NAtagSCTianziKYInfo=tagSCTianziKYInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTianziKYInfo.Cmd,m_NAtagSCTianziKYInfo.SubCmd))] = m_NAtagSCTianziKYInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|