| | |
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | GroupCount = 0 #(BYTE GroupCount)// 循环购买礼包组数
|
| | | GroupList = list() #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
|
| | | data = None
|
| | |
| | | _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.GroupCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GroupCount):
|
| | | temGroupList = tagMCActGrowupBuyGroup()
|
| | |
| | | self.Head.SubCmd = 0x31
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.GroupCount = 0
|
| | | self.GroupList = list()
|
| | | return
|
| | |
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.GroupCount):
|
| | | length += self.GroupList[i].GetLength()
|
| | |
| | | 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.GroupCount)
|
| | | for i in range(self.GroupCount):
|
| | | data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
|
| | |
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | GroupCount:%d,
|
| | | GroupList:%s
|
| | | '''\
|
| | |
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.GroupCount,
|
| | | "..."
|
| | | )
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 48 多日连充活动信息 #tagMCActManyDayRechargeInfo
|
| | |
|
| | | class tagMCActManyDayRechargeItem(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(tagMCActManyDayRechargeItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 48 多日连充活动信息 //tagMCActManyDayRechargeInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActManyDayRechargeAward(Structure):
|
| | | AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31
|
| | | NeedRecharge = 0 #(DWORD NeedRecharge)// 单天所需充值额度
|
| | | NeedDays = 0 #(BYTE NeedDays)// 所需充值天数
|
| | | AwardItemCount = 0 #(BYTE AwardItemCount)
|
| | | AwardItemList = list() #(vector<tagMCActManyDayRechargeItem> AwardItemList)// 奖励物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedRecharge,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NeedDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardItemCount):
|
| | | temAwardItemList = tagMCActManyDayRechargeItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.AwardIndex = 0
|
| | | self.NeedRecharge = 0
|
| | | self.NeedDays = 0
|
| | | self.AwardItemCount = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.AwardItemCount):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.AwardIndex)
|
| | | data = CommFunc.WriteDWORD(data, self.NeedRecharge)
|
| | | data = CommFunc.WriteBYTE(data, self.NeedDays)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardItemCount)
|
| | | for i in range(self.AwardItemCount):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | AwardIndex:%d,
|
| | | NeedRecharge:%d,
|
| | | NeedDays:%d,
|
| | | AwardItemCount:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.AwardIndex,
|
| | | self.NeedRecharge,
|
| | | self.NeedDays,
|
| | | self.AwardItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActManyDayRechargeInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardList = list() #(vector<tagMCActManyDayRechargeAward> AwardList)// 奖励信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x48
|
| | | 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.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardCount):
|
| | | temAwardList = tagMCActManyDayRechargeAward()
|
| | | _pos = temAwardList.ReadData(_lpData, _pos)
|
| | | self.AwardList.append(temAwardList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x48
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.AwardCount):
|
| | | length += self.AwardList[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.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | AwardCount:%d,
|
| | | AwardList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActManyDayRechargeInfo=tagMCActManyDayRechargeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActManyDayRechargeInfo.Head.Cmd,m_NAtagMCActManyDayRechargeInfo.Head.SubCmd))] = m_NAtagMCActManyDayRechargeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 49 多日连充活动玩家信息 #tagMCActManyDayRechargePlayerInfo
|
| | |
|
| | | class tagMCActManyDayRechargePlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | Days = 0 #(BYTE Days)
|
| | | DayRechargeValues = list() #(vector<DWORD> DayRechargeValues)//活动每天充值列表
|
| | | RecordCount = 0 #(BYTE RecordCount)
|
| | | AwardRecord = list() #(vector<DWORD> AwardRecord)//奖励领奖记录,按奖励索引二进制位存储是否已领取
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x49
|
| | | 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.Days,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Days):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.DayRechargeValues.append(value)
|
| | | self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RecordCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.AwardRecord.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x49
|
| | | self.ActNum = 0
|
| | | self.Days = 0
|
| | | self.DayRechargeValues = list()
|
| | | self.RecordCount = 0
|
| | | self.AwardRecord = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.Days
|
| | | length += 1
|
| | | length += 4 * self.RecordCount
|
| | |
|
| | | 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.Days)
|
| | | for i in range(self.Days):
|
| | | data = CommFunc.WriteDWORD(data, self.DayRechargeValues[i])
|
| | | data = CommFunc.WriteBYTE(data, self.RecordCount)
|
| | | for i in range(self.RecordCount):
|
| | | data = CommFunc.WriteDWORD(data, self.AwardRecord[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | Days:%d,
|
| | | DayRechargeValues:%s,
|
| | | RecordCount:%d,
|
| | | AwardRecord:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.Days,
|
| | | "...",
|
| | | self.RecordCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActManyDayRechargePlayerInfo=tagMCActManyDayRechargePlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActManyDayRechargePlayerInfo.Head.Cmd,m_NAtagMCActManyDayRechargePlayerInfo.Head.SubCmd))] = m_NAtagMCActManyDayRechargePlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo
|
| | |
|
| | | class tagMCActRechargePrize(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)//是否每天重置
|
| | | PrizeDays = 0 #(BYTE PrizeDays)
|
| | | PrizeDayInfo = list() #(vector<tagMCActRechargePrizeDay> PrizeDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样
|
| | |
| | | _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.PrizeDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PrizeDays):
|
| | |
| | | self.Head.SubCmd = 0x27
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.IsDayReset = 0
|
| | | self.PrizeDays = 0
|
| | | self.PrizeDayInfo = list()
|
| | |
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.PrizeDays):
|
| | |
| | | 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.PrizeDays)
|
| | | for i in range(self.PrizeDays):
|
| | |
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | IsDayReset:%d,
|
| | | PrizeDays:%d,
|
| | | PrizeDayInfo:%s
|
| | |
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.IsDayReset,
|
| | | self.PrizeDays,
|
| | | "..."
|
| | |
| | |
|
| | | m_NAtagMCActRechargePrizeInfo=tagMCActRechargePrizeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargePrizeInfo.Head.Cmd,m_NAtagMCActRechargePrizeInfo.Head.SubCmd))] = m_NAtagMCActRechargePrizeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | class tagMCCostRebateInfo(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)//是否每天重置
|
| | |
| | | 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.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x09
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | |
| | | 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)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | |
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), #活动编号
|
| | | ("CostGoldTotal", c_int), #本次活动已累计消费仙玉数
|
| | | ("AwardRecord", c_int), #返利奖励领奖记录,按奖励索引二进制位存储是否已领取
|
| | | ]
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x10
|
| | | self.ActNum = 0
|
| | | self.CostGoldTotal = 0
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
| | | DumpString = '''// AA 10 消费返利玩家活动信息 //tagMCCostRebatePlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | CostGoldTotal:%d,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.CostGoldTotal,
|
| | | self.AwardRecord
|
| | | )
|
| | |
| | |
|
| | | class tagMCDailyGiftbagInfo(Structure):
|
| | | Head = tagHead()
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | GiftbagCount = 0 #(BYTE GiftbagCount)// 礼包数
|
| | | GiftbagInfo = list() #(vector<tagMCDailyGiftbag> GiftbagInfo)// 礼包信息
|
| | | data = None
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftbagCount):
|
| | | temGiftbagInfo = tagMCDailyGiftbag()
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x25
|
| | | self.LimitLV = 0
|
| | | self.GiftbagCount = 0
|
| | | self.GiftbagInfo = list()
|
| | | return
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.GiftbagCount):
|
| | | length += self.GiftbagInfo[i].GetLength()
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftbagCount)
|
| | | for i in range(self.GiftbagCount):
|
| | | data = CommFunc.WriteString(data, self.GiftbagInfo[i].GetLength(), self.GiftbagInfo[i].GetBuffer())
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | LimitLV:%d,
|
| | | GiftbagCount:%d,
|
| | | GiftbagInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.LimitLV,
|
| | | self.GiftbagCount,
|
| | | "..."
|
| | | )
|
| | |
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | DayCount = 0 #(BYTE DayCount)// 总共几天
|
| | | DayAwardList = list() #(vector<tagMCFeastLoginDayAward> DayAwardList)//登录天奖励列表
|
| | | data = None
|
| | |
| | | _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.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.DayCount):
|
| | | temDayAwardList = tagMCFeastLoginDayAward()
|
| | |
| | | self.Head.SubCmd = 0x42
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.DayCount = 0
|
| | | self.DayAwardList = list()
|
| | | return
|
| | |
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.DayCount):
|
| | | length += self.DayAwardList[i].GetLength()
|
| | |
| | | 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.DayCount)
|
| | | for i in range(self.DayCount):
|
| | | data = CommFunc.WriteString(data, self.DayAwardList[i].GetLength(), self.DayAwardList[i].GetBuffer())
|
| | |
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | DayCount:%d,
|
| | | DayAwardList:%s
|
| | | '''\
|
| | |
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.DayCount,
|
| | | "..."
|
| | | )
|
| | |
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
|
| | | TravelTaskCount = 0 #(BYTE TravelTaskCount)// 游历任务数
|
| | | TravelTaskList = list() #(vector<tagMCFeastTravelTask> TravelTaskList)//游历任务信息列表
|
| | |
| | | _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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TravelTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.TravelTaskCount):
|
| | |
| | | self.Head.SubCmd = 0x46
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.ResetType = 0
|
| | | self.TravelTaskCount = 0
|
| | | self.TravelTaskList = list()
|
| | |
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.TravelTaskCount):
|
| | |
| | | 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.ResetType)
|
| | | data = CommFunc.WriteBYTE(data, self.TravelTaskCount)
|
| | | for i in range(self.TravelTaskCount):
|
| | |
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | ResetType:%d,
|
| | | TravelTaskCount:%d,
|
| | | TravelTaskList:%s,
|
| | |
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.ResetType,
|
| | | self.TravelTaskCount,
|
| | | "...",
|
| | |
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
|
| | | WishPoolShowCount = 0 #(BYTE WishPoolShowCount)//祝福池展示物品数
|
| | | WishPoolShowItemList = list() #(vector<DWORD> WishPoolShowItemList)//祝福池展示物品ID列表
|
| | |
| | | _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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.WishPoolShowCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.WishPoolShowCount):
|
| | |
| | | self.Head.SubCmd = 0x43
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.ResetType = 0
|
| | | self.WishPoolShowCount = 0
|
| | | self.WishPoolShowItemList = list()
|
| | |
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.WishPoolShowCount
|
| | |
| | | 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.ResetType)
|
| | | data = CommFunc.WriteBYTE(data, self.WishPoolShowCount)
|
| | | for i in range(self.WishPoolShowCount):
|
| | |
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | ResetType:%d,
|
| | | WishPoolShowCount:%d,
|
| | | WishPoolShowItemList:%s,
|
| | |
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.ResetType,
|
| | | self.WishPoolShowCount,
|
| | | "...",
|
| | |
| | |
|
| | | class tagMCFlashGiftbagInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟
|
| | |
| | | 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.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x12
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.AdvanceMinutes = 0
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | |
| | | 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.WriteWORD(data, self.AdvanceMinutes)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | AdvanceMinutes:%d,
|
| | |
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.AdvanceMinutes,
|
| | |
| | |
|
| | | class tagMCFlashGiftbagPlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | Count = 0 #(BYTE Count)
|
| | | BuyCountList = list() #(vector<tagMCFlashGiftbagBuyCount> BuyCountList)//礼包购买次数信息
|
| | | data = None
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temBuyCountList = tagMCFlashGiftbagBuyCount()
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x13
|
| | | self.ActNum = 0
|
| | | self.Count = 0
|
| | | self.BuyCountList = list()
|
| | | return
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.BuyCountList[i].GetLength()
|
| | |
| | | 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.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.BuyCountList[i].GetLength(), self.BuyCountList[i].GetBuffer())
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | Count:%d,
|
| | | BuyCountList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | |
| | |
|
| | | class tagMCFlashSaleAppointmentInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | IsAll = 0 #(BYTE IsAll)// 是否全部
|
| | | GoodsCount = 0 #(WORD GoodsCount)// 商品数
|
| | | GoodsList = list() #(vector<tagMCFlashSaleAppointmentState> GoodsList)// 预约的商品
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GoodsCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.GoodsCount):
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x18
|
| | | self.ActNum = 0
|
| | | self.IsAll = 0
|
| | | self.GoodsCount = 0
|
| | | self.GoodsList = list()
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.GoodsCount):
|
| | |
| | | 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.IsAll)
|
| | | data = CommFunc.WriteWORD(data, self.GoodsCount)
|
| | | for i in range(self.GoodsCount):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | IsAll:%d,
|
| | | GoodsCount:%d,
|
| | | GoodsList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.IsAll,
|
| | | self.GoodsCount,
|
| | | "..."
|
| | |
| | |
|
| | | class tagMCFlashSaleInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟
|
| | |
| | | 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.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x17
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.AdvanceMinutes = 0
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | |
| | | 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.WriteWORD(data, self.AdvanceMinutes)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | AdvanceMinutes:%d,
|
| | |
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.AdvanceMinutes,
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|
| | |
| | |
|
| | | class tagMCSpringSaleInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟
|
| | |
| | | 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.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x11
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.AdvanceMinutes = 0
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | |
| | | 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.WriteWORD(data, self.AdvanceMinutes)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | AdvanceMinutes:%d,
|
| | |
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.AdvanceMinutes,
|