| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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)//活动每天充值列表
|
| | | AwardRecord = 0 #(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.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | 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.AwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.Days
|
| | | length += 4
|
| | |
|
| | | 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.WriteDWORD(data, self.AwardRecord)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | Days:%d,
|
| | | DayRechargeValues:%s,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.Days,
|
| | | "...",
|
| | | self.AwardRecord
|
| | | )
|
| | | 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):
|