| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 07 BOSS复活活动信息 #tagGCBossRebornInfo
|
| | |
|
| | | class tagGCBossRebornInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | WorldLV = 0 #(WORD WorldLV)// 世界等级
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x07
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.WorldLV = 0
|
| | | self.LimitLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteWORD(data, self.WorldLV)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | WorldLV:%d,
|
| | | LimitLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.WorldLV,
|
| | | self.LimitLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCBossRebornInfo=tagGCBossRebornInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCBossRebornInfo.Head.Cmd,m_NAtagGCBossRebornInfo.Head.SubCmd))] = m_NAtagGCBossRebornInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 08 boss复活点数通知 #tagGCBossRebornPoint
|
| | |
|
| | | class tagGCBossRebornPoint(Structure):
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Point", c_int), # 复活点数
|
| | | ("TotalPoint", c_int), # 复活总点数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Cmd = 0xAC
|
| | | self.SubCmd = 0x08
|
| | | self.Point = 0
|
| | | self.TotalPoint = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// AC 08 boss复活点数通知 //tagGCBossRebornPoint:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Point:%d
|
| | | Point:%d,
|
| | | TotalPoint:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Point
|
| | | self.Point,
|
| | | self.TotalPoint
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 04 Boss复活活动信息 #tagMCBossRebornInfo
|
| | |
|
| | | class tagMCBossRebornAwardItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("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.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCBossRebornAwardItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 04 Boss复活活动信息 //tagMCBossRebornInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCBossRebornTaskInfo(Structure):
|
| | | TaskID = 0 #(BYTE TaskID)// id
|
| | | TotalTimes = 0 #(BYTE TotalTimes)// 可完成总次数,0表示不限次数
|
| | | SingleTimes = 0 #(BYTE SingleTimes)// 单次领奖需要次数
|
| | | AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数
|
| | | AwardItem = list() #(vector<tagMCBossRebornAwardItem> AwardItem)// 奖励物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.TaskID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TotalTimes,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SingleTimes,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardItemCount):
|
| | | temAwardItem = tagMCBossRebornAwardItem()
|
| | | _pos = temAwardItem.ReadData(_lpData, _pos)
|
| | | self.AwardItem.append(temAwardItem)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.TaskID = 0
|
| | | self.TotalTimes = 0
|
| | | self.SingleTimes = 0
|
| | | self.AwardItemCount = 0
|
| | | self.AwardItem = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.AwardItemCount):
|
| | | length += self.AwardItem[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.TaskID)
|
| | | data = CommFunc.WriteBYTE(data, self.TotalTimes)
|
| | | data = CommFunc.WriteBYTE(data, self.SingleTimes)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardItemCount)
|
| | | for i in range(self.AwardItemCount):
|
| | | data = CommFunc.WriteString(data, self.AwardItem[i].GetLength(), self.AwardItem[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | TaskID:%d,
|
| | | TotalTimes:%d,
|
| | | SingleTimes:%d,
|
| | | AwardItemCount:%d,
|
| | | AwardItem:%s
|
| | | '''\
|
| | | %(
|
| | | self.TaskID,
|
| | | self.TotalTimes,
|
| | | self.SingleTimes,
|
| | | self.AwardItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCBossRebornInfo(Structure):
|
| | | Head = tagHead()
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | TaskCnt = 0 #(BYTE TaskCnt)
|
| | | TaskInfo = list() #(vector<tagMCBossRebornTaskInfo> TaskInfo)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAB
|
| | | self.Head.SubCmd = 0x04
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.TaskCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.TaskCnt):
|
| | | temTaskInfo = tagMCBossRebornTaskInfo()
|
| | | _pos = temTaskInfo.ReadData(_lpData, _pos)
|
| | | self.TaskInfo.append(temTaskInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAB
|
| | | self.Head.SubCmd = 0x04
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.TaskCnt = 0
|
| | | self.TaskInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.TaskCnt):
|
| | | length += self.TaskInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.TaskCnt)
|
| | | for i in range(self.TaskCnt):
|
| | | data = CommFunc.WriteString(data, self.TaskInfo[i].GetLength(), self.TaskInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | TaskCnt:%d,
|
| | | TaskInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.TaskCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCBossRebornInfo=tagMCBossRebornInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBossRebornInfo.Head.Cmd,m_NAtagMCBossRebornInfo.Head.SubCmd))] = m_NAtagMCBossRebornInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 23 摇骰子奖励回包 #tagMCDiceAward
|
| | |
|
| | | class tagMCDiceAward(Structure):
|