9762 【BT8】【后端】藏宝阁(古宝特殊效果属性支持) 冲突 master
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 19 神通升级 #tagCMShentongLVUp
|
| | |
|
| | | class tagCMShentongLVUp(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ShentongID", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x19
|
| | | 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.Cmd = 0xB2
|
| | | self.SubCmd = 0x19
|
| | | self.ShentongID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMShentongLVUp)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 19 神通升级 //tagCMShentongLVUp:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ShentongID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ShentongID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMShentongLVUp=tagCMShentongLVUp()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMShentongLVUp.Cmd,m_NAtagCMShentongLVUp.SubCmd))] = m_NAtagCMShentongLVUp
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 20 神通技能设置 #tagCMShentongSkillSet
|
| | |
|
| | | class tagCMShentongSkillSet(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | SkillIDList = list() #(vector<DWORD> SkillIDList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.SkillIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x20
|
| | | self.Count = 0
|
| | | self.SkillIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 4 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteDWORD(data, self.SkillIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | SkillIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMShentongSkillSet=tagCMShentongSkillSet()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMShentongSkillSet.Head.Cmd,m_NAtagCMShentongSkillSet.Head.SubCmd))] = m_NAtagCMShentongSkillSet
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 01 脱机挂状态 # tagCMLoginState
|
| | |
|
| | | class tagCMLoginState(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 62 充值抵扣活动信息 #tagMCActRecharegeCouponInfo
|
| | |
|
| | | class tagMCActRecharegeCouponItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ("IsMainItem", 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
|
| | | self.IsMainItem = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRecharegeCouponItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 62 充值抵扣活动信息 //tagMCActRecharegeCouponInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d,
|
| | | IsMainItem:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind,
|
| | | self.IsMainItem
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRecharegeCouponGiftbag(Structure):
|
| | | GiftID = 0 #(DWORD GiftID)//商城表的物品ID
|
| | | BuyCountLimit = 0 #(BYTE BuyCountLimit)//限购数
|
| | | MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
|
| | | MoneyNumber = 0 #(DWORD MoneyNumber)//消耗货币数量
|
| | | MoneyOriginal = 0 #(DWORD MoneyOriginal)//原价
|
| | | GiftItemCount = 0 #(BYTE GiftItemCount)// 礼包物品数
|
| | | ItemInfo = list() #(vector<tagMCActRecharegeCouponItem> ItemInfo)// 物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.BuyCountLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyNumber,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MoneyOriginal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.GiftItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftItemCount):
|
| | | temItemInfo = tagMCActRecharegeCouponItem()
|
| | | _pos = temItemInfo.ReadData(_lpData, _pos)
|
| | | self.ItemInfo.append(temItemInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.GiftID = 0
|
| | | self.BuyCountLimit = 0
|
| | | self.MoneyType = 0
|
| | | self.MoneyNumber = 0
|
| | | self.MoneyOriginal = 0
|
| | | self.GiftItemCount = 0
|
| | | self.ItemInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.GiftItemCount):
|
| | | length += self.ItemInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.GiftID)
|
| | | data = CommFunc.WriteBYTE(data, self.BuyCountLimit)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneyType)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyNumber)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyOriginal)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftItemCount)
|
| | | for i in range(self.GiftItemCount):
|
| | | data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | GiftID:%d,
|
| | | BuyCountLimit:%d,
|
| | | MoneyType:%d,
|
| | | MoneyNumber:%d,
|
| | | MoneyOriginal:%d,
|
| | | GiftItemCount:%d,
|
| | | ItemInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.GiftID,
|
| | | self.BuyCountLimit,
|
| | | self.MoneyType,
|
| | | self.MoneyNumber,
|
| | | self.MoneyOriginal,
|
| | | self.GiftItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRecharegeCouponInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CouponMoneyType = 0 #(BYTE CouponMoneyType)//抵扣券对应货币类型
|
| | | GiftbagCount = 0 #(BYTE GiftbagCount)// 可购买礼包个数
|
| | | GiftbagList = list() #(vector<tagMCActRecharegeCouponGiftbag> GiftbagList)// 可购买礼包顺序列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x62
|
| | | 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.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.CouponMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftbagCount):
|
| | | temGiftbagList = tagMCActRecharegeCouponGiftbag()
|
| | | _pos = temGiftbagList.ReadData(_lpData, _pos)
|
| | | self.GiftbagList.append(temGiftbagList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x62
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.LimitLV = 0
|
| | | self.CouponMoneyType = 0
|
| | | self.GiftbagCount = 0
|
| | | self.GiftbagList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.GiftbagCount):
|
| | | length += self.GiftbagList[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.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.CouponMoneyType)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftbagCount)
|
| | | for i in range(self.GiftbagCount):
|
| | | data = CommFunc.WriteString(data, self.GiftbagList[i].GetLength(), self.GiftbagList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | CouponMoneyType:%d,
|
| | | GiftbagCount:%d,
|
| | | GiftbagList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.CouponMoneyType,
|
| | | self.GiftbagCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRecharegeCouponInfo=tagMCActRecharegeCouponInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponInfo.Head.Cmd,m_NAtagMCActRecharegeCouponInfo.Head.SubCmd))] = m_NAtagMCActRecharegeCouponInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 63 充值抵扣活动玩家信息 #tagMCActRecharegeCouponPlayerInfo
|
| | |
|
| | | class tagMCActRecharegeCouponPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("CouponMoney", c_int), # 当前可用抵扣点
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x63
|
| | | 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.Cmd = 0xAA
|
| | | self.SubCmd = 0x63
|
| | | self.ActNum = 0
|
| | | self.CouponMoney = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRecharegeCouponPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 63 充值抵扣活动玩家信息 //tagMCActRecharegeCouponPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | CouponMoney:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.CouponMoney
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRecharegeCouponPlayerInfo=tagMCActRecharegeCouponPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponPlayerInfo.Cmd,m_NAtagMCActRecharegeCouponPlayerInfo.SubCmd))] = m_NAtagMCActRecharegeCouponPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo
|
| | |
|
| | | class tagMCActRechargePrize(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 19 神通升级 #tagCMShentongLVUp
|
| | |
|
| | | class tagCMShentongLVUp(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ShentongID", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x19
|
| | | 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.Cmd = 0xB2
|
| | | self.SubCmd = 0x19
|
| | | self.ShentongID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMShentongLVUp)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 19 神通升级 //tagCMShentongLVUp:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ShentongID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ShentongID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMShentongLVUp=tagCMShentongLVUp()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMShentongLVUp.Cmd,m_NAtagCMShentongLVUp.SubCmd))] = m_NAtagCMShentongLVUp
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 20 神通技能设置 #tagCMShentongSkillSet
|
| | |
|
| | | class tagCMShentongSkillSet(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | SkillIDList = list() #(vector<DWORD> SkillIDList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.SkillIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x20
|
| | | self.Count = 0
|
| | | self.SkillIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 4 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteDWORD(data, self.SkillIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | SkillIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMShentongSkillSet=tagCMShentongSkillSet()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMShentongSkillSet.Head.Cmd,m_NAtagCMShentongSkillSet.Head.SubCmd))] = m_NAtagCMShentongSkillSet
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 01 脱机挂状态 # tagCMLoginState
|
| | |
|
| | | class tagCMLoginState(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 62 充值抵扣活动信息 #tagMCActRecharegeCouponInfo
|
| | |
|
| | | class tagMCActRecharegeCouponItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ("IsMainItem", 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
|
| | | self.IsMainItem = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRecharegeCouponItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 62 充值抵扣活动信息 //tagMCActRecharegeCouponInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d,
|
| | | IsMainItem:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind,
|
| | | self.IsMainItem
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRecharegeCouponGiftbag(Structure):
|
| | | GiftID = 0 #(DWORD GiftID)//商城表的物品ID
|
| | | BuyCountLimit = 0 #(BYTE BuyCountLimit)//限购数
|
| | | MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
|
| | | MoneyNumber = 0 #(DWORD MoneyNumber)//消耗货币数量
|
| | | MoneyOriginal = 0 #(DWORD MoneyOriginal)//原价
|
| | | GiftItemCount = 0 #(BYTE GiftItemCount)// 礼包物品数
|
| | | ItemInfo = list() #(vector<tagMCActRecharegeCouponItem> ItemInfo)// 物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.BuyCountLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyNumber,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MoneyOriginal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.GiftItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftItemCount):
|
| | | temItemInfo = tagMCActRecharegeCouponItem()
|
| | | _pos = temItemInfo.ReadData(_lpData, _pos)
|
| | | self.ItemInfo.append(temItemInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.GiftID = 0
|
| | | self.BuyCountLimit = 0
|
| | | self.MoneyType = 0
|
| | | self.MoneyNumber = 0
|
| | | self.MoneyOriginal = 0
|
| | | self.GiftItemCount = 0
|
| | | self.ItemInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.GiftItemCount):
|
| | | length += self.ItemInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.GiftID)
|
| | | data = CommFunc.WriteBYTE(data, self.BuyCountLimit)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneyType)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyNumber)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyOriginal)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftItemCount)
|
| | | for i in range(self.GiftItemCount):
|
| | | data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | GiftID:%d,
|
| | | BuyCountLimit:%d,
|
| | | MoneyType:%d,
|
| | | MoneyNumber:%d,
|
| | | MoneyOriginal:%d,
|
| | | GiftItemCount:%d,
|
| | | ItemInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.GiftID,
|
| | | self.BuyCountLimit,
|
| | | self.MoneyType,
|
| | | self.MoneyNumber,
|
| | | self.MoneyOriginal,
|
| | | self.GiftItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRecharegeCouponInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CouponMoneyType = 0 #(BYTE CouponMoneyType)//抵扣券对应货币类型
|
| | | GiftbagCount = 0 #(BYTE GiftbagCount)// 可购买礼包个数
|
| | | GiftbagList = list() #(vector<tagMCActRecharegeCouponGiftbag> GiftbagList)// 可购买礼包顺序列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x62
|
| | | 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.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.CouponMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftbagCount):
|
| | | temGiftbagList = tagMCActRecharegeCouponGiftbag()
|
| | | _pos = temGiftbagList.ReadData(_lpData, _pos)
|
| | | self.GiftbagList.append(temGiftbagList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x62
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.LimitLV = 0
|
| | | self.CouponMoneyType = 0
|
| | | self.GiftbagCount = 0
|
| | | self.GiftbagList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.GiftbagCount):
|
| | | length += self.GiftbagList[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.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.CouponMoneyType)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftbagCount)
|
| | | for i in range(self.GiftbagCount):
|
| | | data = CommFunc.WriteString(data, self.GiftbagList[i].GetLength(), self.GiftbagList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | CouponMoneyType:%d,
|
| | | GiftbagCount:%d,
|
| | | GiftbagList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.CouponMoneyType,
|
| | | self.GiftbagCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRecharegeCouponInfo=tagMCActRecharegeCouponInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponInfo.Head.Cmd,m_NAtagMCActRecharegeCouponInfo.Head.SubCmd))] = m_NAtagMCActRecharegeCouponInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 63 充值抵扣活动玩家信息 #tagMCActRecharegeCouponPlayerInfo
|
| | |
|
| | | class tagMCActRecharegeCouponPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("CouponMoney", c_int), # 当前可用抵扣点
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x63
|
| | | 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.Cmd = 0xAA
|
| | | self.SubCmd = 0x63
|
| | | self.ActNum = 0
|
| | | self.CouponMoney = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRecharegeCouponPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 63 充值抵扣活动玩家信息 //tagMCActRecharegeCouponPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | CouponMoney:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.CouponMoney
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRecharegeCouponPlayerInfo=tagMCActRecharegeCouponPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponPlayerInfo.Cmd,m_NAtagMCActRecharegeCouponPlayerInfo.SubCmd))] = m_NAtagMCActRecharegeCouponPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo
|
| | |
|
| | | class tagMCActRechargePrize(Structure):
|