| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 10 通知获得物品 #tagMCNotifyUseItemGetItem
|
| | |
|
| | | class tagMCNotifyUseItemGetItem(Structure):
|
| | | Head = tagHead()
|
| | | UseItemID = 0 #(DWORD UseItemID)// 使用的物品ID
|
| | | UseCount = 0 #(WORD UseCount)// 使用物品个数
|
| | | GetItemLen = 0 #(WORD GetItemLen)
|
| | | GetItemData = "" #(String GetItemData)// 获得物品信息 [[itemID,itemCount,isBind], [或itemID,itemCount,isBind,isAppoint], {或物品信息字典}, ...] |
| | | MoneyType = 0 #(BYTE MoneyType)// 获得货币类型
|
| | | MoneyCount = 0 #(DWORD MoneyCount)// 获得货币数量
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.UseItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.UseCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.GetItemLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.GetItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.GetItemLen)
|
| | | self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x10
|
| | | self.UseItemID = 0
|
| | | self.UseCount = 0
|
| | | self.GetItemLen = 0
|
| | | self.GetItemData = ""
|
| | | self.MoneyType = 0
|
| | | self.MoneyCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 2
|
| | | length += 2
|
| | | length += len(self.GetItemData)
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.UseItemID)
|
| | | data = CommFunc.WriteWORD(data, self.UseCount)
|
| | | data = CommFunc.WriteWORD(data, self.GetItemLen)
|
| | | data = CommFunc.WriteString(data, self.GetItemLen, self.GetItemData)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneyType)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyCount)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | UseItemID:%d,
|
| | | UseCount:%d,
|
| | | GetItemLen:%d,
|
| | | GetItemData:%s,
|
| | | MoneyType:%d,
|
| | | MoneyCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.UseItemID,
|
| | | self.UseCount,
|
| | | self.GetItemLen,
|
| | | self.GetItemData,
|
| | | self.MoneyType,
|
| | | self.MoneyCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCNotifyUseItemGetItem=tagMCNotifyUseItemGetItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNotifyUseItemGetItem.Head.Cmd,m_NAtagMCNotifyUseItemGetItem.Head.SubCmd))] = m_NAtagMCNotifyUseItemGetItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 17 宠物培养信息 #tagMCPetTrainInfo
|
| | |
|
| | | class tagMCPetTrainInfo(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 29 阵容推荐信息 #tagSCLineupRecommendInfo
|
| | |
|
| | | class tagSCLineupRecommend(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RecommendID", c_ubyte), #推荐阵容表ID
|
| | | ("AwardState", 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.RecommendID = 0
|
| | | self.AwardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCLineupRecommend)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 29 阵容推荐信息 //tagSCLineupRecommendInfo:
|
| | | RecommendID:%d,
|
| | | AwardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecommendID,
|
| | | self.AwardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagSCLineupRecommendInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | RecommendList = list() #(vector<tagSCLineupRecommend> RecommendList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x29
|
| | | 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):
|
| | | temRecommendList = tagSCLineupRecommend()
|
| | | _pos = temRecommendList.ReadData(_lpData, _pos)
|
| | | self.RecommendList.append(temRecommendList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x29
|
| | | self.Count = 0
|
| | | self.RecommendList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.RecommendList[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.RecommendList[i].GetLength(), self.RecommendList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | RecommendList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCLineupRecommendInfo=tagSCLineupRecommendInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLineupRecommendInfo.Head.Cmd,m_NAtagSCLineupRecommendInfo.Head.SubCmd))] = m_NAtagSCLineupRecommendInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 28 历练秘笈信息 #tagSCLLMJInfo
|
| | |
|
| | | class tagSCLLMJInfo(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 19 对象最新生命刷新 #tagSCObjHPRefresh
|
| | |
|
| | | class tagSCObjHPRefresh(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ObjID", c_int), |
| | | ("HP", c_int), # 当前血量,求余20亿部分
|
| | | ("HPEx", c_int), # 当前血量,整除20亿部分
|
| | | ("MaxHP", c_int), # 最大血量,求余20亿部分
|
| | | ("MaxHPEx", c_int), # 最大血量,整除20亿部分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x19
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x19
|
| | | self.ObjID = 0
|
| | | self.HP = 0
|
| | | self.HPEx = 0
|
| | | self.MaxHP = 0
|
| | | self.MaxHPEx = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagSCObjHPRefresh)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 19 对象最新生命刷新 //tagSCObjHPRefresh:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ObjID:%d,
|
| | | HP:%d,
|
| | | HPEx:%d,
|
| | | MaxHP:%d,
|
| | | MaxHPEx:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ObjID,
|
| | | self.HP,
|
| | | self.HPEx,
|
| | | self.MaxHP,
|
| | | self.MaxHPEx
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCObjHPRefresh=tagSCObjHPRefresh()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCObjHPRefresh.Cmd,m_NAtagSCObjHPRefresh.SubCmd))] = m_NAtagSCObjHPRefresh
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 18 对象属性刷新展示 #tagSCObjPropertyRefreshView
|
| | |
|
| | | class tagSCObjPropertyRefreshView(Structure):
|