| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 84 骑宠养成活动信息 #tagMCActHorsePetTrainInfo
|
| | |
|
| | | class tagMCActHorsePetTrainItem(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(tagMCActHorsePetTrainItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 84 骑宠养成活动信息 //tagMCActHorsePetTrainInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActHorsePetTrainBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActHorsePetTrainItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActHorsePetTrainItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | 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 = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActHorsePetTrainInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | ShopType = 0 #(WORD ShopType)// 开放商店类型,可能为0不开放
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCActHorsePetTrainBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x84
|
| | | 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.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCActHorsePetTrainBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x84
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.LimitLV = 0
|
| | | self.ShopType = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[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.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteWORD(data, self.ShopType)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | LimitLV:%d,
|
| | | ShopType:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.LimitLV,
|
| | | self.ShopType,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActHorsePetTrainInfo=tagMCActHorsePetTrainInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetTrainInfo.Head.Cmd,m_NAtagMCActHorsePetTrainInfo.Head.SubCmd))] = m_NAtagMCActHorsePetTrainInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 85 骑宠养成活动玩家信息 #tagMCActHorsePetTrainPlayerInfo
|
| | |
|
| | | class tagMCActHorsePetTrainPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("Score", c_int), # 当前活动积分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x85
|
| | | 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 = 0x85
|
| | | self.ActNum = 0
|
| | | self.Score = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActHorsePetTrainPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 85 骑宠养成活动玩家信息 //tagMCActHorsePetTrainPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | Score:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.Score
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActHorsePetTrainPlayerInfo=tagMCActHorsePetTrainPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetTrainPlayerInfo.Cmd,m_NAtagMCActHorsePetTrainPlayerInfo.SubCmd))] = m_NAtagMCActHorsePetTrainPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
|
| | |
|
| | | class tagMCActLoginAwardAction(Structure):
|
| | |
| | |
|
| | | m_NAtagMCCrossActGubaoInfo=tagMCCrossActGubaoInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActGubaoInfo.Head.Cmd,m_NAtagMCCrossActGubaoInfo.Head.SubCmd))] = m_NAtagMCCrossActGubaoInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 86 骑宠养成跨服活动信息 #tagMCCrossActHorsePetTrainInfo
|
| | |
|
| | | class tagMCCrossActHorsePetTrainItem(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(tagMCCrossActHorsePetTrainItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 86 骑宠养成跨服活动信息 //tagMCCrossActHorsePetTrainInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActHorsePetTrainBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCCrossActHorsePetTrainItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCCrossActHorsePetTrainItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | 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 = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActHorsePetTrainInfo(Structure):
|
| | | Head = tagHead()
|
| | | ServerInfoLen = 0 #(BYTE ServerInfoLen)
|
| | | ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服
|
| | | GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | RankLimitPersonal = 0 #(WORD RankLimitPersonal)// 个人榜上榜积分保底限制;
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCCrossActHorsePetTrainBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x86
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen)
|
| | | self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.RankLimitPersonal,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCCrossActHorsePetTrainBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x86
|
| | | self.ServerInfoLen = 0
|
| | | self.ServerIDRangeInfo = ""
|
| | | self.GroupValue1 = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.RankLimitPersonal = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.ServerIDRangeInfo)
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ServerInfoLen)
|
| | | data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo)
|
| | | data = CommFunc.WriteBYTE(data, self.GroupValue1)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteWORD(data, self.RankLimitPersonal)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ServerInfoLen:%d,
|
| | | ServerIDRangeInfo:%s,
|
| | | GroupValue1:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | RankLimitPersonal:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ServerInfoLen,
|
| | | self.ServerIDRangeInfo,
|
| | | self.GroupValue1,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.RankLimitPersonal,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossActHorsePetTrainInfo=tagMCCrossActHorsePetTrainInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActHorsePetTrainInfo.Head.Cmd,m_NAtagMCCrossActHorsePetTrainInfo.Head.SubCmd))] = m_NAtagMCCrossActHorsePetTrainInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 12 培养功能境界信息 #tagMCTrainRealmLVInfo
|
| | |
|
| | | class tagMCTrainRealmLV(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("FuncType", c_ubyte), # 功能类型:1-坐骑;2-灵宠;3-灵器
|
| | | ("TrainRealmLV", 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.FuncType = 0
|
| | | self.TrainRealmLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTrainRealmLV)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 12 培养功能境界信息 //tagMCTrainRealmLVInfo:
|
| | | FuncType:%d,
|
| | | TrainRealmLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.FuncType,
|
| | | self.TrainRealmLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCTrainRealmLVInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | InfoList = list() #(vector<tagMCTrainRealmLV> InfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x12
|
| | | 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):
|
| | | temInfoList = tagMCTrainRealmLV()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x12
|
| | | self.Count = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.InfoList[i].GetLength()
|
| | |
|
| | | 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.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTrainRealmLVInfo=tagMCTrainRealmLVInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTrainRealmLVInfo.Head.Cmd,m_NAtagMCTrainRealmLVInfo.Head.SubCmd))] = m_NAtagMCTrainRealmLVInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 20 战令信息 #tagMCZhanlingInfo
|
| | |
|
| | | class tagMCZhanling(Structure):
|