| | |
| | | ("TotalPayCount", c_int), # 累计总购买次数
|
| | | ("WeekPayCount", c_ushort), # 周总购买次数
|
| | | ("MonthPayCount", c_ushort), # 月总购买次数
|
| | | ("SelectItemValue", c_int), # 自选物品索引值,每两位存储每个自选索引对应选择的物品索引+1,存储位值为0代表未选择,最多支持选择4种物品
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.TotalPayCount = 0
|
| | | self.WeekPayCount = 0
|
| | | self.MonthPayCount = 0
|
| | | self.SelectItemValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | TodayPayCount:%d,
|
| | | TotalPayCount:%d,
|
| | | WeekPayCount:%d,
|
| | | MonthPayCount:%d
|
| | | MonthPayCount:%d,
|
| | | SelectItemValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordID,
|
| | | self.TodayPayCount,
|
| | | self.TotalPayCount,
|
| | | self.WeekPayCount,
|
| | | self.MonthPayCount
|
| | | self.MonthPayCount,
|
| | | self.SelectItemValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountCTGID(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("CTGID", c_ushort), # 充值表ID
|
| | | ("Discount", 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.CTGID = 0
|
| | | self.Discount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActBuyCountCTGID)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo:
|
| | | CTGID:%d,
|
| | | Discount:%d
|
| | | '''\
|
| | | %(
|
| | | self.CTGID,
|
| | | self.Discount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountGiftInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | |
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CTGIDCount = 0 #(BYTE CTGIDCount)
|
| | | CTGIDInfoList = list() #(vector<tagMCActBuyCountCTGID> CTGIDInfoList)// CTGID信息列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | CTGIDList = list() #(vector<WORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | GiftCount = 0 #(BYTE GiftCount)
|
| | | BuyCountGiftList = list() #(vector<tagMCActBuyCountGift> BuyCountGiftList)// 购买次数礼包列表
|
| | | data = None
|
| | |
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CTGIDCount):
|
| | | temCTGIDInfoList = tagMCActBuyCountCTGID()
|
| | | _pos = temCTGIDInfoList.ReadData(_lpData, _pos)
|
| | | self.CTGIDInfoList.append(temCTGIDInfoList)
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.CTGIDList.append(value)
|
| | | self.GiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftCount):
|
| | | temBuyCountGiftList = tagMCActBuyCountGift()
|
| | |
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDInfoList = list()
|
| | | self.CTGIDList = list()
|
| | | self.GiftCount = 0
|
| | | self.BuyCountGiftList = list()
|
| | | return
|
| | |
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.CTGIDCount):
|
| | | length += self.CTGIDInfoList[i].GetLength()
|
| | | length += 2 * self.CTGIDCount
|
| | | length += 1
|
| | | for i in range(self.GiftCount):
|
| | | length += self.BuyCountGiftList[i].GetLength()
|
| | |
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.CTGIDCount)
|
| | | for i in range(self.CTGIDCount):
|
| | | data = CommFunc.WriteString(data, self.CTGIDInfoList[i].GetLength(), self.CTGIDInfoList[i].GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.CTGIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.GiftCount)
|
| | | for i in range(self.GiftCount):
|
| | | data = CommFunc.WriteString(data, self.BuyCountGiftList[i].GetLength(), self.BuyCountGiftList[i].GetBuffer())
|
| | |
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | CTGIDCount:%d,
|
| | | CTGIDInfoList:%s,
|
| | | CTGIDList:%s,
|
| | | GiftCount:%d,
|
| | | BuyCountGiftList:%s
|
| | | '''\
|