| | |
| | | # B0 35 福地记录信息 #tagGCMineAreaRecordInfo
|
| | |
|
| | | class tagGCMineAreaRecord(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RecordType", c_ubyte), # 记录类型;1-自己拉物品;2-物品被人抢
|
| | | ("TagPlayerID", c_int), # 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
|
| | | ("RecordTime", c_int), # 记录时间戳
|
| | | ("MineID", c_ushort), # 矿物ID,对应福地采集表中ID
|
| | | ]
|
| | | RecordType = 0 #(BYTE RecordType)// 记录类型;1-自己拉物品;2-物品被人抢
|
| | | TagPlayerID = 0 #(DWORD TagPlayerID)// 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的
|
| | | RecordTime = 0 #(DWORD RecordTime)// 记录时间戳
|
| | | MineID = 0 #(WORD MineID)// 矿物ID,对应福地采集表中ID
|
| | | TagPlayerName = "" #(char TagPlayerName[33])
|
| | | TagFace = 0 #(DWORD TagFace)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | | self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TagPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RecordTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.TagFace,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.RecordType = 0
|
| | | self.TagPlayerID = 0
|
| | | self.RecordTime = 0
|
| | | self.MineID = 0
|
| | | self.TagPlayerName = ""
|
| | | self.TagFace = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCMineAreaRecord)
|
| | | length = 0
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 2
|
| | | length += 33
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.RecordType)
|
| | | data = CommFunc.WriteDWORD(data, self.TagPlayerID)
|
| | | data = CommFunc.WriteDWORD(data, self.RecordTime)
|
| | | data = CommFunc.WriteWORD(data, self.MineID)
|
| | | data = CommFunc.WriteString(data, 33, self.TagPlayerName)
|
| | | data = CommFunc.WriteDWORD(data, self.TagFace)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B0 35 福地记录信息 //tagGCMineAreaRecordInfo:
|
| | | DumpString = '''
|
| | | RecordType:%d,
|
| | | TagPlayerID:%d,
|
| | | RecordTime:%d,
|
| | | MineID:%d
|
| | | MineID:%d,
|
| | | TagPlayerName:%s,
|
| | | TagFace:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordType,
|
| | | self.TagPlayerID,
|
| | | self.RecordTime,
|
| | | self.MineID
|
| | | self.MineID,
|
| | | self.TagPlayerName,
|
| | | self.TagFace
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | class tagMCCoinToGoldCount(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("RecordID", c_ubyte), |
| | | ("RecordID", c_ushort), |
| | | ("TodayPayCount", c_ushort), # 今日已购买次数
|
| | | ("TotalPayCount", c_int), # 累计总购买次数
|
| | | ("WeekPayCount", c_ushort), # 周总购买次数
|
| | |
| | |
|
| | | class tagMCCoinToGoldCountInfo(Structure):
|
| | | Head = tagHead()
|
| | | RecordCount = 0 #(BYTE RecordCount)
|
| | | RecordCount = 0 #(WORD RecordCount)
|
| | | CTGCountInfoList = list() #(vector<tagMCCoinToGoldCount> CTGCountInfoList)
|
| | | data = None
|
| | |
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RecordCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.RecordCount):
|
| | | temCTGCountInfoList = tagMCCoinToGoldCount()
|
| | | _pos = temCTGCountInfoList.ReadData(_lpData, _pos)
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.RecordCount):
|
| | | length += self.CTGCountInfoList[i].GetLength()
|
| | |
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RecordCount)
|
| | | data = CommFunc.WriteWORD(data, self.RecordCount)
|
| | | for i in range(self.RecordCount):
|
| | | data = CommFunc.WriteString(data, self.CTGCountInfoList[i].GetLength(), self.CTGCountInfoList[i].GetBuffer())
|
| | | return data
|
| | |
| | | OrderLen = 0 #(BYTE OrderLen)
|
| | | OrderID = "" #(String OrderID)// 订单id
|
| | | Coin = 0 #(DWORD Coin)// 充值的点卷
|
| | | RecordID = 0 #(BYTE RecordID)// ctgID
|
| | | RecordID = 0 #(WORD RecordID)// ctgID
|
| | | OrderInfoLen = 0 #(BYTE OrderInfoLen)
|
| | | OrderInfo = "" #(String OrderInfo)
|
| | | data = None
|
| | |
| | | self.OrderLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.OrderID,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderLen)
|
| | | self.Coin,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RecordID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RecordID,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen)
|
| | | return _pos
|
| | |
| | | length += 1
|
| | | length += len(self.OrderID)
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += len(self.OrderInfo)
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.OrderLen)
|
| | | data = CommFunc.WriteString(data, self.OrderLen, self.OrderID)
|
| | | data = CommFunc.WriteDWORD(data, self.Coin)
|
| | | data = CommFunc.WriteBYTE(data, self.RecordID)
|
| | | data = CommFunc.WriteWORD(data, self.RecordID)
|
| | | data = CommFunc.WriteBYTE(data, self.OrderInfoLen)
|
| | | data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo)
|
| | | return data
|
| | |
| | | ExAttr19 = 0 #(DWORD ExAttr19)//预留的扩展属性字段,用来存放项目特定的属性
|
| | | ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性
|
| | | HPEx = 0 #(DWORD HPEx)//当前血量 超过E的记录
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | RoleType = 0 #(DWORD RoleType)//角色类型(各项目可自定义含义,如种族,与职业区分)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.ExAttr19,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RoleType,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.ExAttr19 = 0
|
| | | self.ExAttr20 = 0
|
| | | self.HPEx = 0
|
| | | self.Face = 0
|
| | | self.RoleType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 4
|
| | | length += 4
|
| | | length += 15
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.ExAttr19)
|
| | | data = CommFunc.WriteDWORD(data, self.ExAttr20)
|
| | | data = CommFunc.WriteDWORD(data, self.HPEx)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | data = CommFunc.WriteDWORD(data, self.RoleType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | ExAttr18:%d,
|
| | | ExAttr19:%d,
|
| | | ExAttr20:%d,
|
| | | HPEx:%d
|
| | | HPEx:%d,
|
| | | Face:%d,
|
| | | RoleType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.ExAttr18,
|
| | | self.ExAttr19,
|
| | | self.ExAttr20,
|
| | | self.HPEx
|
| | | self.HPEx,
|
| | | self.Face,
|
| | | self.RoleType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | |
|
| | | class tagMCActGrowupBuyCTGInfo(Structure):
|
| | | CTGID = 0 #(BYTE CTGID)// 充值表ID
|
| | | CTGID = 0 #(WORD CTGID)// 充值表ID
|
| | | GainItemCount = 0 #(BYTE GainItemCount)// 获得物品数
|
| | | GainItemList = list() #(vector<tagMCActGrowupBuyCTGItem> GainItemList)// 获得物品列表,替换充值表中的 GainItemList 字段信息
|
| | | data = None
|
| | |
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.CTGID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CTGID,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.GainItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GainItemCount):
|
| | | temGainItemList = tagMCActGrowupBuyCTGItem()
|
| | |
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.GainItemCount):
|
| | | length += self.GainItemList[i].GetLength()
|
| | |
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.CTGID)
|
| | | data = CommFunc.WriteWORD(data, self.CTGID)
|
| | | data = CommFunc.WriteBYTE(data, self.GainItemCount)
|
| | | for i in range(self.GainItemCount):
|
| | | data = CommFunc.WriteString(data, self.GainItemList[i].GetLength(), self.GainItemList[i].GetBuffer())
|
| | |
| | | TreasureState = list() #(vector<BYTE> TreasureState)// 聚宝盆是否已激活列表,[类型0是否已激活, ...]
|
| | | TreasureAward = list() #(vector<BYTE> TreasureAward)// 聚宝盆奖励是否已领取列表,[类型0是否已领取, ...]
|
| | | TreasureProgress = list() #(vector<BYTE> TreasureProgress)// 聚宝盆进度值列表,[类型0进度值, ...],满进度100
|
| | | HelpAwardCount = 0 #(BYTE HelpAwardCount)// 今日已帮助别人奖励次数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.TreasureCount):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.TreasureProgress.append(value)
|
| | | self.HelpAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.TreasureState = list()
|
| | | self.TreasureAward = list()
|
| | | self.TreasureProgress = list()
|
| | | self.HelpAwardCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1 * self.TreasureCount
|
| | | length += 1 * self.TreasureCount
|
| | | length += 1 * self.TreasureCount
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.TreasureAward[i])
|
| | | for i in range(self.TreasureCount):
|
| | | data = CommFunc.WriteBYTE(data, self.TreasureProgress[i])
|
| | | data = CommFunc.WriteBYTE(data, self.HelpAwardCount)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | TreasureCount:%d,
|
| | | TreasureState:%s,
|
| | | TreasureAward:%s,
|
| | | TreasureProgress:%s
|
| | | TreasureProgress:%s,
|
| | | HelpAwardCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.TreasureCount,
|
| | | "...",
|
| | | "...",
|
| | | "..."
|
| | | "...",
|
| | | self.HelpAwardCount
|
| | | )
|
| | | return DumpString
|
| | |
|