| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 57 垃圾收集活动玩家信息 #tagMCActGarbagePlayerInfo
|
| | |
|
| | | class tagMCActGarbageAwardItemResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
|
| | | ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
|
| | | ("ItemCount", c_ushort), |
| | | ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
|
| | | ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
|
| | | ]
|
| | |
|
| | | 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.ItemLibType = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.PosNum = 0
|
| | | self.TotalTimesNow = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGarbageAwardItemResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 57 垃圾收集活动玩家信息 //tagMCActGarbagePlayerInfo:
|
| | | ItemLibType:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | PosNum:%d,
|
| | | TotalTimesNow:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemLibType,
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.PosNum,
|
| | | self.TotalTimesNow
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGarbagePlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | GuideTaskFinish = 0 #(BYTE GuideTaskFinish)//引导任务是否已完成,有需要NPC对话引导任务时,则需要先完成才显示活动界面
|
| | | EnvironmentValue = 0 #(DWORD EnvironmentValue)//当前可用环保值
|
| | | EnvironmentValueHis = 0 #(DWORD EnvironmentValueHis)//历史环保值
|
| | | AwardItemResult=tagMCActGarbageAwardItemResult() #(tagMCActGarbageAwardItemResult AwardItemResult)//本次抽奖结果物品信息,可能为空
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x57
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GuideTaskFinish,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.EnvironmentValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.EnvironmentValueHis,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | _pos = self.AwardItemResult.ReadData(_lpData,_pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x57
|
| | | self.ActNum = 0
|
| | | self.GuideTaskFinish = 0
|
| | | self.EnvironmentValue = 0
|
| | | self.EnvironmentValueHis = 0
|
| | | self.AwardItemResult=tagMCActGarbageAwardItemResult()
|
| | | self.AwardItemResult.Clear()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += self.AwardItemResult.GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | data = CommFunc.WriteBYTE(data, self.GuideTaskFinish)
|
| | | data = CommFunc.WriteDWORD(data, self.EnvironmentValue)
|
| | | data = CommFunc.WriteDWORD(data, self.EnvironmentValueHis)
|
| | | data = CommFunc.WriteString(data,self.AwardItemResult.GetLength(),self.AwardItemResult.GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | GuideTaskFinish:%d,
|
| | | EnvironmentValue:%d,
|
| | | EnvironmentValueHis:%d,
|
| | | AwardItemResult:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.GuideTaskFinish,
|
| | | self.EnvironmentValue,
|
| | | self.EnvironmentValueHis,
|
| | | self.AwardItemResult.OutputString()
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGarbagePlayerInfo=tagMCActGarbagePlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbagePlayerInfo.Head.Cmd,m_NAtagMCActGarbagePlayerInfo.Head.SubCmd))] = m_NAtagMCActGarbagePlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 55 垃圾收集活动信息 #tagMCActGarbageSortingInfo
|
| | |
|
| | | class tagMCActGarbageAwardItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
|
| | | ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同
|
| | | ("ItemCount", c_ushort), |
| | | ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
|
| | | ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
|
| | | ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限
|
| | | ("LayerLimit", c_ubyte), #大于等于X层后可产出,0不限
|
| | | ]
|
| | |
|
| | | 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.ItemLibType = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.PosNum = 0
|
| | | self.TotalTimesNow = 0
|
| | | self.TotalTimesMax = 0
|
| | | self.LayerLimit = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGarbageAwardItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 55 垃圾收集活动信息 //tagMCActGarbageSortingInfo:
|
| | | ItemLibType:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | PosNum:%d,
|
| | | TotalTimesNow:%d,
|
| | | TotalTimesMax:%d,
|
| | | LayerLimit:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemLibType,
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.PosNum,
|
| | | self.TotalTimesNow,
|
| | | self.TotalTimesMax,
|
| | | self.LayerLimit
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGarbageSortingInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层
|
| | | AwardItemCount = 0 #(BYTE AwardItemCount)
|
| | | AwardItemList = list() #(vector<tagMCActGarbageAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
|
| | | SuperItemCount = 0 #(BYTE SuperItemCount)
|
| | | SuperItemList = list() #(vector<tagMCActGarbageAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
|
| | | SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x55
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_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.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardItemCount):
|
| | | temAwardItemList = tagMCActGarbageAwardItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.SuperItemCount):
|
| | | temSuperItemList = tagMCActGarbageAwardItem()
|
| | | _pos = temSuperItemList.ReadData(_lpData, _pos)
|
| | | self.SuperItemList.append(temSuperItemList)
|
| | | self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x55
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.LayerNum = 0
|
| | | self.AwardItemCount = 0
|
| | | self.AwardItemList = list()
|
| | | self.SuperItemCount = 0
|
| | | self.SuperItemList = list()
|
| | | self.SuperItemCanChooseCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.AwardItemCount):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | | length += 1
|
| | | for i in range(self.SuperItemCount):
|
| | | length += self.SuperItemList[i].GetLength()
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | 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.LayerNum)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardItemCount)
|
| | | for i in range(self.AwardItemCount):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.SuperItemCount)
|
| | | for i in range(self.SuperItemCount):
|
| | | data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | LayerNum:%d,
|
| | | AwardItemCount:%d,
|
| | | AwardItemList:%s,
|
| | | SuperItemCount:%d,
|
| | | SuperItemList:%s,
|
| | | SuperItemCanChooseCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.LayerNum,
|
| | | self.AwardItemCount,
|
| | | "...",
|
| | | self.SuperItemCount,
|
| | | "...",
|
| | | self.SuperItemCanChooseCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGarbageSortingInfo=tagMCActGarbageSortingInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageSortingInfo.Head.Cmd,m_NAtagMCActGarbageSortingInfo.Head.SubCmd))] = m_NAtagMCActGarbageSortingInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 56 垃圾收集活动任务进度信息 #tagMCActGarbageTaskInfo
|
| | |
|
| | | class tagMCActGarbageTaskItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ]
|
| | |
|
| | | 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(tagMCActGarbageTaskItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 56 垃圾收集活动任务进度信息 //tagMCActGarbageTaskInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGarbageTask(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GarbageTaskID", c_ubyte), #垃圾任务ID
|
| | | ("GarbageTaskValue", c_int), #当前进度值,一直累加
|
| | | ("GarbageTaskFinishCount", c_ubyte), #当前已完成次数; 前端计算未完成次数的进度值=max(0, 当前进度值 - (完成次数 * 单次所需进度))
|
| | | ]
|
| | |
|
| | | 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.GarbageTaskID = 0
|
| | | self.GarbageTaskValue = 0
|
| | | self.GarbageTaskFinishCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActGarbageTask)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 56 垃圾收集活动任务进度信息 //tagMCActGarbageTaskInfo:
|
| | | GarbageTaskID:%d,
|
| | | GarbageTaskValue:%d,
|
| | | GarbageTaskFinishCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.GarbageTaskID,
|
| | | self.GarbageTaskValue,
|
| | | self.GarbageTaskFinishCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActGarbageTaskInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | GarbageTaskCount = 0 #(BYTE GarbageTaskCount)//任务数
|
| | | GarbageTaskList = list() #(vector<tagMCActGarbageTask> GarbageTaskList)//任务信息列表
|
| | | TaskItemCount = 0 #(BYTE TaskItemCount)//本次获得的垃圾收集任务奖励物品个数,可能为0
|
| | | GarbageTaskItemList = list() #(vector<tagMCActGarbageTaskItem> GarbageTaskItemList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x56
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GarbageTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GarbageTaskCount):
|
| | | temGarbageTaskList = tagMCActGarbageTask()
|
| | | _pos = temGarbageTaskList.ReadData(_lpData, _pos)
|
| | | self.GarbageTaskList.append(temGarbageTaskList)
|
| | | self.TaskItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.TaskItemCount):
|
| | | temGarbageTaskItemList = tagMCActGarbageTaskItem()
|
| | | _pos = temGarbageTaskItemList.ReadData(_lpData, _pos)
|
| | | self.GarbageTaskItemList.append(temGarbageTaskItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x56
|
| | | self.ActNum = 0
|
| | | self.GarbageTaskCount = 0
|
| | | self.GarbageTaskList = list()
|
| | | self.TaskItemCount = 0
|
| | | self.GarbageTaskItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.GarbageTaskCount):
|
| | | length += self.GarbageTaskList[i].GetLength()
|
| | | length += 1
|
| | | for i in range(self.TaskItemCount):
|
| | | length += self.GarbageTaskItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | data = CommFunc.WriteBYTE(data, self.GarbageTaskCount)
|
| | | for i in range(self.GarbageTaskCount):
|
| | | data = CommFunc.WriteString(data, self.GarbageTaskList[i].GetLength(), self.GarbageTaskList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.TaskItemCount)
|
| | | for i in range(self.TaskItemCount):
|
| | | data = CommFunc.WriteString(data, self.GarbageTaskItemList[i].GetLength(), self.GarbageTaskItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | GarbageTaskCount:%d,
|
| | | GarbageTaskList:%s,
|
| | | TaskItemCount:%d,
|
| | | GarbageTaskItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.GarbageTaskCount,
|
| | | "...",
|
| | | self.TaskItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActGarbageTaskInfo=tagMCActGarbageTaskInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageTaskInfo.Head.Cmd,m_NAtagMCActGarbageTaskInfo.Head.SubCmd))] = m_NAtagMCActGarbageTaskInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo
|
| | |
|
| | | class tagMCActGrowupBuyCTGItem(Structure):
|