| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 07 背包购买格子信息 #tagSCPackBuyInfo
|
| | |
|
| | | class tagSCPackBuy(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("PackType", c_ubyte), # 背包类型
|
| | | ("BuyCnt", 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.PackType = 0
|
| | | self.BuyCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCPackBuy)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A2 07 背包购买格子信息 //tagSCPackBuyInfo:
|
| | | PackType:%d,
|
| | | BuyCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.PackType,
|
| | | self.BuyCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCPackBuyInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | BuyInfoList = list() #(vector<tagSCPackBuy> BuyInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x07
|
| | | 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):
|
| | | temBuyInfoList = tagSCPackBuy()
|
| | | _pos = temBuyInfoList.ReadData(_lpData, _pos)
|
| | | self.BuyInfoList.append(temBuyInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x07
|
| | | self.Count = 0
|
| | | self.BuyInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.BuyInfoList[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.BuyInfoList[i].GetLength(), self.BuyInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | BuyInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCPackBuyInfo=tagSCPackBuyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCPackBuyInfo.Head.Cmd,m_NAtagSCPackBuyInfo.Head.SubCmd))] = m_NAtagSCPackBuyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 05 虚拟背包物品清空 #tagMCVPackClear
|
| | |
|
| | | class tagMCVPackClear(Structure):
|
| | |
| | |
|
| | | m_NAtagMCArrestTaskInfo=tagMCArrestTaskInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCArrestTaskInfo.Head.Cmd,m_NAtagMCArrestTaskInfo.Head.SubCmd))] = m_NAtagMCArrestTaskInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 39 玩家属性果实已使用个数信息#tagMCAttrFruitEatCntList
|
| | |
|
| | | class tagMCAttrFruitEatCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), #果实物品ID
|
| | | ("EatCnt", c_int), #已使用个数
|
| | | ("ItemAddCnt", c_int), #增幅丹增加上限
|
| | | ("ItemBreakCnt", c_int), #增幅丹突破次数
|
| | | ]
|
| | |
|
| | | 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.EatCnt = 0
|
| | | self.ItemAddCnt = 0
|
| | | self.ItemBreakCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCAttrFruitEatCnt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 39 玩家属性果实已使用个数信息//tagMCAttrFruitEatCntList:
|
| | | ItemID:%d,
|
| | | EatCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | ItemBreakCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.EatCnt,
|
| | | self.ItemAddCnt,
|
| | | self.ItemBreakCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCAttrFruitEatCntList(Structure):
|
| | | Head = tagHead()
|
| | | count = 0 #(BYTE count)//信息个数
|
| | | EatCntList = list() #(vector<tagMCAttrFruitEatCnt> EatCntList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x39
|
| | | 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):
|
| | | temEatCntList = tagMCAttrFruitEatCnt()
|
| | | _pos = temEatCntList.ReadData(_lpData, _pos)
|
| | | self.EatCntList.append(temEatCntList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x39
|
| | | self.count = 0
|
| | | self.EatCntList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.count):
|
| | | length += self.EatCntList[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.EatCntList[i].GetLength(), self.EatCntList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | count:%d,
|
| | | EatCntList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCAttrFruitEatCntList=tagMCAttrFruitEatCntList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAttrFruitEatCntList.Head.Cmd,m_NAtagMCAttrFruitEatCntList.Head.SubCmd))] = m_NAtagMCAttrFruitEatCntList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 07 缥缈奇遇信息 #tagMCFairyAdventuresInfo
|
| | |
|
| | | class tagMCFairyAdventuresData(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("EventID", c_ubyte), |
| | | ("Gear", c_ubyte), #第几档
|
| | | ("Condition", c_int), #条件
|
| | | ]
|
| | |
|
| | | 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.EventID = 0
|
| | | self.Gear = 0
|
| | | self.Condition = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFairyAdventuresData)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 07 缥缈奇遇信息 //tagMCFairyAdventuresInfo:
|
| | | EventID:%d,
|
| | | Gear:%d,
|
| | | Condition:%d
|
| | | '''\
|
| | | %(
|
| | | self.EventID,
|
| | | self.Gear,
|
| | | self.Condition
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFairyAdventuresInfo(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)
|
| | | InfoList = list() #(vector<tagMCFairyAdventuresData> InfoList)// 信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | temInfoList = tagMCFairyAdventuresData()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x07
|
| | | self.Cnt = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | 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.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFairyAdventuresInfo=tagMCFairyAdventuresInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFairyAdventuresInfo.Head.Cmd,m_NAtagMCFairyAdventuresInfo.Head.SubCmd))] = m_NAtagMCFairyAdventuresInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 06 缥缈仙域信息 #tagMCFairyDomainInfo
|
| | |
|
| | | class tagMCFairyDomainEvent(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("EventID", c_ushort), #事件ID
|
| | | ("EventState", c_ubyte), #事件状态 1-可拜访 2-拜访中 3-已拜访
|
| | | ]
|
| | |
|
| | | 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.EventID = 0
|
| | | self.EventState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFairyDomainEvent)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 06 缥缈仙域信息 //tagMCFairyDomainInfo:
|
| | | EventID:%d,
|
| | | EventState:%d
|
| | | '''\
|
| | | %(
|
| | | self.EventID,
|
| | | self.EventState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFairyDomainInfo(Structure):
|
| | | Head = tagHead()
|
| | | IsAll = 0 #(BYTE IsAll)//是否全部
|
| | | State = 0 #(BYTE State)//0-未寻访 1-寻访中 2-任务标记可寻访
|
| | | VisitCnt = 0 #(DWORD VisitCnt)//寻访次数
|
| | | Energy = 0 #(WORD Energy)//体力
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | InfoList = list() #(vector<tagMCFairyDomainEvent> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x06
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.VisitCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Energy,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temInfoList = tagMCFairyDomainEvent()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x06
|
| | | self.IsAll = 0
|
| | | self.State = 0
|
| | | self.VisitCnt = 0
|
| | | self.Energy = 0
|
| | | self.Count = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | 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.IsAll)
|
| | | data = CommFunc.WriteBYTE(data, self.State)
|
| | | data = CommFunc.WriteDWORD(data, self.VisitCnt)
|
| | | data = CommFunc.WriteWORD(data, self.Energy)
|
| | | 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,
|
| | | IsAll:%d,
|
| | | State:%d,
|
| | | VisitCnt:%d,
|
| | | Energy:%d,
|
| | | Count:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.IsAll,
|
| | | self.State,
|
| | | self.VisitCnt,
|
| | | self.Energy,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFairyDomainInfo=tagMCFairyDomainInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFairyDomainInfo.Head.Cmd,m_NAtagMCFairyDomainInfo.Head.SubCmd))] = m_NAtagMCFairyDomainInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 16 仙盟活跃信息通知 #tagMCFamilyActivityInfo
|
| | |
|
| | | class tagMCFamilyActionCnt(Structure):
|
| | |
| | |
|
| | | m_NAtagMCFuncOpenStateList=tagMCFuncOpenStateList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFuncOpenStateList.Head.Cmd,m_NAtagMCFuncOpenStateList.Head.SubCmd))] = m_NAtagMCFuncOpenStateList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 1E 玩家聚魂孔信息 #tagMCGatherSoulHoleInfo
|
| | |
|
| | | class tagMCGatherSoulHoleInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 孔信息数
|
| | | GatherSoulDataList = list() #(vector<DWORD> GatherSoulDataList)// 孔数据信息, 数据与背包数据相同
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x1E
|
| | | 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.GatherSoulDataList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x1E
|
| | | self.Count = 0
|
| | | self.GatherSoulDataList = 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.GatherSoulDataList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | GatherSoulDataList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGatherSoulHoleInfo=tagMCGatherSoulHoleInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherSoulHoleInfo.Head.Cmd,m_NAtagMCGatherSoulHoleInfo.Head.SubCmd))] = m_NAtagMCGatherSoulHoleInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 61 新聚魂孔信息 #tagMCGatherTheSoulHoleInfo
|
| | |
|
| | | class tagMCGatherTheSoulHoleInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 孔数
|
| | | HoleSoulList = list() #(vector<DWORD> HoleSoulList)// 孔聚魂ID列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x61
|
| | | 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.HoleSoulList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x61
|
| | | self.Count = 0
|
| | | self.HoleSoulList = 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.HoleSoulList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | HoleSoulList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGatherTheSoulHoleInfo=tagMCGatherTheSoulHoleInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherTheSoulHoleInfo.Head.Cmd,m_NAtagMCGatherTheSoulHoleInfo.Head.SubCmd))] = m_NAtagMCGatherTheSoulHoleInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 60 新聚魂信息 #tagMCGatherTheSoulInfo
|
| | |
|
| | | class tagMCGatherTheSoul(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("SoulID", c_int), |
| | | ("LV", 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.SoulID = 0
|
| | | self.LV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGatherTheSoul)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 60 新聚魂信息 //tagMCGatherTheSoulInfo:
|
| | | SoulID:%d,
|
| | | LV:%d
|
| | | '''\
|
| | | %(
|
| | | self.SoulID,
|
| | | self.LV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGatherTheSoulInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | SoulList = list() #(vector<tagMCGatherTheSoul> SoulList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x60
|
| | | 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):
|
| | | temSoulList = tagMCGatherTheSoul()
|
| | | _pos = temSoulList.ReadData(_lpData, _pos)
|
| | | self.SoulList.append(temSoulList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x60
|
| | | self.Count = 0
|
| | | self.SoulList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.SoulList[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.SoulList[i].GetLength(), self.SoulList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | SoulList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGatherTheSoulInfo=tagMCGatherTheSoulInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherTheSoulInfo.Head.Cmd,m_NAtagMCGatherTheSoulInfo.Head.SubCmd))] = m_NAtagMCGatherTheSoulInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagMCLianTiInfo=tagMCLianTiInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLianTiInfo.Cmd,m_NAtagMCLianTiInfo.SubCmd))] = m_NAtagMCLianTiInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo
|
| | |
|
| | | class tagMCMagicWeaponInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("MWID", c_int), |
| | | ("LV", c_ubyte), |
| | | ("Exp", c_int), |
| | | ("FBPassLV", c_ubyte), #副本关卡
|
| | | ("IsWear", 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.MWID = 0
|
| | | self.LV = 0
|
| | | self.Exp = 0
|
| | | self.FBPassLV = 0
|
| | | self.IsWear = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCMagicWeaponInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 52 法宝等级信息 //tagMCMagicWeaponLVInfo:
|
| | | MWID:%d,
|
| | | LV:%d,
|
| | | Exp:%d,
|
| | | FBPassLV:%d,
|
| | | IsWear:%d
|
| | | '''\
|
| | | %(
|
| | | self.MWID,
|
| | | self.LV,
|
| | | self.Exp,
|
| | | self.FBPassLV,
|
| | | self.IsWear
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCMagicWeaponLVInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | InfoList = list() #(vector<tagMCMagicWeaponInfo> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x52
|
| | | 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 = tagMCMagicWeaponInfo()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x52
|
| | | 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_NAtagMCMagicWeaponLVInfo=tagMCMagicWeaponLVInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponLVInfo.Head.Cmd,m_NAtagMCMagicWeaponLVInfo.Head.SubCmd))] = m_NAtagMCMagicWeaponLVInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 BA 通知试炼之塔过关数 #tagMCTrialTowerInfo
|
| | |
|
| | | class tagMCTrialTowerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PassLV", c_int), |
| | | ("YesterDayPassLV", c_int), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0xBA
|
| | | 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 = 0xBA
|
| | | self.PassLV = 0
|
| | | self.YesterDayPassLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTrialTowerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 BA 通知试炼之塔过关数 //tagMCTrialTowerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | PassLV:%d,
|
| | | YesterDayPassLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.PassLV,
|
| | | self.YesterDayPassLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTrialTowerInfo=tagMCTrialTowerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTrialTowerInfo.Cmd,m_NAtagMCTrialTowerInfo.SubCmd))] = m_NAtagMCTrialTowerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 05 扫荡奖励信息 #tagMCWipeOutPrize
|
| | |
|
| | | class tagMCPrizeItemInfo(Structure):
|
| | |
| | |
|
| | | m_NAtagMCXBXZAwardRecordList=tagMCXBXZAwardRecordList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCXBXZAwardRecordList.Head.Cmd,m_NAtagMCXBXZAwardRecordList.Head.SubCmd))] = m_NAtagMCXBXZAwardRecordList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A4 0C 多仙盟boss活动信息 #tagGCAllFamilyBossInfo
|
| | |
|
| | | class tagGCAllFamilyBossInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsEnd", c_ubyte), # 是否已结束
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA4
|
| | | self.SubCmd = 0x0C
|
| | | 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 = 0xA4
|
| | | self.SubCmd = 0x0C
|
| | | self.IsEnd = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCAllFamilyBossInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A4 0C 多仙盟boss活动信息 //tagGCAllFamilyBossInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsEnd:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsEnd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCAllFamilyBossInfo=tagGCAllFamilyBossInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAllFamilyBossInfo.Cmd,m_NAtagGCAllFamilyBossInfo.SubCmd))] = m_NAtagGCAllFamilyBossInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagGCFamilyBosFBInfo=tagGCFamilyBosFBInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilyBosFBInfo.Cmd,m_NAtagGCFamilyBosFBInfo.SubCmd))] = m_NAtagGCFamilyBosFBInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A4 02 家族boss副本开启及击杀信息 #tagGCFamilyBossFBInfo
|
| | |
|
| | | class tagGCFamilyBossFBInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOpen", c_int), # 是否已开启
|
| | | ("OpenCnt", c_ubyte), # 本周已开启次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA4
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xA4
|
| | | self.SubCmd = 0x02
|
| | | self.IsOpen = 0
|
| | | self.OpenCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCFamilyBossFBInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A4 02 家族boss副本开启及击杀信息 //tagGCFamilyBossFBInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOpen:%d,
|
| | | OpenCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOpen,
|
| | | self.OpenCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCFamilyBossFBInfo=tagGCFamilyBossFBInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilyBossFBInfo.Cmd,m_NAtagGCFamilyBossFBInfo.SubCmd))] = m_NAtagGCFamilyBossFBInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagGCFamilySWRHInfo=tagGCFamilySWRHInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilySWRHInfo.Cmd,m_NAtagGCFamilySWRHInfo.SubCmd))] = m_NAtagGCFamilySWRHInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A4 0B 玩家参与的仙盟联赛仙盟信息 #tagGCPlayerJoinFamilyWarInfo
|
| | |
|
| | | class tagGCPlayerJoinFamilyWarInfo(Structure):
|
| | | Head = tagHead()
|
| | | JoinFamilyID = 0 #(DWORD JoinFamilyID)//参与的仙盟ID,默认0本仙盟,仙盟不同时才会收到本包
|
| | | JoinFamilyNameLen = 0 #(BYTE JoinFamilyNameLen)
|
| | | JoinFamilyName = "" #(String JoinFamilyName)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA4
|
| | | self.Head.SubCmd = 0x0B
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.JoinFamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.JoinFamilyNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.JoinFamilyName,_pos = CommFunc.ReadString(_lpData, _pos,self.JoinFamilyNameLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA4
|
| | | self.Head.SubCmd = 0x0B
|
| | | self.JoinFamilyID = 0
|
| | | self.JoinFamilyNameLen = 0
|
| | | self.JoinFamilyName = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.JoinFamilyName)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.JoinFamilyID)
|
| | | data = CommFunc.WriteBYTE(data, self.JoinFamilyNameLen)
|
| | | data = CommFunc.WriteString(data, self.JoinFamilyNameLen, self.JoinFamilyName)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | JoinFamilyID:%d,
|
| | | JoinFamilyNameLen:%d,
|
| | | JoinFamilyName:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.JoinFamilyID,
|
| | | self.JoinFamilyNameLen,
|
| | | self.JoinFamilyName
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCPlayerJoinFamilyWarInfo=tagGCPlayerJoinFamilyWarInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerJoinFamilyWarInfo.Head.Cmd,m_NAtagGCPlayerJoinFamilyWarInfo.Head.SubCmd))] = m_NAtagGCPlayerJoinFamilyWarInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 15 通知仙盟抢Boss伤血信息 #tagMCFamilyBossHurtList
|
| | |
|
| | | class tagMCFamilyBossHurt(Structure):
|
| | | FamilyID = 0 #(DWORD FamilyID)// 所属仙盟ID
|
| | | HurtID = 0 #(DWORD HurtID)// 伤血的ID, 根据伤血类型表示不同的ID, 如仙盟ID或玩家ID
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | HurtName = "" #(String HurtName)
|
| | | HurtValue = 0 #(DWORD HurtValue)// 累计伤血,求余1亿的值
|
| | | HurtValueEx = 0 #(DWORD HurtValueEx)// 累计伤血,整除1亿的值
|
| | | InitTick = 0 #(DWORD InitTick)// 伤血初始tick,用于排序,先按伤血倒序排,再按tick正序排
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HurtID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HurtName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.HurtValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HurtValueEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.InitTick,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.FamilyID = 0
|
| | | self.HurtID = 0
|
| | | self.NameLen = 0
|
| | | self.HurtName = ""
|
| | | self.HurtValue = 0
|
| | | self.HurtValueEx = 0
|
| | | self.InitTick = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.HurtName)
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.FamilyID)
|
| | | data = CommFunc.WriteDWORD(data, self.HurtID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.HurtName)
|
| | | data = CommFunc.WriteDWORD(data, self.HurtValue)
|
| | | data = CommFunc.WriteDWORD(data, self.HurtValueEx)
|
| | | data = CommFunc.WriteDWORD(data, self.InitTick)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | FamilyID:%d,
|
| | | HurtID:%d,
|
| | | NameLen:%d,
|
| | | HurtName:%s,
|
| | | HurtValue:%d,
|
| | | HurtValueEx:%d,
|
| | | InitTick:%d
|
| | | '''\
|
| | | %(
|
| | | self.FamilyID,
|
| | | self.HurtID,
|
| | | self.NameLen,
|
| | | self.HurtName,
|
| | | self.HurtValue,
|
| | | self.HurtValueEx,
|
| | | self.InitTick
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFamilyBossHurtList(Structure):
|
| | | Head = tagHead()
|
| | | ObjID = 0 #(DWORD ObjID)
|
| | | NPCID = 0 #(DWORD NPCID)
|
| | | HurtType = 0 #(BYTE HurtType)// 0-实时仙盟伤血,1-历史仙盟伤血,2-实时玩家伤血,3-历史玩家伤血
|
| | | IsSort = 0 #(BYTE IsSort)// 是否排序过的,一般boss被击杀后会统一同步一次排序过的最终结果,其他情况下客户端自己排序
|
| | | HurtCount = 0 #(WORD HurtCount)// 伤血个数
|
| | | HurtList = list() #(vector<tagMCFamilyBossHurt> HurtList)// 伤血列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x15
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HurtType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsSort,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HurtCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.HurtCount):
|
| | | temHurtList = tagMCFamilyBossHurt()
|
| | | _pos = temHurtList.ReadData(_lpData, _pos)
|
| | | self.HurtList.append(temHurtList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x15
|
| | | self.ObjID = 0
|
| | | self.NPCID = 0
|
| | | self.HurtType = 0
|
| | | self.IsSort = 0
|
| | | self.HurtCount = 0
|
| | | self.HurtList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.HurtCount):
|
| | | length += self.HurtList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.ObjID)
|
| | | data = CommFunc.WriteDWORD(data, self.NPCID)
|
| | | data = CommFunc.WriteBYTE(data, self.HurtType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsSort)
|
| | | data = CommFunc.WriteWORD(data, self.HurtCount)
|
| | | for i in range(self.HurtCount):
|
| | | data = CommFunc.WriteString(data, self.HurtList[i].GetLength(), self.HurtList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ObjID:%d,
|
| | | NPCID:%d,
|
| | | HurtType:%d,
|
| | | IsSort:%d,
|
| | | HurtCount:%d,
|
| | | HurtList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ObjID,
|
| | | self.NPCID,
|
| | | self.HurtType,
|
| | | self.IsSort,
|
| | | self.HurtCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFamilyBossHurtList=tagMCFamilyBossHurtList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyBossHurtList.Head.Cmd,m_NAtagMCFamilyBossHurtList.Head.SubCmd))] = m_NAtagMCFamilyBossHurtList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 03 通知进入副本时间 #tagMCFBEnterTickList
|
| | |
|
| | | class tagMCFBEnterTick(Structure):
|
| | |
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int),
|
| | | ("Count", c_int), |
| | | ("Count", c_int), # 求余亿部分,个别功能单次汇总可能超20亿,如批量遣散,固统一规则
|
| | | ("CountEx", c_int), # 整除亿部分
|
| | | ("IsBind", c_ubyte),
|
| | | ]
|
| | |
|
| | |
| | | def Clear(self):
|
| | | self.ItemID = 0
|
| | | self.Count = 0
|
| | | self.CountEx = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | |
| | | DumpString = '''// A8 01 获得奖励信息 //tagMCGiveAwardInfo:
|
| | | ItemID:%d,
|
| | | Count:%d,
|
| | | CountEx:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.Count,
|
| | | self.CountEx,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 14 合成结果通知 #tagMCMakeItemAnswer
|
| | | # A8 14 操作结果通知 #tagMCMakeItemAnswer
|
| | |
|
| | | class tagMCMakeItemAnswer(Structure):
|
| | | _pack_ = 1
|
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("MakeType", c_ubyte), #类型 TMakeItemType
|
| | | ("Result", c_ubyte), #是否成功
|
| | | ("MakeItemID", c_int), #合成的物品ID
|
| | | ("MakeValue", c_int), #操作值,如合成时为合成的物品ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.SubCmd = 0x14
|
| | | self.MakeType = 0
|
| | | self.Result = 0
|
| | | self.MakeItemID = 0
|
| | | self.MakeValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A8 14 合成结果通知 //tagMCMakeItemAnswer:
|
| | | DumpString = '''// A8 14 操作结果通知 //tagMCMakeItemAnswer:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MakeType:%d,
|
| | | Result:%d,
|
| | | MakeItemID:%d
|
| | | MakeValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MakeType,
|
| | | self.Result,
|
| | | self.MakeItemID
|
| | | self.MakeValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | m_NAtagGCRecommendFriendsInfo=tagGCRecommendFriendsInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRecommendFriendsInfo.Head.Cmd,m_NAtagGCRecommendFriendsInfo.Head.SubCmd))] = m_NAtagGCRecommendFriendsInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 AD 通知天星塔全服奖励通关玩家信息 #tagGCSkyTowerPassPlayerInfo
|
| | |
|
| | | class tagGCSkyTowerPassPlayer(Structure):
|
| | | PlayerID = 0 #(DWORD PlayerID)
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | Job = 0 #(BYTE Job)
|
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | FacePic = 0 #(DWORD FacePic)//头像框
|
| | | 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.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FacePic,_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.Face = 0
|
| | | self.FacePic = 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.Face)
|
| | | data = CommFunc.WriteDWORD(data, self.FacePic)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | Face:%d,
|
| | | FacePic:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.Face,
|
| | | self.FacePic
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCSkyTowerPassFloor(Structure):
|
| | | FloorID = 0 #(DWORD FloorID)// 层ID
|
| | | PassPlayerCount = 0 #(BYTE PassPlayerCount)// 通关记录玩家数
|
| | | PassPlayerIDList = list() #(vector<DWORD> PassPlayerIDList)// 通关记录玩家ID列表 [第1个通过玩家ID, 第2个, ...]
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.FloorID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PassPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PassPlayerCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.PassPlayerIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.FloorID = 0
|
| | | self.PassPlayerCount = 0
|
| | | self.PassPlayerIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4 * self.PassPlayerCount
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.FloorID)
|
| | | data = CommFunc.WriteBYTE(data, self.PassPlayerCount)
|
| | | for i in range(self.PassPlayerCount):
|
| | | data = CommFunc.WriteDWORD(data, self.PassPlayerIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | FloorID:%d,
|
| | | PassPlayerCount:%d,
|
| | | PassPlayerIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.FloorID,
|
| | | self.PassPlayerCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCSkyTowerPassPlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | FloorCount = 0 #(WORD FloorCount)
|
| | | PassFloorList = list() #(vector<tagGCSkyTowerPassFloor> PassFloorList)// 通关塔层信息列表
|
| | | PlayerCount = 0 #(WORD PlayerCount)
|
| | | PassPlayerList = list() #(vector<tagGCSkyTowerPassPlayer> PassPlayerList)// 通关玩家信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0xAD
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FloorCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.FloorCount):
|
| | | temPassFloorList = tagGCSkyTowerPassFloor()
|
| | | _pos = temPassFloorList.ReadData(_lpData, _pos)
|
| | | self.PassFloorList.append(temPassFloorList)
|
| | | self.PlayerCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.PlayerCount):
|
| | | temPassPlayerList = tagGCSkyTowerPassPlayer()
|
| | | _pos = temPassPlayerList.ReadData(_lpData, _pos)
|
| | | self.PassPlayerList.append(temPassPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0xAD
|
| | | self.FloorCount = 0
|
| | | self.PassFloorList = list()
|
| | | self.PlayerCount = 0
|
| | | self.PassPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.FloorCount):
|
| | | length += self.PassFloorList[i].GetLength()
|
| | | length += 2
|
| | | for i in range(self.PlayerCount):
|
| | | length += self.PassPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.FloorCount)
|
| | | for i in range(self.FloorCount):
|
| | | data = CommFunc.WriteString(data, self.PassFloorList[i].GetLength(), self.PassFloorList[i].GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.PlayerCount)
|
| | | for i in range(self.PlayerCount):
|
| | | data = CommFunc.WriteString(data, self.PassPlayerList[i].GetLength(), self.PassPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FloorCount:%d,
|
| | | PassFloorList:%s,
|
| | | PlayerCount:%d,
|
| | | PassPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FloorCount,
|
| | | "...",
|
| | | self.PlayerCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCSkyTowerPassPlayerInfo=tagGCSkyTowerPassPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSkyTowerPassPlayerInfo.Head.Cmd,m_NAtagGCSkyTowerPassPlayerInfo.Head.SubCmd))] = m_NAtagGCSkyTowerPassPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 10 仙盟抢Boss所有Boss伤血进度信息 #tagGCAllFamilyBossHurtInfoList
|
| | |
|
| | | class tagGCFamilyBossHurtInfo(Structure):
|
| | | NPCID = 0 #(DWORD NPCID)
|
| | | CurHP = 0 #(DWORD CurHP)
|
| | | CurHPEx = 0 #(DWORD CurHPEx)
|
| | | MaxHP = 0 #(DWORD MaxHP)
|
| | | MaxHPEx = 0 #(DWORD MaxHPEx)
|
| | | FamilyID = 0 #(DWORD FamilyID)// 最大实时伤血仙盟
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | FamilyName = "" #(String FamilyName)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.NPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.CurHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.CurHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MaxHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MaxHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FamilyName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.NPCID = 0
|
| | | self.CurHP = 0
|
| | | self.CurHPEx = 0
|
| | | self.MaxHP = 0
|
| | | self.MaxHPEx = 0
|
| | | self.FamilyID = 0
|
| | | self.NameLen = 0
|
| | | self.FamilyName = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.FamilyName)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.NPCID)
|
| | | data = CommFunc.WriteDWORD(data, self.CurHP)
|
| | | data = CommFunc.WriteDWORD(data, self.CurHPEx)
|
| | | data = CommFunc.WriteDWORD(data, self.MaxHP)
|
| | | data = CommFunc.WriteDWORD(data, self.MaxHPEx)
|
| | | data = CommFunc.WriteDWORD(data, self.FamilyID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.FamilyName)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | NPCID:%d,
|
| | | CurHP:%d,
|
| | | CurHPEx:%d,
|
| | | MaxHP:%d,
|
| | | MaxHPEx:%d,
|
| | | FamilyID:%d,
|
| | | NameLen:%d,
|
| | | FamilyName:%s
|
| | | '''\
|
| | | %(
|
| | | self.NPCID,
|
| | | self.CurHP,
|
| | | self.CurHPEx,
|
| | | self.MaxHP,
|
| | | self.MaxHPEx,
|
| | | self.FamilyID,
|
| | | self.NameLen,
|
| | | self.FamilyName
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCAllFamilyBossHurtInfoList(Structure):
|
| | | Head = tagHead()
|
| | | NPCCount = 0 #(BYTE NPCCount)// 个数
|
| | | NPCHurtInfo = list() #(vector<tagGCFamilyBossHurtInfo> NPCHurtInfo)// NPC伤血信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.NPCCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.NPCCount):
|
| | | temNPCHurtInfo = tagGCFamilyBossHurtInfo()
|
| | | _pos = temNPCHurtInfo.ReadData(_lpData, _pos)
|
| | | self.NPCHurtInfo.append(temNPCHurtInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x10
|
| | | self.NPCCount = 0
|
| | | self.NPCHurtInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.NPCCount):
|
| | | length += self.NPCHurtInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.NPCCount)
|
| | | for i in range(self.NPCCount):
|
| | | data = CommFunc.WriteString(data, self.NPCHurtInfo[i].GetLength(), self.NPCHurtInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | NPCCount:%d,
|
| | | NPCHurtInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.NPCCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCAllFamilyBossHurtInfoList=tagGCAllFamilyBossHurtInfoList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAllFamilyBossHurtInfoList.Head.Cmd,m_NAtagGCAllFamilyBossHurtInfoList.Head.SubCmd))] = m_NAtagGCAllFamilyBossHurtInfoList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 08 boss复活点数通知 #tagGCBossRebornPoint
|
| | |
|
| | | class tagGCBossRebornPoint(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 09 仙界盛典活动信息 #tagGCFairyCeremonyInfo
|
| | |
|
| | | class tagGCFairyCeremonyInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | WorldLV = 0 #(WORD WorldLV)// 世界等级
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x09
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.WorldLV = 0
|
| | | self.LimitLV = 0
|
| | | self.ResetType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteWORD(data, self.WorldLV)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.ResetType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | WorldLV:%d,
|
| | | LimitLV:%d,
|
| | | ResetType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.WorldLV,
|
| | | self.LimitLV,
|
| | | self.ResetType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCFairyCeremonyInfo=tagGCFairyCeremonyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFairyCeremonyInfo.Head.Cmd,m_NAtagGCFairyCeremonyInfo.Head.SubCmd))] = m_NAtagGCFairyCeremonyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 01 仙盟联赛信息通知 #tagGCFamilyWarInfo
|
| | |
|
| | | class tagGCFamilyWarInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("WorldLV", c_ushort), # 当前进行中的联赛世界等级
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAC
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAC
|
| | | self.SubCmd = 0x01
|
| | | self.WorldLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCFamilyWarInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AC 01 仙盟联赛信息通知 //tagGCFamilyWarInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | WorldLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.WorldLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCFamilyWarInfo=tagGCFamilyWarInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilyWarInfo.Cmd,m_NAtagGCFamilyWarInfo.SubCmd))] = m_NAtagGCFamilyWarInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 11 节日红包活动信息 #tagGCFeastRedPacketInfo
|
| | |
|
| | | class tagGCFeastRedPacketDay(Structure):
|
| | |
| | |
|
| | | m_NAtagGCFeastRedPacketInfo=tagGCFeastRedPacketInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFeastRedPacketInfo.Head.Cmd,m_NAtagGCFeastRedPacketInfo.Head.SubCmd))] = m_NAtagGCFeastRedPacketInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 02 通知仙魔之争信息 #tagGCXMZZInfo
|
| | |
|
| | | class tagGCXMZZInfo(Structure):
|
| | | Head = tagHead()
|
| | | Len = 0 #(WORD Len)
|
| | | StageRecord = "" #(String StageRecord)// 阶段胜负记录
|
| | | Score1 = 0 #(DWORD Score1)// 仙界阵营积分
|
| | | Score2 = 0 #(DWORD Score2)// 魔界阵营积分
|
| | | TopScore = 0 #(DWORD TopScore)// 积分第1名积分
|
| | | TopName = "" #(char TopName[33])// 积分第1名名字
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.StageRecord,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | self.Score1,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Score2,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TopScore,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TopName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x02
|
| | | self.Len = 0
|
| | | self.StageRecord = ""
|
| | | self.Score1 = 0
|
| | | self.Score2 = 0
|
| | | self.TopScore = 0
|
| | | self.TopName = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | length += len(self.StageRecord)
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 33
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.StageRecord)
|
| | | data = CommFunc.WriteDWORD(data, self.Score1)
|
| | | data = CommFunc.WriteDWORD(data, self.Score2)
|
| | | data = CommFunc.WriteDWORD(data, self.TopScore)
|
| | | data = CommFunc.WriteString(data, 33, self.TopName)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Len:%d,
|
| | | StageRecord:%s,
|
| | | Score1:%d,
|
| | | Score2:%d,
|
| | | TopScore:%d,
|
| | | TopName:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Len,
|
| | | self.StageRecord,
|
| | | self.Score1,
|
| | | self.Score2,
|
| | | self.TopScore,
|
| | | self.TopName
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCXMZZInfo=tagGCXMZZInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZInfo.Head.Cmd,m_NAtagGCXMZZInfo.Head.SubCmd))] = m_NAtagGCXMZZInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 03 通知仙魔之争自己信息 #tagGCXMZZSelfInfo
|
| | |
|
| | | class tagGCXMZZSelfInfo(Structure):
|
| | | Head = tagHead()
|
| | | Faction = 0 #(BYTE Faction)// 所属阵营
|
| | | Score = 0 #(DWORD Score)// 积分
|
| | | WinCnt = 0 #(BYTE WinCnt)// 胜场数
|
| | | WinCntAwardRecord = 0 #(DWORD WinCntAwardRecord)// 胜场奖励领取记录
|
| | | Len = 0 #(WORD Len)// 押注记录
|
| | | BetRecord = "" #(String BetRecord)// 押注记录
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x03
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.WinCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.WinCntAwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.BetRecord,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x03
|
| | | self.Faction = 0
|
| | | self.Score = 0
|
| | | self.WinCnt = 0
|
| | | self.WinCntAwardRecord = 0
|
| | | self.Len = 0
|
| | | self.BetRecord = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | length += len(self.BetRecord)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Faction)
|
| | | data = CommFunc.WriteDWORD(data, self.Score)
|
| | | data = CommFunc.WriteBYTE(data, self.WinCnt)
|
| | | data = CommFunc.WriteDWORD(data, self.WinCntAwardRecord)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.BetRecord)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Faction:%d,
|
| | | Score:%d,
|
| | | WinCnt:%d,
|
| | | WinCntAwardRecord:%d,
|
| | | Len:%d,
|
| | | BetRecord:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Faction,
|
| | | self.Score,
|
| | | self.WinCnt,
|
| | | self.WinCntAwardRecord,
|
| | | self.Len,
|
| | | self.BetRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCXMZZSelfInfo=tagGCXMZZSelfInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZSelfInfo.Head.Cmd,m_NAtagGCXMZZSelfInfo.Head.SubCmd))] = m_NAtagGCXMZZSelfInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 07 骑宠Boss信息 #tagGCHorsePetBossInfo
|
| | |
|
| | | class tagGCHorsePetBossInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsEnd", c_int), # 是否已结束(按位代表对应线路是否结束)
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAC
|
| | | self.SubCmd = 0x07
|
| | | 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 = 0xAC
|
| | | self.SubCmd = 0x07
|
| | | self.IsEnd = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCHorsePetBossInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AC 07 骑宠Boss信息 //tagGCHorsePetBossInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsEnd:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsEnd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCHorsePetBossInfo=tagGCHorsePetBossInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHorsePetBossInfo.Cmd,m_NAtagGCHorsePetBossInfo.SubCmd))] = m_NAtagGCHorsePetBossInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 0B 新仙界盛典活动信息 #tagGCNewFairyCeremonyInfo
|
| | |
|
| | | class tagGCNewFairyCeremonyInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | WorldLV = 0 #(WORD WorldLV)// 世界等级
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x0B
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x0B
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.WorldLV = 0
|
| | | self.LimitLV = 0
|
| | | self.ResetType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteWORD(data, self.WorldLV)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.ResetType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | WorldLV:%d,
|
| | | LimitLV:%d,
|
| | | ResetType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.WorldLV,
|
| | | self.LimitLV,
|
| | | self.ResetType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCNewFairyCeremonyInfo=tagGCNewFairyCeremonyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCNewFairyCeremonyInfo.Head.Cmd,m_NAtagGCNewFairyCeremonyInfo.Head.SubCmd))] = m_NAtagGCNewFairyCeremonyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 05 红包删除 #tagGCRedPacketDel
|
| | |
|
| | | class tagGCRedPacketDel(Structure):
|
| | |
| | |
|
| | | m_NAtagGCRedPacketDel=tagGCRedPacketDel()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRedPacketDel.Head.Cmd,m_NAtagGCRedPacketDel.Head.SubCmd))] = m_NAtagGCRedPacketDel
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 04 通知仙魔之争对战信息 #tagGCXMZZFightInfo
|
| | |
|
| | | class tagGCXMZZFightInfo(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)//玩家ID
|
| | | PropDataSize = 0 #(DWORD PropDataSize)
|
| | | PropData = "" #(String PropData)//属性记录
|
| | | ItemDataSize = 0 #(DWORD ItemDataSize)
|
| | | ItemData = "" #(String ItemData)//物品记录
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x04
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PropDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PropData,_pos = CommFunc.ReadString(_lpData, _pos,self.PropDataSize)
|
| | | self.ItemDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemDataSize)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x04
|
| | | self.PlayerID = 0
|
| | | self.PropDataSize = 0
|
| | | self.PropData = ""
|
| | | self.ItemDataSize = 0
|
| | | self.ItemData = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += len(self.PropData)
|
| | | length += 4
|
| | | length += len(self.ItemData)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteDWORD(data, self.PropDataSize)
|
| | | data = CommFunc.WriteString(data, self.PropDataSize, self.PropData)
|
| | | data = CommFunc.WriteDWORD(data, self.ItemDataSize)
|
| | | data = CommFunc.WriteString(data, self.ItemDataSize, self.ItemData)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerID:%d,
|
| | | PropDataSize:%d,
|
| | | PropData:%s,
|
| | | ItemDataSize:%d,
|
| | | ItemData:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerID,
|
| | | self.PropDataSize,
|
| | | self.PropData,
|
| | | self.ItemDataSize,
|
| | | self.ItemData
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCXMZZFightInfo=tagGCXMZZFightInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZFightInfo.Head.Cmd,m_NAtagGCXMZZFightInfo.Head.SubCmd))] = m_NAtagGCXMZZFightInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 23 每日掉落战利品信息 #tagSCDropBootyInfo
|
| | |
|
| | | class tagSCDropBooty(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), # 战利品ID
|
| | | ("TodayDropCnt", c_int), # 今日已掉落数量
|
| | | ]
|
| | |
|
| | | 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.TodayDropCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCDropBooty)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 23 每日掉落战利品信息 //tagSCDropBootyInfo:
|
| | | ItemID:%d,
|
| | | TodayDropCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.TodayDropCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCDropBootyInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)
|
| | | DropBootyList = list() #(vector<tagSCDropBooty> DropBootyList)//每日已掉落战利品信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x23
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temDropBootyList = tagSCDropBooty()
|
| | | _pos = temDropBootyList.ReadData(_lpData, _pos)
|
| | | self.DropBootyList.append(temDropBootyList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x23
|
| | | self.Count = 0
|
| | | self.DropBootyList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.DropBootyList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.DropBootyList[i].GetLength(), self.DropBootyList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | DropBootyList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCDropBootyInfo=tagSCDropBootyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCDropBootyInfo.Head.Cmd,m_NAtagSCDropBootyInfo.Head.SubCmd))] = m_NAtagSCDropBootyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 17 头像信息 #tagMCFaceInfo
|
| | |
|
| | | class tagMCFace(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 24 阵容信息 #tagSCLineupInfo
|
| | |
|
| | | class tagSCLineup(Structure):
|
| | | LineupID = 0 #(BYTE LineupID)// 阵容ID
|
| | | ShapeType = 0 #(BYTE ShapeType)// 阵型
|
| | | HeroCnt = 0 #(BYTE HeroCnt)
|
| | | HeroItemIndexList = list() #(vector<WORD> HeroItemIndexList)// 所在武将背包索引+1列表 [站位1物品索引+1, 站位2, ...],站位无武将时为0
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HeroCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HeroCnt):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.HeroItemIndexList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.LineupID = 0
|
| | | self.ShapeType = 0
|
| | | self.HeroCnt = 0
|
| | | self.HeroItemIndexList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2 * self.HeroCnt
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.LineupID)
|
| | | data = CommFunc.WriteBYTE(data, self.ShapeType)
|
| | | data = CommFunc.WriteBYTE(data, self.HeroCnt)
|
| | | for i in range(self.HeroCnt):
|
| | | data = CommFunc.WriteWORD(data, self.HeroItemIndexList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | LineupID:%d,
|
| | | ShapeType:%d,
|
| | | HeroCnt:%d,
|
| | | HeroItemIndexList:%s
|
| | | '''\
|
| | | %(
|
| | | self.LineupID,
|
| | | self.ShapeType,
|
| | | self.HeroCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCLineupInfo(Structure):
|
| | | Head = tagHead()
|
| | | LineupCnt = 0 #(BYTE LineupCnt)
|
| | | LineupList = list() #(vector<tagSCLineup> LineupList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x24
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.LineupCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.LineupCnt):
|
| | | temLineupList = tagSCLineup()
|
| | | _pos = temLineupList.ReadData(_lpData, _pos)
|
| | | self.LineupList.append(temLineupList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x24
|
| | | self.LineupCnt = 0
|
| | | self.LineupList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.LineupCnt):
|
| | | length += self.LineupList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.LineupCnt)
|
| | | for i in range(self.LineupCnt):
|
| | | data = CommFunc.WriteString(data, self.LineupList[i].GetLength(), self.LineupList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | LineupCnt:%d,
|
| | | LineupList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.LineupCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCLineupInfo=tagSCLineupInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLineupInfo.Head.Cmd,m_NAtagSCLineupInfo.Head.SubCmd))] = m_NAtagSCLineupInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove
|
| | |
|
| | | class tagMCNotifyPlayerMove(Structure):
|
| | |
| | |
|
| | | m_NAtagMCPlayerDeadTime=tagMCPlayerDeadTime()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerDeadTime.Cmd,m_NAtagMCPlayerDeadTime.SubCmd))] = m_NAtagMCPlayerDeadTime
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 25 玩家武将公共信息 #tagSCPlayerHeroInfo
|
| | |
|
| | | class tagSCPlayerHeroInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("AwakeRebirthCnt", c_ubyte), # 今日觉醒过的武将已重生次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x25
|
| | | 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 = 0xB1
|
| | | self.SubCmd = 0x25
|
| | | self.AwakeRebirthCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCPlayerHeroInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 25 玩家武将公共信息 //tagSCPlayerHeroInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | AwakeRebirthCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AwakeRebirthCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCPlayerHeroInfo=tagSCPlayerHeroInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCPlayerHeroInfo.Cmd,m_NAtagSCPlayerHeroInfo.SubCmd))] = m_NAtagSCPlayerHeroInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 10 仙盟联赛玩家排名信息 #tagMCFamilyWarBillboard
|
| | |
|
| | | class tagMCFamilyWarPlayer(Structure):
|
| | | PlayerID = 0 #(DWORD PlayerID)//玩家ID
|
| | | PlayerNameLen = 0 #(BYTE PlayerNameLen)//玩家名称
|
| | | PlayerName = "" #(String PlayerName)//size = PlayerNameLen
|
| | | Faction = 0 #(BYTE Faction)//阵营
|
| | | CrystalCount = 0 #(BYTE CrystalCount)//占领水晶数
|
| | | RandBuffCount = 0 #(BYTE RandBuffCount)//抢夺随机buff数
|
| | | KillPlayerCount = 0 #(BYTE KillPlayerCount)//击杀数
|
| | | FightTime = 0 #(WORD FightTime)// 战斗时长,单位秒
|
| | | Point = 0 #(DWORD Point)// 积分
|
| | | 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.PlayerNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.PlayerNameLen)
|
| | | self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CrystalCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RandBuffCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.KillPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FightTime,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.PlayerID = 0
|
| | | self.PlayerNameLen = 0
|
| | | self.PlayerName = ""
|
| | | self.Faction = 0
|
| | | self.CrystalCount = 0
|
| | | self.RandBuffCount = 0
|
| | | self.KillPlayerCount = 0
|
| | | self.FightTime = 0
|
| | | self.Point = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.PlayerName)
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.PlayerNameLen)
|
| | | data = CommFunc.WriteString(data, self.PlayerNameLen, self.PlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Faction)
|
| | | data = CommFunc.WriteBYTE(data, self.CrystalCount)
|
| | | data = CommFunc.WriteBYTE(data, self.RandBuffCount)
|
| | | data = CommFunc.WriteBYTE(data, self.KillPlayerCount)
|
| | | data = CommFunc.WriteWORD(data, self.FightTime)
|
| | | data = CommFunc.WriteDWORD(data, self.Point)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | PlayerID:%d,
|
| | | PlayerNameLen:%d,
|
| | | PlayerName:%s,
|
| | | Faction:%d,
|
| | | CrystalCount:%d,
|
| | | RandBuffCount:%d,
|
| | | KillPlayerCount:%d,
|
| | | FightTime:%d,
|
| | | Point:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | | self.PlayerNameLen,
|
| | | self.PlayerName,
|
| | | self.Faction,
|
| | | self.CrystalCount,
|
| | | self.RandBuffCount,
|
| | | self.KillPlayerCount,
|
| | | self.FightTime,
|
| | | self.Point
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFamilyWarBillboard(Structure):
|
| | | Head = tagHead()
|
| | | GroupID = 0 #(BYTE GroupID)// 联赛组级别, 5-S,4-A,3-B,2-C,1-D
|
| | | WinFaction = 0 #(BYTE WinFaction)// 获胜仙盟阵营,为0时代表非结算信息
|
| | | TotalFightTime = 0 #(WORD TotalFightTime)// 总战斗时长,单位秒,结算信息时才有值
|
| | | BillboardCount = 0 #(BYTE BillboardCount)
|
| | | FBBillboardPlayer = list() #(vector<tagMCFamilyWarPlayer> FBBillboardPlayer)//size = BillboardCount
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.GroupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.WinFaction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TotalFightTime,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.BillboardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BillboardCount):
|
| | | temFBBillboardPlayer = tagMCFamilyWarPlayer()
|
| | | _pos = temFBBillboardPlayer.ReadData(_lpData, _pos)
|
| | | self.FBBillboardPlayer.append(temFBBillboardPlayer)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x10
|
| | | self.GroupID = 0
|
| | | self.WinFaction = 0
|
| | | self.TotalFightTime = 0
|
| | | self.BillboardCount = 0
|
| | | self.FBBillboardPlayer = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.BillboardCount):
|
| | | length += self.FBBillboardPlayer[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.GroupID)
|
| | | data = CommFunc.WriteBYTE(data, self.WinFaction)
|
| | | data = CommFunc.WriteWORD(data, self.TotalFightTime)
|
| | | data = CommFunc.WriteBYTE(data, self.BillboardCount)
|
| | | for i in range(self.BillboardCount):
|
| | | data = CommFunc.WriteString(data, self.FBBillboardPlayer[i].GetLength(), self.FBBillboardPlayer[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | GroupID:%d,
|
| | | WinFaction:%d,
|
| | | TotalFightTime:%d,
|
| | | BillboardCount:%d,
|
| | | FBBillboardPlayer:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.GroupID,
|
| | | self.WinFaction,
|
| | | self.TotalFightTime,
|
| | | self.BillboardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFamilyWarBillboard=tagMCFamilyWarBillboard()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyWarBillboard.Head.Cmd,m_NAtagMCFamilyWarBillboard.Head.SubCmd))] = m_NAtagMCFamilyWarBillboard
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 15 副本买buff信息通知 #tagMCFBBuyBuffInfo
|
| | |
|
| | | class tagMCFBBuyBuffTime(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 06 助战召唤结果 #tagMCHelpBattleCallResult
|
| | |
|
| | | class tagMCHelpBattleCallResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), # 助战实例ID
|
| | | ("PlayerID", c_int), # 助战镜像ID,大于1小于100代表机器人,如果是机器人前端按顺序自己记录对应实例ID代表已召唤
|
| | | ("Job", c_ubyte), # ְҵ
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x06
|
| | | 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 = 0x06
|
| | | self.ObjID = 0
|
| | | self.PlayerID = 0
|
| | | self.Job = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHelpBattleCallResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 06 助战召唤结果 //tagMCHelpBattleCallResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | PlayerID:%d,
|
| | | Job:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.PlayerID,
|
| | | self.Job
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleCallResult=tagMCHelpBattleCallResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCallResult.Cmd,m_NAtagMCHelpBattleCallResult.SubCmd))] = m_NAtagMCHelpBattleCallResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 05 助战登记结果 #tagMCHelpBattleCheckInResult
|
| | |
|
| | | class tagMCHelpBattleCheckInResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOK", c_ubyte), #是否成功
|
| | | ("IsLogin", c_ubyte), #是否登录同步已登记
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x05
|
| | | 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 = 0x05
|
| | | self.IsOK = 0
|
| | | self.IsLogin = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCHelpBattleCheckInResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 05 助战登记结果 //tagMCHelpBattleCheckInResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOK:%d,
|
| | | IsLogin:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOK,
|
| | | self.IsLogin
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleCheckInResult=tagMCHelpBattleCheckInResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCheckInResult.Cmd,m_NAtagMCHelpBattleCheckInResult.SubCmd))] = m_NAtagMCHelpBattleCheckInResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 07 助战机器人列表 #tagMCHelpBattleList
|
| | |
|
| | | class tagMCHelpBattlePlayer(Structure):
|
| | | ObjID = 0 #(DWORD ObjID)// 实例ID, 0代表未召唤
|
| | | PlayerID = 0 #(DWORD PlayerID)// 助战镜像ID, 大于1小于100代表机器人,如果是机器人,没有以下信息,相关信息自己读配置
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | Name = "" #(String Name)// 玩家名,size = NameLen
|
| | | LV = 0 #(WORD LV)// 玩家等级
|
| | | Job = 0 #(BYTE Job)// 玩家职业, 如果是机器人,则职业有值,服务端控制
|
| | | RealmLV = 0 #(WORD RealmLV)// 玩家境界等级
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | FacePic = 0 #(DWORD FacePic)//头像框
|
| | | FightPower = 0 #(DWORD FightPower)// 玩家战力
|
| | | Relation = 0 #(BYTE Relation)// 关系:0-无,1-好友,2-盟友
|
| | | IsNeedGold = 0 #(BYTE IsNeedGold)// 是否需要仙玉召唤
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Relation,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsNeedGold,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.ObjID = 0
|
| | | self.PlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.Name = ""
|
| | | self.LV = 0
|
| | | self.Job = 0
|
| | | self.RealmLV = 0
|
| | | self.Face = 0
|
| | | self.FacePic = 0
|
| | | self.FightPower = 0
|
| | | self.Relation = 0
|
| | | self.IsNeedGold = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.Name)
|
| | | length += 2
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.ObjID)
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.Name)
|
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteBYTE(data, self.Job)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | data = CommFunc.WriteDWORD(data, self.FacePic)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteBYTE(data, self.Relation)
|
| | | data = CommFunc.WriteBYTE(data, self.IsNeedGold)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | ObjID:%d,
|
| | | PlayerID:%d,
|
| | | NameLen:%d,
|
| | | Name:%s,
|
| | | LV:%d,
|
| | | Job:%d,
|
| | | RealmLV:%d,
|
| | | Face:%d,
|
| | | FacePic:%d,
|
| | | FightPower:%d,
|
| | | Relation:%d,
|
| | | IsNeedGold:%d
|
| | | '''\
|
| | | %(
|
| | | self.ObjID,
|
| | | self.PlayerID,
|
| | | self.NameLen,
|
| | | self.Name,
|
| | | self.LV,
|
| | | self.Job,
|
| | | self.RealmLV,
|
| | | self.Face,
|
| | | self.FacePic,
|
| | | self.FightPower,
|
| | | self.Relation,
|
| | | self.IsNeedGold
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCHelpBattleList(Structure):
|
| | | Head = tagHead()
|
| | | RefreshCount = 0 #(BYTE RefreshCount)// 已刷新次数
|
| | | HelpCount = 0 #(BYTE HelpCount)// 助战个数
|
| | | HelpPlayerList = list() #(vector<tagMCHelpBattlePlayer> HelpPlayerList)// 助战镜像信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HelpCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HelpCount):
|
| | | temHelpPlayerList = tagMCHelpBattlePlayer()
|
| | | _pos = temHelpPlayerList.ReadData(_lpData, _pos)
|
| | | self.HelpPlayerList.append(temHelpPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x07
|
| | | self.RefreshCount = 0
|
| | | self.HelpCount = 0
|
| | | self.HelpPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.HelpCount):
|
| | | length += self.HelpPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RefreshCount)
|
| | | data = CommFunc.WriteBYTE(data, self.HelpCount)
|
| | | for i in range(self.HelpCount):
|
| | | data = CommFunc.WriteString(data, self.HelpPlayerList[i].GetLength(), self.HelpPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RefreshCount:%d,
|
| | | HelpCount:%d,
|
| | | HelpPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RefreshCount,
|
| | | self.HelpCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleList=tagMCHelpBattleList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleList.Head.Cmd,m_NAtagMCHelpBattleList.Head.SubCmd))] = m_NAtagMCHelpBattleList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 11 助战记录列表 #tagMCHelpBattleRecordList
|
| | |
|
| | | class tagMCHelpBattleRecord(Structure):
|
| | | CallPlayerID = 0 #(DWORD CallPlayerID)// 邀请助战的玩家ID
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | CallPlayerName = "" #(String CallPlayerName)// 邀请助战的玩家名,size = NameLen
|
| | | MapID = 0 #(DWORD MapID)
|
| | | FuncLineID = 0 #(BYTE FuncLineID)
|
| | | XianyuanCoinAdd = 0 #(WORD XianyuanCoinAdd)// 增加的仙缘币,0代表已达上限
|
| | | Relation = 0 #(BYTE Relation)// 当时的关系:0-无,1-好友,2-盟友
|
| | | VIPLV = 0 #(BYTE VIPLV)// 当时的VIP等级
|
| | | HelpTime = "" #(char HelpTime[19])// 助战时间yyyy-MM-dd hh:mm:ss
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.CallPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CallPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncLineID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.XianyuanCoinAdd,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Relation,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.VIPLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HelpTime,_pos = CommFunc.ReadString(_lpData, _pos,19)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.CallPlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.CallPlayerName = ""
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.XianyuanCoinAdd = 0
|
| | | self.Relation = 0
|
| | | self.VIPLV = 0
|
| | | self.HelpTime = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.CallPlayerName)
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 19
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.CallPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.CallPlayerName)
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteBYTE(data, self.FuncLineID)
|
| | | data = CommFunc.WriteWORD(data, self.XianyuanCoinAdd)
|
| | | data = CommFunc.WriteBYTE(data, self.Relation)
|
| | | data = CommFunc.WriteBYTE(data, self.VIPLV)
|
| | | data = CommFunc.WriteString(data, 19, self.HelpTime)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | CallPlayerID:%d,
|
| | | NameLen:%d,
|
| | | CallPlayerName:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | XianyuanCoinAdd:%d,
|
| | | Relation:%d,
|
| | | VIPLV:%d,
|
| | | HelpTime:%s
|
| | | '''\
|
| | | %(
|
| | | self.CallPlayerID,
|
| | | self.NameLen,
|
| | | self.CallPlayerName,
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.XianyuanCoinAdd,
|
| | | self.Relation,
|
| | | self.VIPLV,
|
| | | self.HelpTime
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCHelpBattleRecordList(Structure):
|
| | | Head = tagHead()
|
| | | RecordCount = 0 #(WORD RecordCount)// 记录数
|
| | | RecordList = list() #(vector<tagMCHelpBattleRecord> RecordList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x11
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RecordCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.RecordCount):
|
| | | temRecordList = tagMCHelpBattleRecord()
|
| | | _pos = temRecordList.ReadData(_lpData, _pos)
|
| | | self.RecordList.append(temRecordList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x11
|
| | | self.RecordCount = 0
|
| | | self.RecordList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.RecordCount):
|
| | | length += self.RecordList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.RecordCount)
|
| | | for i in range(self.RecordCount):
|
| | | data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RecordCount:%d,
|
| | | RecordList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RecordCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCHelpBattleRecordList=tagMCHelpBattleRecordList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleRecordList.Head.Cmd,m_NAtagMCHelpBattleRecordList.Head.SubCmd))] = m_NAtagMCHelpBattleRecordList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 04 冰晶矿脉信息通知 #tagMCIceLodeInfo
|
| | |
|
| | | class tagMCIceLodeInfo(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)// 今日玩法数量
|
| | | LineList = list() #(vector<BYTE> LineList)// 玩法列表
|
| | | AwardRecord = 0 #(DWORD AwardRecord)// 领奖记录
|
| | | HasSweep = 0 #(BYTE HasSweep)// 是否已扫荡
|
| | | DayLV = 0 #(WORD DayLV)// 今日等级
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x04
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Cnt):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.LineList.append(value)
|
| | | self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HasSweep,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.DayLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x04
|
| | | self.Cnt = 0
|
| | | self.LineList = list()
|
| | | self.AwardRecord = 0
|
| | | self.HasSweep = 0
|
| | | self.DayLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1 * self.Cnt
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Cnt)
|
| | | for i in range(self.Cnt):
|
| | | data = CommFunc.WriteBYTE(data, self.LineList[i])
|
| | | data = CommFunc.WriteDWORD(data, self.AwardRecord)
|
| | | data = CommFunc.WriteBYTE(data, self.HasSweep)
|
| | | data = CommFunc.WriteWORD(data, self.DayLV)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | LineList:%s,
|
| | | AwardRecord:%d,
|
| | | HasSweep:%d,
|
| | | DayLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "...",
|
| | | self.AwardRecord,
|
| | | self.HasSweep,
|
| | | self.DayLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCIceLodeInfo=tagMCIceLodeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCIceLodeInfo.Head.Cmd,m_NAtagMCIceLodeInfo.Head.SubCmd))] = m_NAtagMCIceLodeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 03 公共副本扫荡信息 #tagMCPubFBSweepData
|
| | |
|
| | | class tagMCPubFBSweep(Structure):
|
| | |
| | |
|
| | | m_NAtagMCPubFBSweepData=tagMCPubFBSweepData()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPubFBSweepData.Head.Cmd,m_NAtagMCPubFBSweepData.Head.SubCmd))] = m_NAtagMCPubFBSweepData
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 17 境界塔信息 #tagMCRealmTowerInfo
|
| | |
|
| | | class tagMCRealmTowerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Floor", c_int), # 已通关层
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x17
|
| | | 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 = 0x17
|
| | | self.Floor = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCRealmTowerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 17 境界塔信息 //tagMCRealmTowerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Floor:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Floor
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCRealmTowerInfo=tagMCRealmTowerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRealmTowerInfo.Cmd,m_NAtagMCRealmTowerInfo.SubCmd))] = m_NAtagMCRealmTowerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 13 天星塔通关层数 #tagMCSkyTowerInfo
|
| | |
|
| | | class tagMCSkyTowerServerReward(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Floor", c_int), # 全服奖励层ID
|
| | | ("ServerRewardRecord", c_int), #该层全服领奖记录,按所需人数作为二进制位进行位运算判断是否已领取
|
| | | ]
|
| | |
|
| | | 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.Floor = 0
|
| | | self.ServerRewardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCSkyTowerServerReward)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 13 天星塔通关层数 //tagMCSkyTowerInfo:
|
| | | Floor:%d,
|
| | | ServerRewardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Floor,
|
| | | self.ServerRewardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCSkyTowerInfo(Structure):
|
| | | Head = tagHead()
|
| | | Floor = 0 #(DWORD Floor)// 已通关层
|
| | | ServerRewardCount = 0 #(WORD ServerRewardCount)
|
| | | ServerRewardList = list() #(vector<tagMCSkyTowerServerReward> ServerRewardList)// 全服奖励领取记录列表,下发的层记录替换更新即可,领奖记录没有变化时服务端不会下发
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x13
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Floor,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ServerRewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.ServerRewardCount):
|
| | | temServerRewardList = tagMCSkyTowerServerReward()
|
| | | _pos = temServerRewardList.ReadData(_lpData, _pos)
|
| | | self.ServerRewardList.append(temServerRewardList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x13
|
| | | self.Floor = 0
|
| | | self.ServerRewardCount = 0
|
| | | self.ServerRewardList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 2
|
| | | for i in range(self.ServerRewardCount):
|
| | | length += self.ServerRewardList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.Floor)
|
| | | data = CommFunc.WriteWORD(data, self.ServerRewardCount)
|
| | | for i in range(self.ServerRewardCount):
|
| | | data = CommFunc.WriteString(data, self.ServerRewardList[i].GetLength(), self.ServerRewardList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Floor:%d,
|
| | | ServerRewardCount:%d,
|
| | | ServerRewardList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Floor,
|
| | | self.ServerRewardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCSkyTowerInfo=tagMCSkyTowerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Head.Cmd,m_NAtagMCSkyTowerInfo.Head.SubCmd))] = m_NAtagMCSkyTowerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagMCPushNotificationsSetting=tagMCPushNotificationsSetting()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPushNotificationsSetting.Head.Cmd,m_NAtagMCPushNotificationsSetting.Head.SubCmd))] = m_NAtagMCPushNotificationsSetting
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 12 诛仙BOSS协助次数 #tagMCZhuXianBossCnt
|
| | |
|
| | | class tagMCZhuXianBossCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Cnt", c_ubyte), # 剩余可协助次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x12
|
| | | 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 = 0x12
|
| | | self.Cnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCZhuXianBossCnt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 12 诛仙BOSS协助次数 //tagMCZhuXianBossCnt:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Cnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Cnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 29 Buff消失 #tagSCBuffDel
|
| | |
|
| | | class tagSCBuffDel(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), |
| | | ("BuffID", c_int), |
| | | ("RelatedSkillID", c_int), # 关联的技能ID,一般是主技能ID或由于某个技能释放引起的buff变更
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x29
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x29
|
| | | self.ObjID = 0
|
| | | self.BuffID = 0
|
| | | self.RelatedSkillID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCBuffDel)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 29 Buff消失 //tagSCBuffDel:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | BuffID:%d,
|
| | | RelatedSkillID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.BuffID,
|
| | | self.RelatedSkillID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCBuffDel=tagSCBuffDel()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBuffDel.Cmd,m_NAtagSCBuffDel.SubCmd))] = m_NAtagSCBuffDel
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 28 Buff刷新 #tagSCBuffRefresh
|
| | |
|
| | | class tagSCBuffRefresh(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), # 谁身上的buff
|
| | | ("BuffID", c_int), # buffID,某个obj上的唯一buffID,不同的buffID可能skillID相同
|
| | | ("SkillID", c_int), # 该buff对应技能表ID
|
| | | ("RelatedSkillID", c_int), # 关联的技能ID,一般是主技能ID或由于某个技能释放引起的buff变更
|
| | | ("LastTime", c_int), # 剩余时长毫秒/回合数
|
| | | ("Layer", c_ushort), # 层数,不需要默认0
|
| | | ("OwnerID", c_int), # buff来源者,即施法方
|
| | | ("Value1", c_int), |
| | | ("Value2", c_int), |
| | | ("Value3", c_int), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x28
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x28
|
| | | self.ObjID = 0
|
| | | self.BuffID = 0
|
| | | self.SkillID = 0
|
| | | self.RelatedSkillID = 0
|
| | | self.LastTime = 0
|
| | | self.Layer = 0
|
| | | self.OwnerID = 0
|
| | | self.Value1 = 0
|
| | | self.Value2 = 0
|
| | | self.Value3 = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCBuffRefresh)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 28 Buff刷新 //tagSCBuffRefresh:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | BuffID:%d,
|
| | | SkillID:%d,
|
| | | RelatedSkillID:%d,
|
| | | LastTime:%d,
|
| | | Layer:%d,
|
| | | OwnerID:%d,
|
| | | Value1:%d,
|
| | | Value2:%d,
|
| | | Value3:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.BuffID,
|
| | | self.SkillID,
|
| | | self.RelatedSkillID,
|
| | | self.LastTime,
|
| | | self.Layer,
|
| | | self.OwnerID,
|
| | | self.Value1,
|
| | | self.Value2,
|
| | | self.Value3
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCBuffRefresh=tagSCBuffRefresh()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBuffRefresh.Cmd,m_NAtagSCBuffRefresh.SubCmd))] = m_NAtagSCBuffRefresh
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 12 删除恶意攻击玩家 #tagMCDelMaliciousAtkPlayer
|
| | |
|
| | | class tagMCDelMaliciousAtkPlayer(Structure):
|
| | |
| | |
|
| | | m_NAtagMCNPCSkillWarn=tagMCNPCSkillWarn()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCSkillWarn.Head.Cmd,m_NAtagMCNPCSkillWarn.Head.SubCmd))] = m_NAtagMCNPCSkillWarn
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 18 对象属性刷新展示 #tagSCObjPropertyRefreshView
|
| | |
|
| | | class tagSCObjPropertyRefreshView(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), |
| | | ("RefreshType", c_ushort), # 同0418刷新类型,如血量、怒气
|
| | | ("AttackTypes", c_int), # 飘字类型汇总,支持多种类型并存,如无视防御且暴击同时被格挡,二进制或运算最终值;0-失败;1-普通;2-回血;5-格挡;6-无视防御;7-暴击;9-闪避
|
| | | ("Value", c_int), # 更新值
|
| | | ("ValueEx", c_int), # 更新值,如果是大数值的此值为整除亿部分
|
| | | ("DiffType", c_ubyte), # 变化类型,0-减少;1-增加
|
| | | ("DiffValue", c_int), # 变化值
|
| | | ("DiffValueEx", c_int), # 变化值,如果是大数值的此值为整除亿部分
|
| | | ("SkillID", c_int), # 使用的技能表ID
|
| | | ("RelatedSkillID", c_int), # 关联的技能ID,一般是主技能ID,非主技能额外触发的为0
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x18
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x18
|
| | | self.ObjID = 0
|
| | | self.RefreshType = 0
|
| | | self.AttackTypes = 0
|
| | | self.Value = 0
|
| | | self.ValueEx = 0
|
| | | self.DiffType = 0
|
| | | self.DiffValue = 0
|
| | | self.DiffValueEx = 0
|
| | | self.SkillID = 0
|
| | | self.RelatedSkillID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCObjPropertyRefreshView)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 18 对象属性刷新展示 //tagSCObjPropertyRefreshView:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | RefreshType:%d,
|
| | | AttackTypes:%d,
|
| | | Value:%d,
|
| | | ValueEx:%d,
|
| | | DiffType:%d,
|
| | | DiffValue:%d,
|
| | | DiffValueEx:%d,
|
| | | SkillID:%d,
|
| | | RelatedSkillID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.RefreshType,
|
| | | self.AttackTypes,
|
| | | self.Value,
|
| | | self.ValueEx,
|
| | | self.DiffType,
|
| | | self.DiffValue,
|
| | | self.DiffValueEx,
|
| | | self.SkillID,
|
| | | self.RelatedSkillID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCObjPropertyRefreshView=tagSCObjPropertyRefreshView()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCObjPropertyRefreshView.Cmd,m_NAtagSCObjPropertyRefreshView.SubCmd))] = m_NAtagSCObjPropertyRefreshView
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 24 回合战斗初始化 #tagSCTurnFightInit
|
| | |
|
| | | class tagSCTurnFightObj(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ObjID", c_int), # 战斗单位唯一ID
|
| | | ("NPCID", c_int), # 战斗NPCID,不同的实例ID对应的NPCID可能一样
|
| | | ("HeroID", c_int), # 玩家武将ID,仅玩家阵容有
|
| | | ("SkinID", c_int), # 玩家武将皮肤ID,仅玩家阵容有
|
| | | ("HP", c_int), # 当前血量,求余20亿部分
|
| | | ("HPEx", c_int), # 当前血量,整除20亿部分
|
| | | ("MaxHP", c_int), # 最大血量,求余20亿部分
|
| | | ("MaxHPEx", c_int), # 最大血量,整除20亿部分
|
| | | ("LV", c_ushort), # 等级
|
| | | ("PosNum", c_ubyte), # 在本阵容中的站位,从1开始,非主战斗武将为0,如红颜
|
| | | ("AngreXP", 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.ObjID = 0
|
| | | self.NPCID = 0
|
| | | self.HeroID = 0
|
| | | self.SkinID = 0
|
| | | self.HP = 0
|
| | | self.HPEx = 0
|
| | | self.MaxHP = 0
|
| | | self.MaxHPEx = 0
|
| | | self.LV = 0
|
| | | self.PosNum = 0
|
| | | self.AngreXP = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCTurnFightObj)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 24 回合战斗初始化 //tagSCTurnFightInit:
|
| | | ObjID:%d,
|
| | | NPCID:%d,
|
| | | HeroID:%d,
|
| | | SkinID:%d,
|
| | | HP:%d,
|
| | | HPEx:%d,
|
| | | MaxHP:%d,
|
| | | MaxHPEx:%d,
|
| | | LV:%d,
|
| | | PosNum:%d,
|
| | | AngreXP:%d
|
| | | '''\
|
| | | %(
|
| | | self.ObjID,
|
| | | self.NPCID,
|
| | | self.HeroID,
|
| | | self.SkinID,
|
| | | self.HP,
|
| | | self.HPEx,
|
| | | self.MaxHP,
|
| | | self.MaxHPEx,
|
| | | self.LV,
|
| | | self.PosNum,
|
| | | self.AngreXP
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCTurnFightLineup(Structure):
|
| | | Num = 0 #(BYTE Num)// 该阵容在本阵营的编号,不同阵营的阵容编号可能相同,都是从1开始,一般1V1时每个阵营为1个阵容,多V多时则每个阵营为多个阵容
|
| | | OwnerID = 0 #(DWORD OwnerID)// 阵容所属的玩家ID,可能为0,0代表非玩家阵容
|
| | | ShapeType = 0 #(BYTE ShapeType)// 本阵容阵型,0为默认阵型,可扩展不同的阵型,如boss特殊战斗阵型,或者其他不同站位的阵型
|
| | | ObjCnt = 0 #(BYTE ObjCnt)
|
| | | ObjList = list() #(vector<tagSCTurnFightObj> ObjList)// 本阵容战斗单位列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Num,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.OwnerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ObjCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ObjCnt):
|
| | | temObjList = tagSCTurnFightObj()
|
| | | _pos = temObjList.ReadData(_lpData, _pos)
|
| | | self.ObjList.append(temObjList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Num = 0
|
| | | self.OwnerID = 0
|
| | | self.ShapeType = 0
|
| | | self.ObjCnt = 0
|
| | | self.ObjList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.ObjCnt):
|
| | | length += self.ObjList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.Num)
|
| | | data = CommFunc.WriteDWORD(data, self.OwnerID)
|
| | | data = CommFunc.WriteBYTE(data, self.ShapeType)
|
| | | data = CommFunc.WriteBYTE(data, self.ObjCnt)
|
| | | for i in range(self.ObjCnt):
|
| | | data = CommFunc.WriteString(data, self.ObjList[i].GetLength(), self.ObjList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Num:%d,
|
| | | OwnerID:%d,
|
| | | ShapeType:%d,
|
| | | ObjCnt:%d,
|
| | | ObjList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Num,
|
| | | self.OwnerID,
|
| | | self.ShapeType,
|
| | | self.ObjCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCTurnFightFaction(Structure):
|
| | | Faction = 0 #(BYTE Faction)//阵营编号,1或2,1为发起方的阵营编号
|
| | | LineupCnt = 0 #(BYTE LineupCnt)
|
| | | LineupList = list() #(vector<tagSCTurnFightLineup> LineupList)// 本阵营所有阵容列表,为支持多V多扩展用,通常情况下每个阵营只有一个阵容
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LineupCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.LineupCnt):
|
| | | temLineupList = tagSCTurnFightLineup()
|
| | | _pos = temLineupList.ReadData(_lpData, _pos)
|
| | | self.LineupList.append(temLineupList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Faction = 0
|
| | | self.LineupCnt = 0
|
| | | self.LineupList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.LineupCnt):
|
| | | length += self.LineupList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.Faction)
|
| | | data = CommFunc.WriteBYTE(data, self.LineupCnt)
|
| | | for i in range(self.LineupCnt):
|
| | | data = CommFunc.WriteString(data, self.LineupList[i].GetLength(), self.LineupList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Faction:%d,
|
| | | LineupCnt:%d,
|
| | | LineupList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Faction,
|
| | | self.LineupCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCTurnFightInit(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等)
|
| | | FuncLineID = 0 #(DWORD FuncLineID)// MapID对应的扩展值,如具体某个关卡等
|
| | | TurnMax = 0 #(BYTE TurnMax)// 最大轮次
|
| | | Len = 0 #(WORD Len)
|
| | | Msg = "" #(String Msg)// 本场战斗扩展信息,一般为json格式,具体内容由MapID决定
|
| | | FactionCnt = 0 #(BYTE FactionCnt)
|
| | | FactionList = list() #(vector<tagSCTurnFightFaction> FactionList)// 阵营列表,通常固定只有两个阵营
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x24
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TurnMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Msg,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | self.FactionCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FactionCnt):
|
| | | temFactionList = tagSCTurnFightFaction()
|
| | | _pos = temFactionList.ReadData(_lpData, _pos)
|
| | | self.FactionList.append(temFactionList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x24
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.TurnMax = 0
|
| | | self.Len = 0
|
| | | self.Msg = ""
|
| | | self.FactionCnt = 0
|
| | | self.FactionList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Msg)
|
| | | length += 1
|
| | | for i in range(self.FactionCnt):
|
| | | length += self.FactionList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteDWORD(data, self.FuncLineID)
|
| | | data = CommFunc.WriteBYTE(data, self.TurnMax)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Msg)
|
| | | data = CommFunc.WriteBYTE(data, self.FactionCnt)
|
| | | for i in range(self.FactionCnt):
|
| | | data = CommFunc.WriteString(data, self.FactionList[i].GetLength(), self.FactionList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | TurnMax:%d,
|
| | | Len:%d,
|
| | | Msg:%s,
|
| | | FactionCnt:%d,
|
| | | FactionList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.TurnMax,
|
| | | self.Len,
|
| | | self.Msg,
|
| | | self.FactionCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCTurnFightInit=tagSCTurnFightInit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTurnFightInit.Head.Cmd,m_NAtagSCTurnFightInit.Head.SubCmd))] = m_NAtagSCTurnFightInit
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 21 回合战斗对象开始行动 #tagMCTurnFightObjAction
|
| | |
|
| | | class tagMCTurnFightObjAction(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TurnNum", c_ubyte), # 当前轮次
|
| | | ("ObjID", c_int), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x21
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x21
|
| | | self.TurnNum = 0
|
| | | self.ObjID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTurnFightObjAction)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 21 回合战斗对象开始行动 //tagMCTurnFightObjAction:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TurnNum:%d,
|
| | | ObjID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TurnNum,
|
| | | self.ObjID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTurnFightObjAction=tagMCTurnFightObjAction()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightObjAction.Cmd,m_NAtagMCTurnFightObjAction.SubCmd))] = m_NAtagMCTurnFightObjAction
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 22 回合战斗对象死亡 #tagMCTurnFightObjDead
|
| | |
|
| | | class tagMCTurnFightObjDead(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), |
| | | ("KillerObjID", c_int), # 被谁击杀的,可能为0 |
| | | ("SkillID", c_int), # 被什么技能击杀,可能为0 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x22
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x22
|
| | | self.ObjID = 0
|
| | | self.KillerObjID = 0
|
| | | self.SkillID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTurnFightObjDead)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 22 回合战斗对象死亡 //tagMCTurnFightObjDead:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | KillerObjID:%d,
|
| | | SkillID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.KillerObjID,
|
| | | self.SkillID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTurnFightObjDead=tagMCTurnFightObjDead()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightObjDead.Cmd,m_NAtagMCTurnFightObjDead.SubCmd))] = m_NAtagMCTurnFightObjDead
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 23 回合战斗对象复活 #tagMCTurnFightObjReborn
|
| | |
|
| | | class tagMCTurnFightObjReborn(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), |
| | | ("HP", c_int), # 复活后血量,求余亿部分
|
| | | ("HPEx", c_int), # 复活后血量,整除亿部分
|
| | | ("RebornType", c_ubyte), # 复活方式:1-灵宠技能复活;2-待扩展
|
| | | ("RebornValue1", c_int), # 复活方式对应值1,由复活方式决定其值意义
|
| | | ("RebornValue2", c_int), # 复活方式对应值2
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x23
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x23
|
| | | self.ObjID = 0
|
| | | self.HP = 0
|
| | | self.HPEx = 0
|
| | | self.RebornType = 0
|
| | | self.RebornValue1 = 0
|
| | | self.RebornValue2 = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTurnFightObjReborn)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 23 回合战斗对象复活 //tagMCTurnFightObjReborn:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | HP:%d,
|
| | | HPEx:%d,
|
| | | RebornType:%d,
|
| | | RebornValue1:%d,
|
| | | RebornValue2:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.HP,
|
| | | self.HPEx,
|
| | | self.RebornType,
|
| | | self.RebornValue1,
|
| | | self.RebornValue2
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTurnFightObjReborn=tagMCTurnFightObjReborn()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightObjReborn.Cmd,m_NAtagMCTurnFightObjReborn.SubCmd))] = m_NAtagMCTurnFightObjReborn
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 30 查看战报结果 #tagSCTurnFightReportRet
|
| | |
|
| | | class tagSCTurnFightReport(Structure):
|
| | | Head = tagHead()
|
| | | GUID = "" #(char GUID[40])//该战报guid
|
| | | Len = 0 #(DWORD Len)
|
| | | Report = "" #(String Report)//完整战报
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x30
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | self.Len,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Report,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x30
|
| | | self.GUID = ""
|
| | | self.Len = 0
|
| | | self.Report = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 40
|
| | | length += 4
|
| | | length += len(self.Report)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 40, self.GUID)
|
| | | data = CommFunc.WriteDWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Report)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | GUID:%s,
|
| | | Len:%d,
|
| | | Report:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.GUID,
|
| | | self.Len,
|
| | | self.Report
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 25 回合战斗战报片段标记 #tagSCTurnFightReportSign
|
| | |
|
| | | class tagSCTurnFightReportSign(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Sign", c_ubyte), # 0-战报片段开始;1-战报片段结束;
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x25
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x25
|
| | | self.Sign = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCTurnFightReportSign)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 25 回合战斗战报片段标记 //tagSCTurnFightReportSign:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Sign:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Sign
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCTurnFightReportSign=tagSCTurnFightReportSign()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTurnFightReportSign.Cmd,m_NAtagSCTurnFightReportSign.SubCmd))] = m_NAtagSCTurnFightReportSign
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 20 回合制战斗状态 #tagMCTurnFightState
|
| | |
|
| | | class tagMCTurnFightState(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等)
|
| | | FuncLineID = 0 #(WORD FuncLineID)
|
| | | TagType = 0 #(BYTE TagType)// 战斗目标类型,0-NPC,1-玩家,2-队伍
|
| | | TagID = 0 #(DWORD TagID)// 战斗目标类型对应的ID
|
| | | MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等)
|
| | | FuncLineID = 0 #(DWORD FuncLineID)// MapID对应的扩展值,如具体某个关卡等
|
| | | State = 0 #(BYTE State)// 0-起始状态标记;1-准备完毕;2-战斗中;3-战斗结束;4-结算奖励;5-结束状态标记
|
| | | TurnNum = 0 #(BYTE TurnNum)// 当前轮次
|
| | | TurnMax = 0 #(BYTE TurnMax)// 最大轮次
|
| | | Len = 0 #(WORD Len)
|
| | | Msg = "" #(String Msg)//size = Len
|
| | | data = None
|
| | |
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncLineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.TagType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TagID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TurnNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TurnMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Msg,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
| | | self.Head.SubCmd = 0x20
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.TagType = 0
|
| | | self.TagID = 0
|
| | | self.State = 0
|
| | | self.TurnNum = 0
|
| | | self.TurnMax = 0
|
| | | self.Len = 0
|
| | | self.Msg = ""
|
| | | return
|
| | |
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | |
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteWORD(data, self.FuncLineID)
|
| | | data = CommFunc.WriteBYTE(data, self.TagType)
|
| | | data = CommFunc.WriteDWORD(data, self.TagID)
|
| | | data = CommFunc.WriteDWORD(data, self.FuncLineID)
|
| | | data = CommFunc.WriteBYTE(data, self.State)
|
| | | data = CommFunc.WriteBYTE(data, self.TurnNum)
|
| | | data = CommFunc.WriteBYTE(data, self.TurnMax)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Msg)
|
| | | return data
|
| | |
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | TagType:%d,
|
| | | TagID:%d,
|
| | | State:%d,
|
| | | TurnNum:%d,
|
| | | TurnMax:%d,
|
| | | Len:%d,
|
| | | Msg:%s
|
| | | '''\
|
| | |
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.TagType,
|
| | | self.TagID,
|
| | | self.State,
|
| | | self.TurnNum,
|
| | | self.TurnMax,
|
| | | self.Len,
|
| | | self.Msg
|
| | | )
|
| | |
| | |
|
| | | m_NAtagMCTurnFightState=tagMCTurnFightState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightState.Head.Cmd,m_NAtagMCTurnFightState.Head.SubCmd))] = m_NAtagMCTurnFightState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 26 回合战斗标签 #tagSCTurnFightTag
|
| | |
|
| | | class tagSCTurnFightTag(Structure):
|
| | | Head = tagHead()
|
| | | Len = 0 #(BYTE Len)
|
| | | Tag = "" #(String Tag)// 标签,释放技能的标签格式: Skill_objID_skillID,其他标签格式可再扩展
|
| | | Sign = 0 #(BYTE Sign)// 0-标签头;1-标签尾;
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x26
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Tag,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | self.Sign,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x26
|
| | | self.Len = 0
|
| | | self.Tag = ""
|
| | | self.Sign = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.Tag)
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Tag)
|
| | | data = CommFunc.WriteBYTE(data, self.Sign)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Len:%d,
|
| | | Tag:%s,
|
| | | Sign:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Len,
|
| | | self.Tag,
|
| | | self.Sign
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCTurnFightTag=tagSCTurnFightTag()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTurnFightTag.Head.Cmd,m_NAtagSCTurnFightTag.Head.SubCmd))] = m_NAtagSCTurnFightTag
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 27 使用技能 #tagSCUseSkill
|
| | |
|
| | | class tagSCUseSkillHurt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ObjID", c_int), |
| | | ("AttackTypes", c_int), # 飘血类型汇总,支持多种类型并存,如无视防御且暴击同时被格挡,二进制或运算最终值;0-失败;1-普通;2-回血;5-格挡;6-无视防御;7-暴击;9-闪避
|
| | | ("HurtHP", c_int), # 飘血值,求余亿部分
|
| | | ("HurtHPEx", c_int), # 飘血值,整除亿部分
|
| | | ("CurHP", c_int), # 更新剩余血量,求余亿部分
|
| | | ("CurHPEx", c_int), # 更新剩余血量,整除亿部分
|
| | | ("SuckHP", c_int), # 本次伤害转化的吸血量
|
| | | ("BounceHP", c_int), # 本次伤害反弹的伤害量
|
| | | ]
|
| | |
|
| | | 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.ObjID = 0
|
| | | self.AttackTypes = 0
|
| | | self.HurtHP = 0
|
| | | self.HurtHPEx = 0
|
| | | self.CurHP = 0
|
| | | self.CurHPEx = 0
|
| | | self.SuckHP = 0
|
| | | self.BounceHP = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCUseSkillHurt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 27 使用技能 //tagSCUseSkill:
|
| | | ObjID:%d,
|
| | | AttackTypes:%d,
|
| | | HurtHP:%d,
|
| | | HurtHPEx:%d,
|
| | | CurHP:%d,
|
| | | CurHPEx:%d,
|
| | | SuckHP:%d,
|
| | | BounceHP:%d
|
| | | '''\
|
| | | %(
|
| | | self.ObjID,
|
| | | self.AttackTypes,
|
| | | self.HurtHP,
|
| | | self.HurtHPEx,
|
| | | self.CurHP,
|
| | | self.CurHPEx,
|
| | | self.SuckHP,
|
| | | self.BounceHP
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCUseSkill(Structure):
|
| | | Head = tagHead()
|
| | | ObjID = 0 #(DWORD ObjID)
|
| | | PMType = 0 #(BYTE PMType)// 物法类型 0或1-物理;2-法术
|
| | | BattleType = 0 #(BYTE BattleType)// 战斗类型 0-常规;1-连击;2-反击;3-追击
|
| | | CurHP = 0 #(DWORD CurHP)// 释放技能后剩余血量,吸血、反弹可能引起变化,求余亿部分
|
| | | CurHPEx = 0 #(DWORD CurHPEx)// 释放技能后剩余血量,吸血、反弹可能引起变化,整除亿部分
|
| | | SkillID = 0 #(DWORD SkillID)
|
| | | HurtCount = 0 #(BYTE HurtCount)//伤害数目
|
| | | HurtList = list() #(vector<tagSCUseSkillHurt> HurtList)//size = HurtCount
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x27
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PMType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.BattleType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CurHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.CurHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.SkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HurtCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HurtCount):
|
| | | temHurtList = tagSCUseSkillHurt()
|
| | | _pos = temHurtList.ReadData(_lpData, _pos)
|
| | | self.HurtList.append(temHurtList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x27
|
| | | self.ObjID = 0
|
| | | self.PMType = 0
|
| | | self.BattleType = 0
|
| | | self.CurHP = 0
|
| | | self.CurHPEx = 0
|
| | | self.SkillID = 0
|
| | | self.HurtCount = 0
|
| | | self.HurtList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.HurtCount):
|
| | | length += self.HurtList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.ObjID)
|
| | | data = CommFunc.WriteBYTE(data, self.PMType)
|
| | | data = CommFunc.WriteBYTE(data, self.BattleType)
|
| | | data = CommFunc.WriteDWORD(data, self.CurHP)
|
| | | data = CommFunc.WriteDWORD(data, self.CurHPEx)
|
| | | data = CommFunc.WriteDWORD(data, self.SkillID)
|
| | | data = CommFunc.WriteBYTE(data, self.HurtCount)
|
| | | for i in range(self.HurtCount):
|
| | | data = CommFunc.WriteString(data, self.HurtList[i].GetLength(), self.HurtList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ObjID:%d,
|
| | | PMType:%d,
|
| | | BattleType:%d,
|
| | | CurHP:%d,
|
| | | CurHPEx:%d,
|
| | | SkillID:%d,
|
| | | HurtCount:%d,
|
| | | HurtList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ObjID,
|
| | | self.PMType,
|
| | | self.BattleType,
|
| | | self.CurHP,
|
| | | self.CurHPEx,
|
| | | self.SkillID,
|
| | | self.HurtCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCUseSkill=tagSCUseSkill()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCUseSkill.Head.Cmd,m_NAtagSCUseSkill.Head.SubCmd))] = m_NAtagSCUseSkill
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C0 09 跨服战场玩家购买战场信息 #tagGCCrossBattlefieldBuyInfo
|
| | |
|
| | | class tagGCCrossBattlefieldPlayer(Structure):
|
| | | PlayerID = 0 #(DWORD PlayerID)
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | Job = 0 #(BYTE Job)
|
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界
|
| | | FightPower = 0 #(DWORD FightPower)//战力求余亿部分
|
| | | FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分
|
| | | 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.FightPowerEx,_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.FightPowerEx = 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.FightPowerEx)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | FightPower:%d,
|
| | | FightPowerEx:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.FightPower,
|
| | | self.FightPowerEx
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossBattlefieldBuyPlayer(Structure):
|
| | | BuyPlayerID = 0 #(DWORD BuyPlayerID)//购买的玩家ID,即召集人
|
| | | Faction = 0 #(BYTE Faction)//阵营 1-红;2-蓝
|
| | | ServerOnly = 0 #(BYTE ServerOnly)//是否仅本服玩家可加入,0-否,1-是
|
| | | FactionPlayerCount = 0 #(BYTE FactionPlayerCount)
|
| | | FactionPlayerList = list() #(vector<tagGCCrossBattlefieldPlayer> FactionPlayerList)//阵营所有玩家列表,包含召集人
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.BuyPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerOnly,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FactionPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FactionPlayerCount):
|
| | | temFactionPlayerList = tagGCCrossBattlefieldPlayer()
|
| | | _pos = temFactionPlayerList.ReadData(_lpData, _pos)
|
| | | self.FactionPlayerList.append(temFactionPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.BuyPlayerID = 0
|
| | | self.Faction = 0
|
| | | self.ServerOnly = 0
|
| | | self.FactionPlayerCount = 0
|
| | | self.FactionPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.FactionPlayerCount):
|
| | | length += self.FactionPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.BuyPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Faction)
|
| | | data = CommFunc.WriteBYTE(data, self.ServerOnly)
|
| | | data = CommFunc.WriteBYTE(data, self.FactionPlayerCount)
|
| | | for i in range(self.FactionPlayerCount):
|
| | | data = CommFunc.WriteString(data, self.FactionPlayerList[i].GetLength(), self.FactionPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | BuyPlayerID:%d,
|
| | | Faction:%d,
|
| | | ServerOnly:%d,
|
| | | FactionPlayerCount:%d,
|
| | | FactionPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.BuyPlayerID,
|
| | | self.Faction,
|
| | | self.ServerOnly,
|
| | | self.FactionPlayerCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossBattlefieldBuyHM(Structure):
|
| | | Hour = 0 #(BYTE Hour)//战场开启时
|
| | | Minute = 0 #(BYTE Minute)//战场开启分
|
| | | BuyPlayerCount = 0 #(BYTE BuyPlayerCount)
|
| | | BuyPlayerList = list() #(vector<tagGCCrossBattlefieldBuyPlayer> BuyPlayerList)//购买本场次的玩家信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Hour,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Minute,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.BuyPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BuyPlayerCount):
|
| | | temBuyPlayerList = tagGCCrossBattlefieldBuyPlayer()
|
| | | _pos = temBuyPlayerList.ReadData(_lpData, _pos)
|
| | | self.BuyPlayerList.append(temBuyPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Hour = 0
|
| | | self.Minute = 0
|
| | | self.BuyPlayerCount = 0
|
| | | self.BuyPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.BuyPlayerCount):
|
| | | length += self.BuyPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.Hour)
|
| | | data = CommFunc.WriteBYTE(data, self.Minute)
|
| | | data = CommFunc.WriteBYTE(data, self.BuyPlayerCount)
|
| | | for i in range(self.BuyPlayerCount):
|
| | | data = CommFunc.WriteString(data, self.BuyPlayerList[i].GetLength(), self.BuyPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Hour:%d,
|
| | | Minute:%d,
|
| | | BuyPlayerCount:%d,
|
| | | BuyPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Hour,
|
| | | self.Minute,
|
| | | self.BuyPlayerCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossBattlefieldBuyInfo(Structure):
|
| | | Head = tagHead()
|
| | | HMCount = 0 #(BYTE HMCount)// 为0时清空重置,其他为增量更新
|
| | | HMBuyList = list() #(vector<tagGCCrossBattlefieldBuyHM> HMBuyList)//购买场次列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.HMCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HMCount):
|
| | | temHMBuyList = tagGCCrossBattlefieldBuyHM()
|
| | | _pos = temHMBuyList.ReadData(_lpData, _pos)
|
| | | self.HMBuyList.append(temHMBuyList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x09
|
| | | self.HMCount = 0
|
| | | self.HMBuyList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.HMCount):
|
| | | length += self.HMBuyList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.HMCount)
|
| | | for i in range(self.HMCount):
|
| | | data = CommFunc.WriteString(data, self.HMBuyList[i].GetLength(), self.HMBuyList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | HMCount:%d,
|
| | | HMBuyList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.HMCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCCrossBattlefieldBuyInfo=tagGCCrossBattlefieldBuyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossBattlefieldBuyInfo.Head.Cmd,m_NAtagGCCrossBattlefieldBuyInfo.Head.SubCmd))] = m_NAtagGCCrossBattlefieldBuyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C0 07 跨服排行榜信息 #tagGCCrossBillboardInfo
|
| | |
|
| | | class tagGCCrossBillboardData(Structure):
|
| | |
| | |
|
| | | m_NAtagMCChampionshipPlayerInfo=tagMCChampionshipPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChampionshipPlayerInfo.Cmd,m_NAtagMCChampionshipPlayerInfo.SubCmd))] = m_NAtagMCChampionshipPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C1 07 跨服战场玩家信息 #tagMCCrossBattlefieldPlayerInfo
|
| | |
|
| | | class tagMCCrossBattlefieldPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BuyOpenCountToday", c_ubyte), # 今日已购买开启战场次数
|
| | | ("HighScoreToday", c_int), # 今日最高积分
|
| | | ("EnterCountWeek", c_int), # 本周总参与次数
|
| | | ("BuyOpenCountWeek", c_int), # 本周总购买召集次数
|
| | | ("HighScoreTotalWeek", c_int), # 本周每日最高分累加总分
|
| | | ("ZoneID", c_ubyte), # 所属分区ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xC1
|
| | | self.SubCmd = 0x07
|
| | | 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 = 0xC1
|
| | | self.SubCmd = 0x07
|
| | | self.BuyOpenCountToday = 0
|
| | | self.HighScoreToday = 0
|
| | | self.EnterCountWeek = 0
|
| | | self.BuyOpenCountWeek = 0
|
| | | self.HighScoreTotalWeek = 0
|
| | | self.ZoneID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCCrossBattlefieldPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// C1 07 跨服战场玩家信息 //tagMCCrossBattlefieldPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BuyOpenCountToday:%d,
|
| | | HighScoreToday:%d,
|
| | | EnterCountWeek:%d,
|
| | | BuyOpenCountWeek:%d,
|
| | | HighScoreTotalWeek:%d,
|
| | | ZoneID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BuyOpenCountToday,
|
| | | self.HighScoreToday,
|
| | | self.EnterCountWeek,
|
| | | self.BuyOpenCountWeek,
|
| | | self.HighScoreTotalWeek,
|
| | | self.ZoneID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossBattlefieldPlayerInfo=tagMCCrossBattlefieldPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossBattlefieldPlayerInfo.Cmd,m_NAtagMCCrossBattlefieldPlayerInfo.SubCmd))] = m_NAtagMCCrossBattlefieldPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|