| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 15 诛仙装备分解结果通知 #tagMCZhuXianDecomposeResult
|
| | |
|
| | | class tagMCZhuXianDecomposeItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), #物品ID
|
| | | ("ItemCnt", c_ubyte), #物品数量
|
| | | ("IsBind", c_ubyte), #是否绑定
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.ItemID = 0
|
| | | self.ItemCnt = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCZhuXianDecomposeItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A8 15 诛仙装备分解结果通知 //tagMCZhuXianDecomposeResult:
|
| | | ItemID:%d,
|
| | | ItemCnt:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCnt,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCZhuXianDecomposeResult(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)//数量
|
| | | ItemList = list() #(vector<tagMCZhuXianDecomposeItem> ItemList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x15
|
| | | 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):
|
| | | temItemList = tagMCZhuXianDecomposeItem()
|
| | | _pos = temItemList.ReadData(_lpData, _pos)
|
| | | self.ItemList.append(temItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x15
|
| | | self.Cnt = 0
|
| | | self.ItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Cnt):
|
| | | length += self.ItemList[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.ItemList[i].GetLength(), self.ItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | ItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCZhuXianDecomposeResult=tagMCZhuXianDecomposeResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianDecomposeResult.Head.Cmd,m_NAtagMCZhuXianDecomposeResult.Head.SubCmd))] = m_NAtagMCZhuXianDecomposeResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
|
| | |
|
| | | class tagMCActLoginAwardItem(Structure):
|
| | |
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("TemplateID", c_ushort), # 模板ID
|
| | | ("CurTimes", c_ushort), #已完成次数
|
| | | ("GotTimes", c_ushort), #已领取次数
|
| | | ("CurTimes", c_int), #已完成次数
|
| | | ("GotTimes", c_int), #已领取次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 13 通知玩家所有已学技能 #tagMCPlayerSkills
|
| | |
|
| | | class tagPlayerSkill(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("SkillID", c_int), #技能ID
|
| | | ("RemainTime", c_int), #剩余时间
|
| | | ("Proficiency", 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.SkillID = 0
|
| | | self.RemainTime = 0
|
| | | self.Proficiency = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPlayerSkill)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B4 13 通知玩家所有已学技能 //tagMCPlayerSkills:
|
| | | SkillID:%d,
|
| | | RemainTime:%d,
|
| | | Proficiency:%d
|
| | | '''\
|
| | | %(
|
| | | self.SkillID,
|
| | | self.RemainTime,
|
| | | self.Proficiency
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCPlayerSkills(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)//技能个数
|
| | | Skills = list() #(vector<tagPlayerSkill> Skills)// 技能数据
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x13
|
| | | 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):
|
| | | temSkills = tagPlayerSkill()
|
| | | _pos = temSkills.ReadData(_lpData, _pos)
|
| | | self.Skills.append(temSkills)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x13
|
| | | self.Count = 0
|
| | | self.Skills = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.Skills[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.Skills[i].GetLength(), self.Skills[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | Skills:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCPlayerSkills=tagMCPlayerSkills()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerSkills.Head.Cmd,m_NAtagMCPlayerSkills.Head.SubCmd))] = m_NAtagMCPlayerSkills
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B4 0A 玩家移动 #tagMCPYPlayerMove
|
| | |
|
| | | class tagMCPYPlayerMove(Structure):
|