| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A0 08 玩家记录信息 #tagGCPlayerRecInfo
|
| | |
|
| | | class tagGCPlayerRec(Structure):
|
| | | Time = 0 #(DWORD Time)//时间
|
| | | Value1 = 0 #(DWORD Value1)//ֵ1
|
| | | Value2 = 0 #(DWORD Value2)//ֵ2
|
| | | Value3 = 0 #(DWORD Value3)//ֵ3
|
| | | Value4 = 0 #(DWORD Value4)//ֵ4
|
| | | Value5 = 0 #(DWORD Value5)//ֵ5
|
| | | Value6 = 0 #(DWORD Value6)//ֵ6
|
| | | Value7 = 0 #(DWORD Value7)//ֵ7
|
| | | Value8 = 0 #(DWORD Value8)//ֵ8
|
| | | UserDataLen = 0 #(WORD UserDataLen)//扩展数据长度
|
| | | UserData = "" #(String UserData)//扩展数据
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value1,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value2,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value3,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value4,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value5,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value6,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value7,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Value8,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Time = 0
|
| | | self.Value1 = 0
|
| | | self.Value2 = 0
|
| | | self.Value3 = 0
|
| | | self.Value4 = 0
|
| | | self.Value5 = 0
|
| | | self.Value6 = 0
|
| | | self.Value7 = 0
|
| | | self.Value8 = 0
|
| | | self.UserDataLen = 0
|
| | | self.UserData = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 2
|
| | | length += len(self.UserData)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Time)
|
| | | data = CommFunc.WriteDWORD(data, self.Value1)
|
| | | data = CommFunc.WriteDWORD(data, self.Value2)
|
| | | data = CommFunc.WriteDWORD(data, self.Value3)
|
| | | data = CommFunc.WriteDWORD(data, self.Value4)
|
| | | data = CommFunc.WriteDWORD(data, self.Value5)
|
| | | data = CommFunc.WriteDWORD(data, self.Value6)
|
| | | data = CommFunc.WriteDWORD(data, self.Value7)
|
| | | data = CommFunc.WriteDWORD(data, self.Value8)
|
| | | data = CommFunc.WriteWORD(data, self.UserDataLen)
|
| | | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Time:%d,
|
| | | Value1:%d,
|
| | | Value2:%d,
|
| | | Value3:%d,
|
| | | Value4:%d,
|
| | | Value5:%d,
|
| | | Value6:%d,
|
| | | Value7:%d,
|
| | | Value8:%d,
|
| | | UserDataLen:%d,
|
| | | UserData:%s
|
| | | '''\
|
| | | %(
|
| | | self.Time,
|
| | | self.Value1,
|
| | | self.Value2,
|
| | | self.Value3,
|
| | | self.Value4,
|
| | | self.Value5,
|
| | | self.Value6,
|
| | | self.Value7,
|
| | | self.Value8,
|
| | | self.UserDataLen,
|
| | | self.UserData
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCPlayerRecInfo(Structure):
|
| | | Head = tagHead()
|
| | | Type = 0 #(BYTE Type)//类型
|
| | | Count = 0 #(WORD Count)//数量
|
| | | PlayerRecList = list() #(vector<tagGCPlayerRec> PlayerRecList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA0
|
| | | self.Head.SubCmd = 0x08
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temPlayerRecList = tagGCPlayerRec()
|
| | | _pos = temPlayerRecList.ReadData(_lpData, _pos)
|
| | | self.PlayerRecList.append(temPlayerRecList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA0
|
| | | self.Head.SubCmd = 0x08
|
| | | self.Type = 0
|
| | | self.Count = 0
|
| | | self.PlayerRecList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.PlayerRecList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Type)
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.PlayerRecList[i].GetLength(), self.PlayerRecList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Type:%d,
|
| | | Count:%d,
|
| | | PlayerRecList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Type,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCPlayerRecInfo=tagGCPlayerRecInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerRecInfo.Head.Cmd,m_NAtagGCPlayerRecInfo.Head.SubCmd))] = m_NAtagGCPlayerRecInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A0 06 服务器地图线路人数状态 #tagGCPyServerMapState
|
| | |
|
| | | class tagGCPyServerMapLineState(Structure):
|
| | |
| | | ("TotalPayCount", c_int), # 累计总购买次数
|
| | | ("WeekPayCount", c_ushort), # 周总购买次数
|
| | | ("MonthPayCount", c_ushort), # 月总购买次数
|
| | | ("SelectItemValue", c_int), # 自选物品索引值,每两位存储每个自选索引对应选择的物品索引+1,存储位值为0代表未选择,最多支持选择4种物品
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.TotalPayCount = 0
|
| | | self.WeekPayCount = 0
|
| | | self.MonthPayCount = 0
|
| | | self.SelectItemValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | TodayPayCount:%d,
|
| | | TotalPayCount:%d,
|
| | | WeekPayCount:%d,
|
| | | MonthPayCount:%d
|
| | | MonthPayCount:%d,
|
| | | SelectItemValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordID,
|
| | | self.TodayPayCount,
|
| | | self.TotalPayCount,
|
| | | self.WeekPayCount,
|
| | | self.MonthPayCount
|
| | | self.MonthPayCount,
|
| | | self.SelectItemValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountCTGID(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("CTGID", c_ushort), # 充值表ID
|
| | | ("Discount", 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.CTGID = 0
|
| | | self.Discount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActBuyCountCTGID)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo:
|
| | | CTGID:%d,
|
| | | Discount:%d
|
| | | '''\
|
| | | %(
|
| | | self.CTGID,
|
| | | self.Discount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActBuyCountGiftInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | |
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CTGIDCount = 0 #(BYTE CTGIDCount)
|
| | | CTGIDInfoList = list() #(vector<tagMCActBuyCountCTGID> CTGIDInfoList)// CTGID信息列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | CTGIDList = list() #(vector<WORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | GiftCount = 0 #(BYTE GiftCount)
|
| | | BuyCountGiftList = list() #(vector<tagMCActBuyCountGift> BuyCountGiftList)// 购买次数礼包列表
|
| | | data = None
|
| | |
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CTGIDCount):
|
| | | temCTGIDInfoList = tagMCActBuyCountCTGID()
|
| | | _pos = temCTGIDInfoList.ReadData(_lpData, _pos)
|
| | | self.CTGIDInfoList.append(temCTGIDInfoList)
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.CTGIDList.append(value)
|
| | | self.GiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftCount):
|
| | | temBuyCountGiftList = tagMCActBuyCountGift()
|
| | |
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDInfoList = list()
|
| | | self.CTGIDList = list()
|
| | | self.GiftCount = 0
|
| | | self.BuyCountGiftList = list()
|
| | | return
|
| | |
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.CTGIDCount):
|
| | | length += self.CTGIDInfoList[i].GetLength()
|
| | | length += 2 * self.CTGIDCount
|
| | | length += 1
|
| | | for i in range(self.GiftCount):
|
| | | length += self.BuyCountGiftList[i].GetLength()
|
| | |
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteBYTE(data, self.CTGIDCount)
|
| | | for i in range(self.CTGIDCount):
|
| | | data = CommFunc.WriteString(data, self.CTGIDInfoList[i].GetLength(), self.CTGIDInfoList[i].GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.CTGIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.GiftCount)
|
| | | for i in range(self.GiftCount):
|
| | | data = CommFunc.WriteString(data, self.BuyCountGiftList[i].GetLength(), self.BuyCountGiftList[i].GetBuffer())
|
| | |
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | CTGIDCount:%d,
|
| | | CTGIDInfoList:%s,
|
| | | CTGIDList:%s,
|
| | | GiftCount:%d,
|
| | | BuyCountGiftList:%s
|
| | | '''\
|