| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B0 35 福地记录信息 #tagGCMineAreaRecordInfo
|
| | |
|
| | | class tagGCMineAreaRecord(Structure):
|
| | | RecordType = 0 #(BYTE RecordType)// 记录类型;1-自己拉物品;2-物品被人抢
|
| | | TagPlayerID = 0 #(DWORD TagPlayerID)// 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
|
| | | RecordTime = 0 #(DWORD RecordTime)// 记录时间戳
|
| | | MineID = 0 #(WORD MineID)// 矿物ID,对应福地采集表中ID
|
| | | TagPlayerName = "" #(char TagPlayerName[33])
|
| | | TagFace = 0 #(DWORD TagFace)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TagPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RecordTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.TagFace,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.RecordType = 0
|
| | | self.TagPlayerID = 0
|
| | | self.RecordTime = 0
|
| | | self.MineID = 0
|
| | | self.TagPlayerName = ""
|
| | | self.TagFace = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 2
|
| | | length += 33
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.RecordType)
|
| | | data = CommFunc.WriteDWORD(data, self.TagPlayerID)
|
| | | data = CommFunc.WriteDWORD(data, self.RecordTime)
|
| | | data = CommFunc.WriteWORD(data, self.MineID)
|
| | | data = CommFunc.WriteString(data, 33, self.TagPlayerName)
|
| | | data = CommFunc.WriteDWORD(data, self.TagFace)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | RecordType:%d,
|
| | | TagPlayerID:%d,
|
| | | RecordTime:%d,
|
| | | MineID:%d,
|
| | | TagPlayerName:%s,
|
| | | TagFace:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordType,
|
| | | self.TagPlayerID,
|
| | | self.RecordTime,
|
| | | self.MineID,
|
| | | self.TagPlayerName,
|
| | | self.TagFace
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCMineAreaRecordInfo(Structure):
|
| | | Head = tagHead()
|
| | | RecordCount = 0 #(BYTE RecordCount)
|
| | | AreaRecordList = list() #(vector<tagGCMineAreaRecord> AreaRecordList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB0
|
| | | self.Head.SubCmd = 0x35
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RecordCount):
|
| | | temAreaRecordList = tagGCMineAreaRecord()
|
| | | _pos = temAreaRecordList.ReadData(_lpData, _pos)
|
| | | self.AreaRecordList.append(temAreaRecordList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB0
|
| | | self.Head.SubCmd = 0x35
|
| | | self.RecordCount = 0
|
| | | self.AreaRecordList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.RecordCount):
|
| | | length += self.AreaRecordList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RecordCount)
|
| | | for i in range(self.RecordCount):
|
| | | data = CommFunc.WriteString(data, self.AreaRecordList[i].GetLength(), self.AreaRecordList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RecordCount:%d,
|
| | | AreaRecordList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RecordCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCMineAreaRecordInfo=tagGCMineAreaRecordInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMineAreaRecordInfo.Head.Cmd,m_NAtagGCMineAreaRecordInfo.Head.SubCmd))] = m_NAtagGCMineAreaRecordInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B0 32 福地物品拉预览结果 #tagGCMineItemPullPreviewRet
|
| | |
|
| | | class tagGCMineItemPullPreviewRet(Structure):
|
| | |
| | | TreasureState = list() #(vector<BYTE> TreasureState)// 聚宝盆是否已激活列表,[类型0是否已激活, ...]
|
| | | TreasureAward = list() #(vector<BYTE> TreasureAward)// 聚宝盆奖励是否已领取列表,[类型0是否已领取, ...]
|
| | | TreasureProgress = list() #(vector<BYTE> TreasureProgress)// 聚宝盆进度值列表,[类型0进度值, ...],满进度100
|
| | | HelpAwardCount = 0 #(BYTE HelpAwardCount)// 今日已帮助别人奖励次数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.TreasureCount):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.TreasureProgress.append(value)
|
| | | self.HelpAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.TreasureState = list()
|
| | | self.TreasureAward = list()
|
| | | self.TreasureProgress = list()
|
| | | self.HelpAwardCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1 * self.TreasureCount
|
| | | length += 1 * self.TreasureCount
|
| | | length += 1 * self.TreasureCount
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.TreasureAward[i])
|
| | | for i in range(self.TreasureCount):
|
| | | data = CommFunc.WriteBYTE(data, self.TreasureProgress[i])
|
| | | data = CommFunc.WriteBYTE(data, self.HelpAwardCount)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | TreasureCount:%d,
|
| | | TreasureState:%s,
|
| | | TreasureAward:%s,
|
| | | TreasureProgress:%s
|
| | | TreasureProgress:%s,
|
| | | HelpAwardCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.TreasureCount,
|
| | | "...",
|
| | | "...",
|
| | | "..."
|
| | | "...",
|
| | | self.HelpAwardCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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
|
| | | 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
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x20
|
| | | 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.ReadWORD(_lpData, _pos)
|
| | | self.TagType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TagID,_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
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | 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
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Msg)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | 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.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
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | 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
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTurnFightState=tagMCTurnFightState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightState.Head.Cmd,m_NAtagMCTurnFightState.Head.SubCmd))] = m_NAtagMCTurnFightState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C1 09 跨服排位玩家信息 #tagMCChampionshipPlayerInfo
|
| | |
|
| | | class tagMCChampionshipPlayerInfo(Structure):
|