| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo
|
| | |
|
| | | class tagMCActGrowupBuyGroup(Structure):
|
| | | BuyCount = 0 #(BYTE BuyCount)// 循环购买礼包数
|
| | | BuyCTGIDList = list() #(vector<DWORD> BuyCTGIDList)// 循环购买礼包充值ID列表
|
| | | PlayerBuyIndex = 0 #(BYTE PlayerBuyIndex)// 玩家当前可购买的礼包充值ID在列表中索引
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.BuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BuyCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.BuyCTGIDList.append(value)
|
| | | self.PlayerBuyIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.BuyCount = 0
|
| | | self.BuyCTGIDList = list()
|
| | | self.PlayerBuyIndex = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4 * self.BuyCount
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.BuyCount)
|
| | | for i in range(self.BuyCount):
|
| | | data = CommFunc.WriteDWORD(data, self.BuyCTGIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.PlayerBuyIndex)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | BuyCount:%d,
|
| | | BuyCTGIDList:%s,
|
| | | PlayerBuyIndex:%d
|
| | | '''\
|
| | | %(
|
| | | self.BuyCount,
|
| | | "...",
|
| | | self.PlayerBuyIndex
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGrowupBuyInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | GroupCount = 0 #(BYTE GroupCount)// 循环购买礼包组数
|
| | | GroupList = list() #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x31
|
| | | 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.GroupCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GroupCount):
|
| | | temGroupList = tagMCActGrowupBuyGroup()
|
| | | _pos = temGroupList.ReadData(_lpData, _pos)
|
| | | self.GroupList.append(temGroupList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x31
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.GroupCount = 0
|
| | | self.GroupList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | for i in range(self.GroupCount):
|
| | | length += self.GroupList[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.GroupCount)
|
| | | for i in range(self.GroupCount):
|
| | | data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | GroupCount:%d,
|
| | | GroupList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.GroupCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGrowupBuyInfo=tagMCActGrowupBuyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGrowupBuyInfo.Head.Cmd,m_NAtagMCActGrowupBuyInfo.Head.SubCmd))] = m_NAtagMCActGrowupBuyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
|
| | |
|
| | | class tagMCActLoginAwardAction(Structure):
|