| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 05 副本功能线路当前玩家数 #tagGCFBFuncLinePlayerCountInfo
|
| | |
|
| | | class tagGCFBFuncLinePlayerCountInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MapID", c_int), |
| | | ("FuncLineID", c_ubyte), |
| | | ("PlayerCount", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA9
|
| | | 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 = 0xA9
|
| | | self.SubCmd = 0x05
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.PlayerCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCFBFuncLinePlayerCountInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A9 05 副本功能线路当前玩家数 //tagGCFBFuncLinePlayerCountInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | PlayerCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.PlayerCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCFBFuncLinePlayerCountInfo=tagGCFBFuncLinePlayerCountInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFBFuncLinePlayerCountInfo.Cmd,m_NAtagGCFBFuncLinePlayerCountInfo.SubCmd))] = m_NAtagGCFBFuncLinePlayerCountInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 A9 通知好友互赠精力信息 #tagGCFriendSendEnergyInfo
|
| | |
|
| | | class tagGCFriendSendEnergyInfo(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 25 NPC已攻击次数信息 #tagMCNPCAttackCountInfo
|
| | |
|
| | | class tagMCNPCAttackCount(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("NPCID", c_int), |
| | | ("AttackCount", 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.NPCID = 0
|
| | | self.AttackCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCNPCAttackCount)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 25 NPC已攻击次数信息 //tagMCNPCAttackCountInfo:
|
| | | NPCID:%d,
|
| | | AttackCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.NPCID,
|
| | | self.AttackCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCNPCAttackCountInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | NPCAttackCountList = list() #(vector<tagMCNPCAttackCount> NPCAttackCountList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x25
|
| | | 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):
|
| | | temNPCAttackCountList = tagMCNPCAttackCount()
|
| | | _pos = temNPCAttackCountList.ReadData(_lpData, _pos)
|
| | | self.NPCAttackCountList.append(temNPCAttackCountList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x25
|
| | | self.Count = 0
|
| | | self.NPCAttackCountList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.NPCAttackCountList[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.NPCAttackCountList[i].GetLength(), self.NPCAttackCountList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | NPCAttackCountList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCNPCAttackCountInfo=tagMCNPCAttackCountInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCAttackCountInfo.Head.Cmd,m_NAtagMCNPCAttackCountInfo.Head.SubCmd))] = m_NAtagMCNPCAttackCountInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 26 NPCID已采集次数信息 #tagMCNPCIDCollectionCntInfo
|
| | |
|
| | | class tagMCNPCIDCollectionCnt(Structure):
|