| | |
| | |
|
| | | class tagMCActSingleRechargeInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
|
| | | IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | AwardRuleType = 0 #(BYTE AwardRuleType)// 领奖规则类型 0-向下兼容;1-匹配最高档;2-精确匹配对应档次
|
| | | AwardCount = 0 #(BYTE AwardCount)// 奖励档数
|
| | | AwardInfo = list() #(vector<tagMCActSingleRechargeAward> AwardInfo)// 奖励档信息
|
| | | data = None
|
| | |
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.AwardRuleType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardCount):
|
| | | temAwardInfo = tagMCActSingleRechargeAward()
|
| | |
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.LimitLV = 0
|
| | | self.AwardRuleType = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardInfo = list()
|
| | | return
|
| | |
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.AwardCount):
|
| | | length += self.AwardInfo[i].GetLength()
|
| | |
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardRuleType)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteString(data, self.AwardInfo[i].GetLength(), self.AwardInfo[i].GetBuffer())
|
| | |
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | AwardRuleType:%d,
|
| | | AwardCount:%d,
|
| | | AwardInfo:%s
|
| | | '''\
|
| | |
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.AwardRuleType,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | )
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2
|
| | | ("HightestSingleRecharge", c_int), # 最高单笔充值额度
|
| | | ("CanAwardValue", c_int), #可否领奖记录,按奖励索引二进制位存储是否可领取
|
| | | ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取
|
| | | ]
|
| | |
|
| | |
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x51
|
| | | self.ActNum = 0
|
| | | self.HightestSingleRecharge = 0
|
| | | self.CanAwardValue = 0
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
|
| | |
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | HightestSingleRecharge:%d,
|
| | | CanAwardValue:%d,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.HightestSingleRecharge,
|
| | | self.CanAwardValue,
|
| | | self.AwardRecord
|
| | | )
|
| | | return DumpString
|