| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 23 竞技场对战记录列表 #tagGCArenaBattleRecordList
|
| | |
|
| | | class tagGCArenaBattleRecord(Structure):
|
| | | PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | Job = 0 #(BYTE Job)
|
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
|
| | | FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力
|
| | | AddScoreLen = 0 #(BYTE AddScoreLen)
|
| | | AddScore = "" #(String AddScore)//本次对战增加的积分,有正负
|
| | | IsWin = 0 #(BYTE IsWin)//是否获胜
|
| | | Time = 0 #(DWORD Time)//时间戳
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.AddScoreLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AddScore,_pos = CommFunc.ReadString(_lpData, _pos,self.AddScoreLen)
|
| | | self.IsWin,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.PlayerID = 0
|
| | | self.PlayerName = ""
|
| | | self.Job = 0
|
| | | self.LV = 0
|
| | | self.RealmLV = 0
|
| | | self.FightPower = 0
|
| | | self.AddScoreLen = 0
|
| | | self.AddScore = ""
|
| | | self.IsWin = 0
|
| | | self.Time = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 33
|
| | | length += 1
|
| | | length += 2
|
| | | length += 2
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.AddScore)
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Job)
|
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteBYTE(data, self.AddScoreLen)
|
| | | data = CommFunc.WriteString(data, self.AddScoreLen, self.AddScore)
|
| | | data = CommFunc.WriteBYTE(data, self.IsWin)
|
| | | data = CommFunc.WriteDWORD(data, self.Time)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | FightPower:%d,
|
| | | AddScoreLen:%d,
|
| | | AddScore:%s,
|
| | | IsWin:%d,
|
| | | Time:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.FightPower,
|
| | | self.AddScoreLen,
|
| | | self.AddScore,
|
| | | self.IsWin,
|
| | | self.Time
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCArenaBattleRecordList(Structure):
|
| | | Head = tagHead()
|
| | | RecordCount = 0 #(BYTE RecordCount)
|
| | | BattleRecordList = list() #(vector<tagGCArenaBattleRecord> BattleRecordList)// 对战列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x23
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RecordCount):
|
| | | temBattleRecordList = tagGCArenaBattleRecord()
|
| | | _pos = temBattleRecordList.ReadData(_lpData, _pos)
|
| | | self.BattleRecordList.append(temBattleRecordList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x23
|
| | | self.RecordCount = 0
|
| | | self.BattleRecordList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.RecordCount):
|
| | | length += self.BattleRecordList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RecordCount)
|
| | | for i in range(self.RecordCount):
|
| | | data = CommFunc.WriteString(data, self.BattleRecordList[i].GetLength(), self.BattleRecordList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RecordCount:%d,
|
| | | BattleRecordList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RecordCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCArenaBattleRecordList=tagGCArenaBattleRecordList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaBattleRecordList.Head.Cmd,m_NAtagGCArenaBattleRecordList.Head.SubCmd))] = m_NAtagGCArenaBattleRecordList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 22 竞技场匹配玩家列表 #tagGCArenaMatchList
|
| | |
|
| | | class tagGCArenaMatchInfo(Structure):
|
| | | PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | Job = 0 #(BYTE Job)
|
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
|
| | | FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力
|
| | | Score = 0 #(DWORD Score)//积分
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.PlayerID = 0
|
| | | self.PlayerName = ""
|
| | | self.Job = 0
|
| | | self.LV = 0
|
| | | self.RealmLV = 0
|
| | | self.FightPower = 0
|
| | | self.Score = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 33
|
| | | length += 1
|
| | | length += 2
|
| | | length += 2
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Job)
|
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteDWORD(data, self.Score)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | FightPower:%d,
|
| | | Score:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.FightPower,
|
| | | self.Score
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCArenaMatchList(Structure):
|
| | | Head = tagHead()
|
| | | MatchCount = 0 #(BYTE MatchCount)
|
| | | MatchList = list() #(vector<tagGCArenaMatchInfo> MatchList)// 匹配列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x22
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MatchCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.MatchCount):
|
| | | temMatchList = tagGCArenaMatchInfo()
|
| | | _pos = temMatchList.ReadData(_lpData, _pos)
|
| | | self.MatchList.append(temMatchList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x22
|
| | | self.MatchCount = 0
|
| | | self.MatchList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.MatchCount):
|
| | | length += self.MatchList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.MatchCount)
|
| | | for i in range(self.MatchCount):
|
| | | data = CommFunc.WriteString(data, self.MatchList[i].GetLength(), self.MatchList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MatchCount:%d,
|
| | | MatchList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MatchCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCArenaMatchList=tagGCArenaMatchList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaMatchList.Head.Cmd,m_NAtagGCArenaMatchList.Head.SubCmd))] = m_NAtagGCArenaMatchList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 09 通知BOSS关注记录 #tagGCBossAttentionInfo
|
| | |
|
| | | class tagGCBossAttention(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 C3 竞技场玩家信息 #tagMCArenaPlayerInfo
|
| | |
|
| | | class tagMCArenaPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsReset", c_ubyte), #是否是重置的
|
| | | ("Score", c_int), #当前积分
|
| | | ("BattleCountToday", c_ubyte), #今日已挑战次数
|
| | | ("MatchRefreshCount", c_ubyte), #当前已刷新匹配列表次数,每次挑战后会重置
|
| | | ("ItemAddBattleCountToday", c_ubyte), #今日已使用物品增加的挑战次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0xC3
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0xC3
|
| | | self.IsReset = 0
|
| | | self.Score = 0
|
| | | self.BattleCountToday = 0
|
| | | self.MatchRefreshCount = 0
|
| | | self.ItemAddBattleCountToday = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCArenaPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 C3 竞技场玩家信息 //tagMCArenaPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsReset:%d,
|
| | | Score:%d,
|
| | | BattleCountToday:%d,
|
| | | MatchRefreshCount:%d,
|
| | | ItemAddBattleCountToday:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsReset,
|
| | | self.Score,
|
| | | self.BattleCountToday,
|
| | | self.MatchRefreshCount,
|
| | | self.ItemAddBattleCountToday
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCArenaPlayerInfo=tagMCArenaPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCArenaPlayerInfo.Cmd,m_NAtagMCArenaPlayerInfo.SubCmd))] = m_NAtagMCArenaPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 0F 通知玩家悬赏任务信息 #tagMCArrestTaskInfo
|
| | |
|
| | | class tagMCArrestTaskInfo(Structure):
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("LV", c_ubyte), #等阶
|
| | | ("EatItemCount", c_ushort), #当前阶已吃丹个数
|
| | | ("EatItemCount", c_int), #当前阶已吃丹个数
|
| | | ("SkinPlusState", c_int), #幻化激活状态,按位存储是否激活,幻化编号ID对应位
|
| | | ]
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 40 集字活动信息 #tagMCActCollectWordsInfo
|
| | |
|
| | | class tagMCActCollectWordsNeedItem(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(tagMCActCollectWordsNeedItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 40 集字活动信息 //tagMCActCollectWordsInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActCollectWordsExchangeItem(Structure):
|
| | | ExchangeNum = 0 #(BYTE ExchangeNum)//兑换编号
|
| | | ExchangeCountMax = 0 #(BYTE ExchangeCountMax)//最大兑换次数,0不限制
|
| | | ItemID = 0 #(DWORD ItemID)//目标物品
|
| | | ItemCount = 0 #(WORD ItemCount)
|
| | | IsBind = 0 #(BYTE IsBind)
|
| | | NeedItemCount = 0 #(BYTE NeedItemCount)
|
| | | NeedItemList = list() #(vector<tagMCActCollectWordsNeedItem> NeedItemList)// 所需物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.ExchangeNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ExchangeCountMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.IsBind,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.NeedItemCount):
|
| | | temNeedItemList = tagMCActCollectWordsNeedItem()
|
| | | _pos = temNeedItemList.ReadData(_lpData, _pos)
|
| | | self.NeedItemList.append(temNeedItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.ExchangeNum = 0
|
| | | self.ExchangeCountMax = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | self.NeedItemCount = 0
|
| | | self.NeedItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.NeedItemCount):
|
| | | length += self.NeedItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.ExchangeNum)
|
| | | data = CommFunc.WriteBYTE(data, self.ExchangeCountMax)
|
| | | data = CommFunc.WriteDWORD(data, self.ItemID)
|
| | | data = CommFunc.WriteWORD(data, self.ItemCount)
|
| | | data = CommFunc.WriteBYTE(data, self.IsBind)
|
| | | data = CommFunc.WriteBYTE(data, self.NeedItemCount)
|
| | | for i in range(self.NeedItemCount):
|
| | | data = CommFunc.WriteString(data, self.NeedItemList[i].GetLength(), self.NeedItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | ExchangeNum:%d,
|
| | | ExchangeCountMax:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d,
|
| | | NeedItemCount:%d,
|
| | | NeedItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.ExchangeNum,
|
| | | self.ExchangeCountMax,
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind,
|
| | | self.NeedItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActCollectWordsInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号,1 或 2,相互独立的活动,可同时开启
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | LastDayOnlyExchange = 0 #(BYTE LastDayOnlyExchange)//最后一天是否仅兑换
|
| | | ExchangeCount = 0 #(BYTE ExchangeCount)
|
| | | ExchangeItemList = list() #(vector<tagMCActCollectWordsExchangeItem> ExchangeItemList)//兑换组合列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x40
|
| | | 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.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LastDayOnlyExchange,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ExchangeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ExchangeCount):
|
| | | temExchangeItemList = tagMCActCollectWordsExchangeItem()
|
| | | _pos = temExchangeItemList.ReadData(_lpData, _pos)
|
| | | self.ExchangeItemList.append(temExchangeItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x40
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.LastDayOnlyExchange = 0
|
| | | self.ExchangeCount = 0
|
| | | self.ExchangeItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.ExchangeCount):
|
| | | length += self.ExchangeItemList[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.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.LastDayOnlyExchange)
|
| | | data = CommFunc.WriteBYTE(data, self.ExchangeCount)
|
| | | for i in range(self.ExchangeCount):
|
| | | data = CommFunc.WriteString(data, self.ExchangeItemList[i].GetLength(), self.ExchangeItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | LastDayOnlyExchange:%d,
|
| | | ExchangeCount:%d,
|
| | | ExchangeItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.LastDayOnlyExchange,
|
| | | self.ExchangeCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActCollectWordsInfo=tagMCActCollectWordsInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActCollectWordsInfo.Head.Cmd,m_NAtagMCActCollectWordsInfo.Head.SubCmd))] = m_NAtagMCActCollectWordsInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 41 集字活动玩家信息 #tagMCActCollectWordsPlayerInfo
|
| | |
|
| | | class tagMCActCollectWordsExchangeInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ExchangeNum", c_ubyte), #兑换编号
|
| | | ("ExchangeCount", 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.ExchangeNum = 0
|
| | | self.ExchangeCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActCollectWordsExchangeInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 41 集字活动玩家信息 //tagMCActCollectWordsPlayerInfo:
|
| | | ExchangeNum:%d,
|
| | | ExchangeCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.ExchangeNum,
|
| | | self.ExchangeCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActCollectWordsPlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号,1 或 2,相互独立的活动,可同时开启
|
| | | ExchangeCount = 0 #(BYTE ExchangeCount)
|
| | | ExchangeInfoList = list() #(vector<tagMCActCollectWordsExchangeInfo> ExchangeInfoList)//兑换数据列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x41
|
| | | 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.ExchangeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ExchangeCount):
|
| | | temExchangeInfoList = tagMCActCollectWordsExchangeInfo()
|
| | | _pos = temExchangeInfoList.ReadData(_lpData, _pos)
|
| | | self.ExchangeInfoList.append(temExchangeInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x41
|
| | | self.ActNum = 0
|
| | | self.ExchangeCount = 0
|
| | | self.ExchangeInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.ExchangeCount):
|
| | | length += self.ExchangeInfoList[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.WriteBYTE(data, self.ExchangeCount)
|
| | | for i in range(self.ExchangeCount):
|
| | | data = CommFunc.WriteString(data, self.ExchangeInfoList[i].GetLength(), self.ExchangeInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | ExchangeCount:%d,
|
| | | ExchangeInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.ExchangeCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActCollectWordsPlayerInfo=tagMCActCollectWordsPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActCollectWordsPlayerInfo.Head.Cmd,m_NAtagMCActCollectWordsPlayerInfo.Head.SubCmd))] = m_NAtagMCActCollectWordsPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
|
| | |
|
| | | class tagMCActLoginAwardAction(Structure):
|