| | |
| | | DayNum = 0 #(BYTE DayNum)//天编号,从1开始,过期未签到领取的天可消耗货币补签领取
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActLoginNewItem> AwardItemList)// 奖励物品列表
|
| | | CountEx = 0 #(BYTE CountEx)// 额外奖励物品数
|
| | | AwardItemListEx = list() #(vector<tagMCActLoginNewItem> AwardItemListEx)// 额外奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | temAwardItemList = tagMCActLoginNewItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CountEx):
|
| | | temAwardItemListEx = tagMCActLoginNewItem()
|
| | | _pos = temAwardItemListEx.ReadData(_lpData, _pos)
|
| | | self.AwardItemListEx.append(temAwardItemListEx)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.DayNum = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | self.CountEx = 0
|
| | | self.AwardItemListEx = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | | length += 1
|
| | | for i in range(self.CountEx):
|
| | | length += self.AwardItemListEx[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.CountEx)
|
| | | for i in range(self.CountEx):
|
| | | data = CommFunc.WriteString(data, self.AwardItemListEx[i].GetLength(), self.AwardItemListEx[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | DayNum:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | AwardItemList:%s,
|
| | | CountEx:%d,
|
| | | AwardItemListEx:%s
|
| | | '''\
|
| | | %(
|
| | | self.DayNum,
|
| | | self.Count,
|
| | | "...",
|
| | | self.CountEx,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | RepSignMoneyType = 0 #(BYTE RepSignMoneyType)// 补签消耗货币类型
|
| | | RepSignMoneyValue = 0 #(DWORD RepSignMoneyValue)// 补签消耗货币值
|
| | | AwardExCTGID = 0 #(WORD AwardExCTGID)// 扩展奖励礼包充值ID,大于0时代表可以购买礼包每日登录可领取额外奖励
|
| | | DayCount = 0 #(BYTE DayCount)
|
| | | AwardDayList = list() #(vector<tagMCActLoginNewDay> AwardDayList)// 奖励天列表
|
| | | data = None
|
| | |
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RepSignMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RepSignMoneyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.AwardExCTGID,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.DayCount):
|
| | | temAwardDayList = tagMCActLoginNewDay()
|
| | |
| | | self.LimitLV = 0
|
| | | self.RepSignMoneyType = 0
|
| | | self.RepSignMoneyValue = 0
|
| | | self.AwardExCTGID = 0
|
| | | self.DayCount = 0
|
| | | self.AwardDayList = list()
|
| | | return
|
| | |
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.DayCount):
|
| | | length += self.AwardDayList[i].GetLength()
|
| | |
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.RepSignMoneyType)
|
| | | data = CommFunc.WriteDWORD(data, self.RepSignMoneyValue)
|
| | | data = CommFunc.WriteWORD(data, self.AwardExCTGID)
|
| | | data = CommFunc.WriteBYTE(data, self.DayCount)
|
| | | for i in range(self.DayCount):
|
| | | data = CommFunc.WriteString(data, self.AwardDayList[i].GetLength(), self.AwardDayList[i].GetBuffer())
|
| | |
| | | LimitLV:%d,
|
| | | RepSignMoneyType:%d,
|
| | | RepSignMoneyValue:%d,
|
| | | AwardExCTGID:%d,
|
| | | DayCount:%d,
|
| | | AwardDayList:%s
|
| | | '''\
|
| | |
| | | self.LimitLV,
|
| | | self.RepSignMoneyType,
|
| | | self.RepSignMoneyValue,
|
| | | self.AwardExCTGID,
|
| | | self.DayCount,
|
| | | "..."
|
| | | )
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("LoginAward", c_int), # 是否已领取,按天索引0代表第1天记录当天是否已领取
|
| | | ("LoginAward", c_int), # 普通奖励领取记录,按天对应二进制位记录是否已领取
|
| | | ("LoginAwardEx", c_int), # 额外奖励领取记录,按天对应二进制位记录是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.SubCmd = 0x70
|
| | | self.ActNum = 0
|
| | | self.LoginAward = 0
|
| | | self.LoginAwardEx = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | LoginAward:%d
|
| | | LoginAward:%d,
|
| | | LoginAwardEx:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.LoginAward
|
| | | self.LoginAward,
|
| | | self.LoginAwardEx
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 88 轮回殿活动信息 #tagMCActLunhuidianInfo
|
| | |
|
| | | class tagMCActLunhuidianItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", 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
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActLunhuidianItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 88 轮回殿活动信息 //tagMCActLunhuidianInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActLunhuidianAward(Structure):
|
| | | AwardIndex = 0 #(BYTE AwardIndex)// 奖励记录索引 0~30
|
| | | NeedValue = 0 #(DWORD NeedValue)// 奖励所需值
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActLunhuidianItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActLunhuidianItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.AwardIndex = 0
|
| | | self.NeedValue = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.AwardIndex)
|
| | | data = CommFunc.WriteDWORD(data, self.NeedValue)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | AwardIndex:%d,
|
| | | NeedValue:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.AwardIndex,
|
| | | self.NeedValue,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActLunhuidianRound(Structure):
|
| | | RoundType = 0 #(BYTE RoundType)// 轮回类型
|
| | | AwardType = 0 #(BYTE AwardType)// 奖励类型 1-消耗货币;2-寻宝次数
|
| | | AwardTypeValue = 0 #(DWORD AwardTypeValue)// 奖励类型对应值,消耗货币时为对应的货币类型,寻宝时为对应的寻宝类型
|
| | | RoundMax = 0 #(BYTE RoundMax)// 最大可循环轮次
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardList = list() #(vector<tagMCActLunhuidianAward> AwardList)// 每轮奖励列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.RoundType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardTypeValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RoundMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardCount):
|
| | | temAwardList = tagMCActLunhuidianAward()
|
| | | _pos = temAwardList.ReadData(_lpData, _pos)
|
| | | self.AwardList.append(temAwardList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.RoundType = 0
|
| | | self.AwardType = 0
|
| | | self.AwardTypeValue = 0
|
| | | self.RoundMax = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.AwardCount):
|
| | | length += self.AwardList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.RoundType)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardType)
|
| | | data = CommFunc.WriteDWORD(data, self.AwardTypeValue)
|
| | | data = CommFunc.WriteBYTE(data, self.RoundMax)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | RoundType:%d,
|
| | | AwardType:%d,
|
| | | AwardTypeValue:%d,
|
| | | RoundMax:%d,
|
| | | AwardCount:%d,
|
| | | AwardList:%s
|
| | | '''\
|
| | | %(
|
| | | self.RoundType,
|
| | | self.AwardType,
|
| | | self.AwardTypeValue,
|
| | | self.RoundMax,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActLunhuidianInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | RoundCount = 0 #(BYTE RoundCount)
|
| | | RoundList = list() #(vector<tagMCActLunhuidianRound> RoundList)// 轮回列表,支持多个不同类型轮回同时开启
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x88
|
| | | 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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RoundCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RoundCount):
|
| | | temRoundList = tagMCActLunhuidianRound()
|
| | | _pos = temRoundList.ReadData(_lpData, _pos)
|
| | | self.RoundList.append(temRoundList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x88
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.RoundCount = 0
|
| | | self.RoundList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.RoundCount):
|
| | | length += self.RoundList[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.ResetType)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.RoundCount)
|
| | | for i in range(self.RoundCount):
|
| | | data = CommFunc.WriteString(data, self.RoundList[i].GetLength(), self.RoundList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | RoundCount:%d,
|
| | | RoundList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.ResetType,
|
| | | self.LimitLV,
|
| | | self.RoundCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActLunhuidianInfo=tagMCActLunhuidianInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLunhuidianInfo.Head.Cmd,m_NAtagMCActLunhuidianInfo.Head.SubCmd))] = m_NAtagMCActLunhuidianInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 89 轮回殿活动玩家信息 #tagMCActLunhuidianPlayerInfo
|
| | |
|
| | | class tagMCActLunhuidianPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("RoundType", c_ubyte), # 轮回类型
|
| | | ("CurRound", c_ubyte), # 当前轮次
|
| | | ("CurValue", c_int), # 累计值
|
| | | ("AwardRecord", c_int), # 当前轮次奖励领奖记录,按奖励索引二进制位存储是否已领取,所有奖励已领取后自动进入下一轮,且重置该奖励状态
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x89
|
| | | 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 = 0x89
|
| | | self.ActNum = 0
|
| | | self.RoundType = 0
|
| | | self.CurRound = 0
|
| | | self.CurValue = 0
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActLunhuidianPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 89 轮回殿活动玩家信息 //tagMCActLunhuidianPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | RoundType:%d,
|
| | | CurRound:%d,
|
| | | CurValue:%d,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.RoundType,
|
| | | self.CurRound,
|
| | | self.CurValue,
|
| | | self.AwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActLunhuidianPlayerInfo=tagMCActLunhuidianPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLunhuidianPlayerInfo.Cmd,m_NAtagMCActLunhuidianPlayerInfo.SubCmd))] = m_NAtagMCActLunhuidianPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 48 多日连充活动信息 #tagMCActManyDayRechargeInfo
|
| | |
|
| | | class tagMCActManyDayRechargeItem(Structure):
|