| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|
| | |
| | |
|
| | | class tagMCActTotalRechargeInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2
|
| | | 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 = 0x1D
|
| | | 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), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2
|
| | | ("GoldTotal", c_int), #本次活动已累计充值仙玉数
|
| | | ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取
|
| | | ]
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x1C
|
| | | self.ActNum = 0
|
| | | self.GoldTotal = 0
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
| | | DumpString = '''// AA 1C 累计充值玩家活动信息 //tagMCTotalRechargePlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | GoldTotal:%d,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.GoldTotal,
|
| | | self.AwardRecord
|
| | | )
|