| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 29 累计充值返利仙玉活动信息 #tagMCActRechargeRebateGoldInfo
|
| | |
|
| | | class tagMCActRechargeRebate(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RMBMin", c_int), # 充值RMB最小值
|
| | | ("RMBMax", c_int), # 充值RMB最大值,0代表无上限
|
| | | ("RebateRate", c_ushort), # 返利仙玉比例百分比
|
| | | ]
|
| | |
|
| | | 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.RMBMin = 0
|
| | | self.RMBMax = 0
|
| | | self.RebateRate = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRechargeRebate)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 29 累计充值返利仙玉活动信息 //tagMCActRechargeRebateGoldInfo:
|
| | | RMBMin:%d,
|
| | | RMBMax:%d,
|
| | | RebateRate:%d
|
| | | '''\
|
| | | %(
|
| | | self.RMBMin,
|
| | | self.RMBMax,
|
| | | self.RebateRate
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRechargeRebateDay(Structure):
|
| | | Rebates = 0 #(BYTE Rebates)// 返利档数
|
| | | RebateInfo = list() #(vector<tagMCActRechargeRebate> RebateInfo)// 返利档信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rebates,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Rebates):
|
| | | temRebateInfo = tagMCActRechargeRebate()
|
| | | _pos = temRebateInfo.ReadData(_lpData, _pos)
|
| | | self.RebateInfo.append(temRebateInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rebates = 0
|
| | | self.RebateInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | for i in range(self.Rebates):
|
| | | length += self.RebateInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.Rebates)
|
| | | for i in range(self.Rebates):
|
| | | data = CommFunc.WriteString(data, self.RebateInfo[i].GetLength(), self.RebateInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rebates:%d,
|
| | | RebateInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rebates,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRechargeRebateGoldInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
|
| | | RebateDays = 0 #(BYTE RebateDays)
|
| | | RebateDayInfo = list() #(vector<tagMCActRechargeRebateDay> RebateDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x29
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RebateDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RebateDays):
|
| | | temRebateDayInfo = tagMCActRechargeRebateDay()
|
| | | _pos = temRebateDayInfo.ReadData(_lpData, _pos)
|
| | | self.RebateDayInfo.append(temRebateDayInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x29
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.IsDayReset = 0
|
| | | self.RebateDays = 0
|
| | | self.RebateDayInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.RebateDays):
|
| | | length += self.RebateDayInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteBYTE(data, self.RebateDays)
|
| | | for i in range(self.RebateDays):
|
| | | data = CommFunc.WriteString(data, self.RebateDayInfo[i].GetLength(), self.RebateDayInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | IsDayReset:%d,
|
| | | RebateDays:%d,
|
| | | RebateDayInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.IsDayReset,
|
| | | self.RebateDays,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRechargeRebateGoldInfo=tagMCActRechargeRebateGoldInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargeRebateGoldInfo.Head.Cmd,m_NAtagMCActRechargeRebateGoldInfo.Head.SubCmd))] = m_NAtagMCActRechargeRebateGoldInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 1D 累计充值活动信息 #tagMCActTotalRechargeInfo
|
| | |
|
| | | class tagMCTotalRechargeAwardItem(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 30 累计充值返利仙玉玩家活动信息 #tagMCRechargeRebateGoldPlayerInfo
|
| | |
|
| | | class tagMCRechargeRebateGoldPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RechargeRMBTotal", c_int), # 活动已累计充值RMB
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x30
|
| | | self.RechargeRMBTotal = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCRechargeRebateGoldPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 30 累计充值返利仙玉玩家活动信息 //tagMCRechargeRebateGoldPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | RechargeRMBTotal:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.RechargeRMBTotal
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCRechargeRebateGoldPlayerInfo=tagMCRechargeRebateGoldPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRebateGoldPlayerInfo.Cmd,m_NAtagMCRechargeRebateGoldPlayerInfo.SubCmd))] = m_NAtagMCRechargeRebateGoldPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 11 限时特惠活动信息 #tagMCSpringSaleInfo
|
| | |
|
| | | class tagMCSpringSaleItem(Structure):
|