| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 14 自定义副本奖励信息 #tagMCCuntomFBPrizeInfo
|
| | |
|
| | | class tagMCCuntomFBPrizeInfo(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)
|
| | | FuncLineID = 0 #(WORD FuncLineID)
|
| | | PrizeItemCount = 0 #(BYTE PrizeItemCount)
|
| | | PrizeItemIDList = list() #(vector<DWORD> PrizeItemIDList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x14
|
| | | 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.PrizeItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PrizeItemCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.PrizeItemIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x14
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.PrizeItemCount = 0
|
| | | self.PrizeItemIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.PrizeItemCount
|
| | |
|
| | | 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.PrizeItemCount)
|
| | | for i in range(self.PrizeItemCount):
|
| | | data = CommFunc.WriteDWORD(data, self.PrizeItemIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | PrizeItemCount:%d,
|
| | | PrizeItemIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.PrizeItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCuntomFBPrizeInfo=tagMCCuntomFBPrizeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCuntomFBPrizeInfo.Head.Cmd,m_NAtagMCCuntomFBPrizeInfo.Head.SubCmd))] = m_NAtagMCCuntomFBPrizeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 10 仙盟联赛玩家排名信息 #tagMCFamilyWarBillboard
|
| | |
|
| | | class tagMCFamilyWarPlayer(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 16 开始自定义场景结果 #tagMCStartCustomSceneResult
|
| | |
|
| | | class tagMCStartCustomSceneResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("MapID", c_int), |
| | | ("FuncLineID", c_ushort), |
| | | ("Result", c_ubyte), #是否允许
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x16
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x16
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.Result = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCStartCustomSceneResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B2 16 开始自定义场景结果 //tagMCStartCustomSceneResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | Result:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.Result
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCStartCustomSceneResult=tagMCStartCustomSceneResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartCustomSceneResult.Cmd,m_NAtagMCStartCustomSceneResult.SubCmd))] = m_NAtagMCStartCustomSceneResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
|
| | |
|
| | | class tagMCPushNotificationsSetting(Structure):
|