| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 13 跨服全民充值活动信息 #tagGCCrossActAllRechargeInfo
|
| | |
|
| | | class tagGCCrossActAllRechargeItem(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(tagGCCrossActAllRechargeItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AC 13 跨服全民充值活动信息 //tagGCCrossActAllRechargeInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossActAllRechargeAward(Structure):
|
| | | AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31
|
| | | NeedRMB = 0 #(DWORD NeedRMB)// 所需全民充值RMB
|
| | | NeedPlayerCount = 0 #(WORD NeedPlayerCount)// 所需充值达到该档玩家数
|
| | | NowPlayerCount = 0 #(WORD NowPlayerCount)// 当前充值达到该档玩家数
|
| | | AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagGCCrossActAllRechargeItem> AwardItemList)// 奖励物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedRMB,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NeedPlayerCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.NowPlayerCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardItemCount):
|
| | | temAwardItemList = tagGCCrossActAllRechargeItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.AwardIndex = 0
|
| | | self.NeedRMB = 0
|
| | | self.NeedPlayerCount = 0
|
| | | self.NowPlayerCount = 0
|
| | | self.AwardItemCount = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.AwardItemCount):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.AwardIndex)
|
| | | data = CommFunc.WriteDWORD(data, self.NeedRMB)
|
| | | data = CommFunc.WriteWORD(data, self.NeedPlayerCount)
|
| | | data = CommFunc.WriteWORD(data, self.NowPlayerCount)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardItemCount)
|
| | | for i in range(self.AwardItemCount):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | AwardIndex:%d,
|
| | | NeedRMB:%d,
|
| | | NeedPlayerCount:%d,
|
| | | NowPlayerCount:%d,
|
| | | AwardItemCount:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.AwardIndex,
|
| | | self.NeedRMB,
|
| | | self.NeedPlayerCount,
|
| | | self.NowPlayerCount,
|
| | | self.AwardItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossActAllRechargeInfo(Structure):
|
| | | Head = tagHead()
|
| | | ServerInfoLen = 0 #(BYTE ServerInfoLen)
|
| | | ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardList = list() #(vector<tagGCCrossActAllRechargeAward> AwardList)// 奖励档次信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x13
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardCount):
|
| | | temAwardList = tagGCCrossActAllRechargeAward()
|
| | | _pos = temAwardList.ReadData(_lpData, _pos)
|
| | | self.AwardList.append(temAwardList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAC
|
| | | self.Head.SubCmd = 0x13
|
| | | self.ServerInfoLen = 0
|
| | | self.ServerIDRangeInfo = ""
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.AwardCount = 0
|
| | | self.AwardList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.ServerIDRangeInfo)
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | for i in range(self.AwardCount):
|
| | | length += self.AwardList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ServerInfoLen)
|
| | | data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ServerInfoLen:%d,
|
| | | ServerIDRangeInfo:%s,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | AwardCount:%d,
|
| | | AwardList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ServerInfoLen,
|
| | | self.ServerIDRangeInfo,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCCrossActAllRechargeInfo=tagGCCrossActAllRechargeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossActAllRechargeInfo.Head.Cmd,m_NAtagGCCrossActAllRechargeInfo.Head.SubCmd))] = m_NAtagGCCrossActAllRechargeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AC 12 跨服运营活动结束 # tagGCCrossActEnd
|
| | |
|
| | | class tagGCCrossActEnd(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 34 跨服全民充值活动玩家信息 #tagMCCrossActAllRechargePlayerInfo
|
| | |
|
| | | class tagMCCrossActAllRechargePlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("CTGRMBTotal", c_int), # 活动已累计充值RMB
|
| | | ("AwardRecord", c_int), # 奖励记录,根据奖励索引位或运算判断是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x34
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x34
|
| | | self.CTGRMBTotal = 0
|
| | | self.AwardRecord = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCCrossActAllRechargePlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 34 跨服全民充值活动玩家信息 //tagMCCrossActAllRechargePlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | CTGRMBTotal:%d,
|
| | | AwardRecord:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.CTGRMBTotal,
|
| | | self.AwardRecord
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossActAllRechargePlayerInfo=tagMCCrossActAllRechargePlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActAllRechargePlayerInfo.Cmd,m_NAtagMCCrossActAllRechargePlayerInfo.SubCmd))] = m_NAtagMCCrossActAllRechargePlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 25 每日礼包活动信息 #tagMCDailyGiftbagInfo
|
| | |
|
| | | class tagMCDailyGiftbagItem(Structure):
|