| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 11 打坐信息 #tagMCFamilySitInfo
|
| | |
|
| | | class tagMCFamilySitInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ExpRound", c_ushort), # 已获得经验轮次
|
| | | ("Exp", c_int), # 获得经验求余亿部分
|
| | | ("ExpPoint", c_int), # 获得经验整除亿部分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x11
|
| | | 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 = 0x11
|
| | | self.ExpRound = 0
|
| | | self.Exp = 0
|
| | | self.ExpPoint = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFamilySitInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 11 打坐信息 //tagMCFamilySitInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ExpRound:%d,
|
| | | Exp:%d,
|
| | | ExpPoint:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ExpRound,
|
| | | self.Exp,
|
| | | self.ExpPoint
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFamilySitInfo=tagMCFamilySitInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilySitInfo.Cmd,m_NAtagMCFamilySitInfo.SubCmd))] = m_NAtagMCFamilySitInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 09 仙盟阵法信息 #tagMCFamilyZhenfaInfo
|
| | |
|
| | | class tagMCFamilyZhenfa(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 67 Boss历练活动信息 #tagMCActBossTrialInfo
|
| | |
|
| | | class tagMCActBossTrialItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", 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.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActBossTrialItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 67 Boss历练活动信息 //tagMCActBossTrialInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBossTrialBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActBossTrialItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBossTrialSubmitInfo(Structure):
|
| | | RecordIndex = 0 #(BYTE RecordIndex)// 记录索引
|
| | | NeedCount = 0 #(WORD NeedCount)// 所需提交个数
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.RecordIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActBossTrialItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.RecordIndex = 0
|
| | | self.NeedCount = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.RecordIndex)
|
| | | data = CommFunc.WriteWORD(data, self.NeedCount)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | RecordIndex:%d,
|
| | | NeedCount:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.RecordIndex,
|
| | | self.NeedCount,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBossTrialInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | SubmitCount = 0 #(BYTE SubmitCount)
|
| | | SubmitInfoList = list() #(vector<tagMCActBossTrialSubmitInfo> SubmitInfoList)// 提交凭证信息列表
|
| | | BillardCount = 0 #(BYTE BillardCount)
|
| | | BillboardInfoList = list() #(vector<tagMCActBossTrialBillard> BillboardInfoList)// 榜单信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x67
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.SubmitCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.SubmitCount):
|
| | | temSubmitInfoList = tagMCActBossTrialSubmitInfo()
|
| | | _pos = temSubmitInfoList.ReadData(_lpData, _pos)
|
| | | self.SubmitInfoList.append(temSubmitInfoList)
|
| | | self.BillardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BillardCount):
|
| | | temBillboardInfoList = tagMCActBossTrialBillard()
|
| | | _pos = temBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.BillboardInfoList.append(temBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x67
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.SubmitCount = 0
|
| | | self.SubmitInfoList = list()
|
| | | self.BillardCount = 0
|
| | | self.BillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.SubmitCount):
|
| | | length += self.SubmitInfoList[i].GetLength()
|
| | | length += 1
|
| | | for i in range(self.BillardCount):
|
| | | length += self.BillboardInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteBYTE(data, self.ResetType)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.SubmitCount)
|
| | | for i in range(self.SubmitCount):
|
| | | data = CommFunc.WriteString(data, self.SubmitInfoList[i].GetLength(), self.SubmitInfoList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.BillardCount)
|
| | | for i in range(self.BillardCount):
|
| | | data = CommFunc.WriteString(data, self.BillboardInfoList[i].GetLength(), self.BillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | SubmitCount:%d,
|
| | | SubmitInfoList:%s,
|
| | | BillardCount:%d,
|
| | | BillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.ResetType,
|
| | | self.LimitLV,
|
| | | self.SubmitCount,
|
| | | "...",
|
| | | self.BillardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActBossTrialInfo=tagMCActBossTrialInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBossTrialInfo.Head.Cmd,m_NAtagMCActBossTrialInfo.Head.SubCmd))] = m_NAtagMCActBossTrialInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 68 Boss历练活动玩家信息 #tagMCActBossTrialPlayerInfo
|
| | |
|
| | | class tagMCActBossTrialPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("SubmitCount", c_ushort), # 已提交凭证个数
|
| | | ("SubmitCountAward", c_int), # 提交凭证奖励领奖状态
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x68
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x68
|
| | | self.ActNum = 0
|
| | | self.SubmitCount = 0
|
| | | self.SubmitCountAward = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActBossTrialPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 68 Boss历练活动玩家信息 //tagMCActBossTrialPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | SubmitCount:%d,
|
| | | SubmitCountAward:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.SubmitCount,
|
| | | self.SubmitCountAward
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActBossTrialPlayerInfo=tagMCActBossTrialPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBossTrialPlayerInfo.Cmd,m_NAtagMCActBossTrialPlayerInfo.SubCmd))] = m_NAtagMCActBossTrialPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 65 买一送多活动信息 #tagMCActBuyOneInfo
|
| | |
|
| | | class tagMCActBuyOneInfoFreeItem(Structure):
|
| | |
| | |
|
| | |
|
| | | class tagMCActSingleRechargeAward(Structure):
|
| | | AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31
|
| | | AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引
|
| | | AwardCountMax = 0 #(WORD AwardCountMax)// 最大领奖次数
|
| | | SingleRechargeValue = 0 #(DWORD SingleRechargeValue)// 单笔所需充值额度
|
| | | AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数
|
| | | AwardItem = list() #(vector<tagMCActSingleRechargeAwardItem> AwardItem)// 奖励物品信息
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardCountMax,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.SingleRechargeValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardItemCount):
|
| | |
| | |
|
| | | def Clear(self):
|
| | | self.AwardIndex = 0
|
| | | self.AwardCountMax = 0
|
| | | self.SingleRechargeValue = 0
|
| | | self.AwardItemCount = 0
|
| | | self.AwardItem = list()
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.AwardItemCount):
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.AwardIndex)
|
| | | data = CommFunc.WriteWORD(data, self.AwardCountMax)
|
| | | data = CommFunc.WriteDWORD(data, self.SingleRechargeValue)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardItemCount)
|
| | | for i in range(self.AwardItemCount):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | AwardIndex:%d,
|
| | | AwardCountMax:%d,
|
| | | SingleRechargeValue:%d,
|
| | | AwardItemCount:%d,
|
| | | AwardItem:%s
|
| | | '''\
|
| | | %(
|
| | | self.AwardIndex,
|
| | | self.AwardCountMax,
|
| | | self.SingleRechargeValue,
|
| | | self.AwardItemCount,
|
| | | "..."
|
| | |
| | | #------------------------------------------------------
|
| | | # AA 51 单笔累充活动玩家信息 #tagMCActSingleRechargePlayerInfo
|
| | |
|
| | | class tagMCActSingleRechargePlayerInfo(Structure):
|
| | | class tagMCActSingleRechargePlayerAward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2
|
| | | ("CanAwardValue", c_int), #可否领奖记录,按奖励索引二进制位存储是否可领取
|
| | | ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取
|
| | | ("AwardIndex", c_ubyte), # 奖励索引
|
| | | ("CanGetCount", c_ushort), # 可领奖次数
|
| | | ("GetCount", c_ushort), # 已领奖次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x51
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | |
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x51
|
| | | self.ActNum = 0
|
| | | self.CanAwardValue = 0
|
| | | self.AwardRecord = 0
|
| | | self.AwardIndex = 0
|
| | | self.CanGetCount = 0
|
| | | self.GetCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActSingleRechargePlayerInfo)
|
| | | return sizeof(tagMCActSingleRechargePlayerAward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 51 单笔累充活动玩家信息 //tagMCActSingleRechargePlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | CanAwardValue:%d,
|
| | | AwardRecord:%d
|
| | | AwardIndex:%d,
|
| | | CanGetCount:%d,
|
| | | GetCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AwardIndex,
|
| | | self.CanGetCount,
|
| | | self.GetCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActSingleRechargePlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2
|
| | | RecordCount = 0 #(BYTE RecordCount)
|
| | | AwardRecordList = list() #(vector<tagMCActSingleRechargePlayerAward> AwardRecordList)// 领奖次数记录列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x51
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RecordCount):
|
| | | temAwardRecordList = tagMCActSingleRechargePlayerAward()
|
| | | _pos = temAwardRecordList.ReadData(_lpData, _pos)
|
| | | self.AwardRecordList.append(temAwardRecordList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x51
|
| | | self.ActNum = 0
|
| | | self.RecordCount = 0
|
| | | self.AwardRecordList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.RecordCount):
|
| | | length += self.AwardRecordList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | data = CommFunc.WriteBYTE(data, self.RecordCount)
|
| | | for i in range(self.RecordCount):
|
| | | data = CommFunc.WriteString(data, self.AwardRecordList[i].GetLength(), self.AwardRecordList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | RecordCount:%d,
|
| | | AwardRecordList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.CanAwardValue,
|
| | | self.AwardRecord
|
| | | self.RecordCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActSingleRechargePlayerInfo=tagMCActSingleRechargePlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Cmd,m_NAtagMCActSingleRechargePlayerInfo.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Head.Cmd,m_NAtagMCActSingleRechargePlayerInfo.Head.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B3 30 情缘相关信息 #tagMCLoveInfo
|
| | |
|
| | | class tagMCLoveInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("EatCandyToday", c_int), # 今日已吃喜糖次数,包含免费及付费的所有次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB3
|
| | | self.SubCmd = 0x30
|
| | | 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 = 0xB3
|
| | | self.SubCmd = 0x30
|
| | | self.EatCandyToday = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCLoveInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B3 30 情缘相关信息 //tagMCLoveInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | EatCandyToday:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.EatCandyToday
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCLoveInfo=tagMCLoveInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveInfo.Cmd,m_NAtagMCLoveInfo.SubCmd))] = m_NAtagMCLoveInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B3 27 情戒信息 #tagMCLoveRingInfo
|
| | |
|
| | | class tagMCLoveRingInfo(Structure):
|