| | |
| | | OnlineType = 0 #(BYTE OnlineType)//在线状态, 0 不在线 1在线
|
| | | IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍
|
| | | ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.OnlineType = 0
|
| | | self.IsInTeam = 0
|
| | | self.ServerGroupID = 0
|
| | | self.Face = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.OnlineType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsInTeam)
|
| | | data = CommFunc.WriteDWORD(data, self.ServerGroupID)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | RealmLV:%d,
|
| | | OnlineType:%d,
|
| | | IsInTeam:%d,
|
| | | ServerGroupID:%d
|
| | | ServerGroupID:%d,
|
| | | Face:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.RealmLV,
|
| | | self.OnlineType,
|
| | | self.IsInTeam,
|
| | | self.ServerGroupID
|
| | | self.ServerGroupID,
|
| | | self.Face
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界
|
| | | OnlineType = 0 #(BYTE OnlineType)//0不在线 1在线 2脱机在线
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LV = 0
|
| | | self.RealmLV = 0
|
| | | self.OnlineType = 0
|
| | | self.Face = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteBYTE(data, self.OnlineType)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | OnlineType:%d
|
| | | OnlineType:%d,
|
| | | Face:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | |
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.OnlineType
|
| | | self.OnlineType,
|
| | | self.Face
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | class tagRefreshType(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RefreshType", c_ubyte), |
| | | ("RefreshType", c_ushort), |
| | | ("Value", c_int),
|
| | | ("ValueEx", c_int),
|
| | | ]
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 22 砍树结果 #tagMCCutTreeResult
|
| | |
|
| | | class tagMCCutTreeExItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), # 额外奖励物品ID
|
| | | ("ItemCount", c_ushort), # 额外奖励物品ID对应个数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCCutTreeExItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 22 砍树结果 //tagMCCutTreeResult:
|
| | | ItemID:%d,
|
| | | ItemCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCutTreeResult(Structure):
|
| | | Head = tagHead()
|
| | | EquipCount = 0 #(BYTE EquipCount)// 获得装备数量,默认展示在砍树背包中的装备即可,收到该封包前会先收到0704物品刷新
|
| | | ExItemCount = 0 #(BYTE ExItemCount)// 额外奖励物品数
|
| | | ExItemList = list() #(vector<tagMCCutTreeExItem> ExItemList)// 额外奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x22
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.EquipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ExItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ExItemCount):
|
| | | temExItemList = tagMCCutTreeExItem()
|
| | | _pos = temExItemList.ReadData(_lpData, _pos)
|
| | | self.ExItemList.append(temExItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x22
|
| | | self.EquipCount = 0
|
| | | self.ExItemCount = 0
|
| | | self.ExItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.ExItemCount):
|
| | | length += self.ExItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.EquipCount)
|
| | | data = CommFunc.WriteBYTE(data, self.ExItemCount)
|
| | | for i in range(self.ExItemCount):
|
| | | data = CommFunc.WriteString(data, self.ExItemList[i].GetLength(), self.ExItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | EquipCount:%d,
|
| | | ExItemCount:%d,
|
| | | ExItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.EquipCount,
|
| | | self.ExItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCutTreeResult=tagMCCutTreeResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCutTreeResult.Head.Cmd,m_NAtagMCCutTreeResult.Head.SubCmd))] = m_NAtagMCCutTreeResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList
|
| | |
|
| | | class tagMCFuncSysPrivilegeInfo(Structure):
|
| | |
| | |
|
| | | m_NAtagMCYinjiStartTime=tagMCYinjiStartTime()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCYinjiStartTime.Cmd,m_NAtagMCYinjiStartTime.SubCmd))] = m_NAtagMCYinjiStartTime
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 10 当前任务信息 #tagMCTaskInfo
|
| | |
|
| | | class tagMCTaskInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TaskID", c_int), # 任务ID
|
| | | ("CurValue", c_int), # 当前进度值
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | self.SubCmd = 0x10
|
| | | 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 = 0x10
|
| | | self.TaskID = 0
|
| | | self.CurValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTaskInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 10 当前任务信息 //tagMCTaskInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TaskID:%d,
|
| | | CurValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TaskID,
|
| | | self.CurValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTaskInfo=tagMCTaskInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTaskInfo.Cmd,m_NAtagMCTaskInfo.SubCmd))] = m_NAtagMCTaskInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 21 仙树信息 #tagMCTreeInfo
|
| | |
|
| | | class tagMCTreeInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TreeLV", c_ubyte), # 当前仙树等级
|
| | | ("LVUPState", c_ubyte), # 0-非升级中;1-升级中
|
| | | ("LVUPRemainTime", c_int), # 升级剩余时间,秒;当升级中且倒计时为0时可发送B223执行升级包进行升级
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB1
|
| | | 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 = 0xB1
|
| | | self.SubCmd = 0x21
|
| | | self.TreeLV = 0
|
| | | self.LVUPState = 0
|
| | | self.LVUPRemainTime = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTreeInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 21 仙树信息 //tagMCTreeInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TreeLV:%d,
|
| | | LVUPState:%d,
|
| | | LVUPRemainTime:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TreeLV,
|
| | | self.LVUPState,
|
| | | self.LVUPRemainTime
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTreeInfo=tagMCTreeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTreeInfo.Cmd,m_NAtagMCTreeInfo.SubCmd))] = m_NAtagMCTreeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 21 回合战斗对象开始行动 #tagMCTurnFightObjAction
|
| | |
|
| | | class tagMCTurnFightObjAction(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TurnNum", c_ubyte), # 当前轮次
|
| | | ("ObjID", c_int), |
| | | ("ObjType", c_ubyte), |
| | | ]
|
| | |
|
| | | 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
|
| | | self.ObjType = 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,
|
| | | ObjType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TurnNum,
|
| | | self.ObjID,
|
| | | self.ObjType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTurnFightObjAction=tagMCTurnFightObjAction()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightObjAction.Cmd,m_NAtagMCTurnFightObjAction.SubCmd))] = m_NAtagMCTurnFightObjAction
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 20 回合制战斗状态 #tagMCTurnFightState
|
| | |
|
| | | class tagMCTurnFightState(Structure):
|
| | |
| | | ("MapID", c_int), # 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等)
|
| | | ("FuncLineID", c_ushort),
|
| | | ("PlayerID", c_int), # 对应玩家ID,可为0,某些功能可能有用,如竞技场
|
| | | ("State", c_ubyte), # 0-开始;1-进行中;2-结束
|
| | | ("State", c_ubyte), # 0-开始;1-战斗中;2-胜利;3-失败;4-结束
|
| | | ("TurnNum", c_ubyte), # 当前轮次
|
| | | ("TurnMax", c_ubyte), # 最大轮次
|
| | | ]
|