| | |
| | | _fields_ = [
|
| | | ("RecordIndex", c_ushort), #第几个记录值 每个key存31个succid 0-30为0, 31-61为1..
|
| | | ("Record", c_int), #对应是否领取值
|
| | | ("PassportRecord", c_int), #通行证奖励是否领取值
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.RecordIndex = 0
|
| | | self.Record = 0
|
| | | self.PassportRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''//A3 42 成就完成领奖记录列表 //tagMCSuccessFinishAwardRecordList:
|
| | | RecordIndex:%d,
|
| | | Record:%d
|
| | | Record:%d,
|
| | | PassportRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordIndex,
|
| | | self.Record
|
| | | self.Record,
|
| | | self.PassportRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo
|
| | |
|
| | | class tagMCActRechargePrize(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("CTGID", c_ushort), # 对应充值表充值ID
|
| | | ("GoldPrize", c_int), #返利仙玉数
|
| | | ("PrizeCountLimit", 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.CTGID = 0
|
| | | self.GoldPrize = 0
|
| | | self.PrizeCountLimit = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRechargePrize)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 27 充值返利活动信息 //tagMCActRechargePrizeInfo:
|
| | | CTGID:%d,
|
| | | GoldPrize:%d,
|
| | | PrizeCountLimit:%d
|
| | | '''\
|
| | | %(
|
| | | self.CTGID,
|
| | | self.GoldPrize,
|
| | | self.PrizeCountLimit
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRechargePrizeDay(Structure):
|
| | | Prizes = 0 #(BYTE Prizes)// 返利档数
|
| | | PrizeInfo = list() #(vector<tagMCActRechargePrize> PrizeInfo)// 返利档信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Prizes,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Prizes):
|
| | | temPrizeInfo = tagMCActRechargePrize()
|
| | | _pos = temPrizeInfo.ReadData(_lpData, _pos)
|
| | | self.PrizeInfo.append(temPrizeInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Prizes = 0
|
| | | self.PrizeInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | for i in range(self.Prizes):
|
| | | length += self.PrizeInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.Prizes)
|
| | | for i in range(self.Prizes):
|
| | | data = CommFunc.WriteString(data, self.PrizeInfo[i].GetLength(), self.PrizeInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Prizes:%d,
|
| | | PrizeInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Prizes,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRechargePrizeInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
|
| | | PrizeDays = 0 #(BYTE PrizeDays)
|
| | | PrizeDayInfo = list() #(vector<tagMCActRechargePrizeDay> PrizeDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x27
|
| | | 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.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PrizeDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PrizeDays):
|
| | | temPrizeDayInfo = tagMCActRechargePrizeDay()
|
| | | _pos = temPrizeDayInfo.ReadData(_lpData, _pos)
|
| | | self.PrizeDayInfo.append(temPrizeDayInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x27
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.PrizeDays = 0
|
| | | self.PrizeDayInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.PrizeDays):
|
| | | length += self.PrizeDayInfo[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.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteBYTE(data, self.PrizeDays)
|
| | | for i in range(self.PrizeDays):
|
| | | data = CommFunc.WriteString(data, self.PrizeDayInfo[i].GetLength(), self.PrizeDayInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | PrizeDays:%d,
|
| | | PrizeDayInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.PrizeDays,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRechargePrizeInfo=tagMCActRechargePrizeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargePrizeInfo.Head.Cmd,m_NAtagMCActRechargePrizeInfo.Head.SubCmd))] = m_NAtagMCActRechargePrizeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 1D 累计充值活动信息 #tagMCActTotalRechargeInfo
|
| | |
|
| | | class tagMCTotalRechargeAwardItem(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 28 充值返利玩家活动信息 #tagMCRechargePrizePlayerInfo
|
| | |
|
| | | class tagMCRechargePrizeInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("CTGID", c_ushort), # 对应充值表充值ID
|
| | | ("PrizeCount", 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.CTGID = 0
|
| | | self.PrizeCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCRechargePrizeInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 28 充值返利玩家活动信息 //tagMCRechargePrizePlayerInfo:
|
| | | CTGID:%d,
|
| | | PrizeCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.CTGID,
|
| | | self.PrizeCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCRechargePrizePlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | PlayerInfoList = list() #(vector<tagMCRechargePrizeInfo> PlayerInfoList)//玩家返利信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x28
|
| | | 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):
|
| | | temPlayerInfoList = tagMCRechargePrizeInfo()
|
| | | _pos = temPlayerInfoList.ReadData(_lpData, _pos)
|
| | | self.PlayerInfoList.append(temPlayerInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x28
|
| | | self.Count = 0
|
| | | self.PlayerInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.PlayerInfoList[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.PlayerInfoList[i].GetLength(), self.PlayerInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | PlayerInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCRechargePrizePlayerInfo=tagMCRechargePrizePlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargePrizePlayerInfo.Head.Cmd,m_NAtagMCRechargePrizePlayerInfo.Head.SubCmd))] = m_NAtagMCRechargePrizePlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 11 限时特惠活动信息 #tagMCSpringSaleInfo
|
| | |
|
| | | class tagMCSpringSaleItem(Structure):
|