| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C0 09 跨服战场玩家购买战场信息 #tagGCCrossBattlefieldBuyInfo
|
| | |
|
| | | class tagGCCrossBattlefieldPlayer(Structure):
|
| | | PlayerID = 0 #(DWORD PlayerID)
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | | Job = 0 #(BYTE Job)
|
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界
|
| | | FightPower = 0 #(DWORD FightPower)//战力求余亿部分
|
| | | FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.PlayerID = 0
|
| | | self.PlayerName = ""
|
| | | self.Job = 0
|
| | | self.LV = 0
|
| | | self.RealmLV = 0
|
| | | self.FightPower = 0
|
| | | self.FightPowerEx = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 33
|
| | | length += 1
|
| | | length += 2
|
| | | length += 2
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Job)
|
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPower)
|
| | | data = CommFunc.WriteDWORD(data, self.FightPowerEx)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | FightPower:%d,
|
| | | FightPowerEx:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.FightPower,
|
| | | self.FightPowerEx
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossBattlefieldBuyPlayer(Structure):
|
| | | BuyPlayerID = 0 #(DWORD BuyPlayerID)//购买的玩家ID,即召集人
|
| | | Faction = 0 #(BYTE Faction)//阵营 1-红;2-蓝
|
| | | FactionPlayerCount = 0 #(BYTE FactionPlayerCount)
|
| | | FactionPlayerList = list() #(vector<tagGCCrossBattlefieldPlayer> FactionPlayerList)//阵营所有玩家列表,包含召集人
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.BuyPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.FactionPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.FactionPlayerCount):
|
| | | temFactionPlayerList = tagGCCrossBattlefieldPlayer()
|
| | | _pos = temFactionPlayerList.ReadData(_lpData, _pos)
|
| | | self.FactionPlayerList.append(temFactionPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.BuyPlayerID = 0
|
| | | self.Faction = 0
|
| | | self.FactionPlayerCount = 0
|
| | | self.FactionPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.FactionPlayerCount):
|
| | | length += self.FactionPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.BuyPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Faction)
|
| | | data = CommFunc.WriteBYTE(data, self.FactionPlayerCount)
|
| | | for i in range(self.FactionPlayerCount):
|
| | | data = CommFunc.WriteString(data, self.FactionPlayerList[i].GetLength(), self.FactionPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | BuyPlayerID:%d,
|
| | | Faction:%d,
|
| | | FactionPlayerCount:%d,
|
| | | FactionPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.BuyPlayerID,
|
| | | self.Faction,
|
| | | self.FactionPlayerCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossBattlefieldBuyHM(Structure):
|
| | | Hour = 0 #(BYTE Hour)//战场开启时
|
| | | Minute = 0 #(BYTE Minute)//战场开启分
|
| | | BuyPlayerCount = 0 #(BYTE BuyPlayerCount)
|
| | | BuyPlayerList = list() #(vector<tagGCCrossBattlefieldBuyPlayer> BuyPlayerList)//购买本场次的玩家信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Hour,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Minute,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.BuyPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BuyPlayerCount):
|
| | | temBuyPlayerList = tagGCCrossBattlefieldBuyPlayer()
|
| | | _pos = temBuyPlayerList.ReadData(_lpData, _pos)
|
| | | self.BuyPlayerList.append(temBuyPlayerList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Hour = 0
|
| | | self.Minute = 0
|
| | | self.BuyPlayerCount = 0
|
| | | self.BuyPlayerList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.BuyPlayerCount):
|
| | | length += self.BuyPlayerList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.Hour)
|
| | | data = CommFunc.WriteBYTE(data, self.Minute)
|
| | | data = CommFunc.WriteBYTE(data, self.BuyPlayerCount)
|
| | | for i in range(self.BuyPlayerCount):
|
| | | data = CommFunc.WriteString(data, self.BuyPlayerList[i].GetLength(), self.BuyPlayerList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Hour:%d,
|
| | | Minute:%d,
|
| | | BuyPlayerCount:%d,
|
| | | BuyPlayerList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Hour,
|
| | | self.Minute,
|
| | | self.BuyPlayerCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCCrossBattlefieldBuyInfo(Structure):
|
| | | Head = tagHead()
|
| | | HMCount = 0 #(BYTE HMCount)// 为0时清空重置,其他为增量更新
|
| | | HMBuyList = list() #(vector<tagGCCrossBattlefieldBuyHM> HMBuyList)//购买场次列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x09
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.HMCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.HMCount):
|
| | | temHMBuyList = tagGCCrossBattlefieldBuyHM()
|
| | | _pos = temHMBuyList.ReadData(_lpData, _pos)
|
| | | self.HMBuyList.append(temHMBuyList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x09
|
| | | self.HMCount = 0
|
| | | self.HMBuyList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.HMCount):
|
| | | length += self.HMBuyList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.HMCount)
|
| | | for i in range(self.HMCount):
|
| | | data = CommFunc.WriteString(data, self.HMBuyList[i].GetLength(), self.HMBuyList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | HMCount:%d,
|
| | | HMBuyList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.HMCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCCrossBattlefieldBuyInfo=tagGCCrossBattlefieldBuyInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossBattlefieldBuyInfo.Head.Cmd,m_NAtagGCCrossBattlefieldBuyInfo.Head.SubCmd))] = m_NAtagGCCrossBattlefieldBuyInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C0 07 跨服排行榜信息 #tagGCCrossBillboardInfo
|
| | |
|
| | | class tagGCCrossBillboardData(Structure):
|
| | |
| | |
|
| | | class tagGCLuckyCloudBuyLotteryRecInfo(Structure):
|
| | | Head = tagHead()
|
| | | ZoneID = 0 #(BYTE ZoneID)// 分区
|
| | | ZoneCount = 0 #(BYTE ZoneCount)// 分区数
|
| | | ZoneIDList = list() #(vector<BYTE> ZoneIDList)// 所有分区ID列表
|
| | | ZoneID = 0 #(BYTE ZoneID)// 返回记录分区ID
|
| | | Count = 0 #(WORD Count)
|
| | | LotteryRecList = list() #(vector<tagGCLuckyCloudBuyLotteryRec> LotteryRecList)
|
| | | data = None
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ZoneCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ZoneCount):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.ZoneIDList.append(value)
|
| | | self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x14
|
| | | self.ZoneCount = 0
|
| | | self.ZoneIDList = list()
|
| | | self.ZoneID = 0
|
| | | self.Count = 0
|
| | | self.LotteryRecList = list()
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1 * self.ZoneCount
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ZoneCount)
|
| | | for i in range(self.ZoneCount):
|
| | | data = CommFunc.WriteBYTE(data, self.ZoneIDList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.ZoneID)
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | for i in range(self.Count):
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ZoneCount:%d,
|
| | | ZoneIDList:%s,
|
| | | ZoneID:%d,
|
| | | Count:%d,
|
| | | LotteryRecList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ZoneCount,
|
| | | "...",
|
| | | self.ZoneID,
|
| | | self.Count,
|
| | | "..."
|
| | |
| | |
|
| | | class tagGCLuckyCloudBuyNumRecInfo(Structure):
|
| | | Head = tagHead()
|
| | | RemainCount = 0 #(WORD RemainCount)// 开奖剩余份数
|
| | | Count = 0 #(WORD Count)
|
| | | BuyNumRecList = list() #(vector<tagGCLuckyCloudBuyNumRec> BuyNumRecList)
|
| | | data = None
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.RemainCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temBuyNumRecList = tagGCLuckyCloudBuyNumRec()
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x13
|
| | | self.RemainCount = 0
|
| | | self.Count = 0
|
| | | self.BuyNumRecList = list()
|
| | | return
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.BuyNumRecList[i].GetLength()
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.RemainCount)
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.BuyNumRecList[i].GetLength(), self.BuyNumRecList[i].GetBuffer())
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | RemainCount:%d,
|
| | | Count:%d,
|
| | | BuyNumRecList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.RemainCount,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | |
| | | #------------------------------------------------------
|
| | | # C0 12 幸运云购轮次信息 #tagGCLuckyCloudBuyRoundInfo
|
| | |
|
| | | class tagGCLuckyCloudBuyRoundInfo(Structure):
|
| | | class tagGCLuckyCloudBuyRoundItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RoundID", c_int), # 轮次唯一ID标识,当收到的轮次ID变更时,前端需清空购买号码记录缓存
|
| | | ("RoundNum", c_ubyte), # 今日第几轮
|
| | | ("SuperItemID", c_int), # 大奖物品ID
|
| | | ("SuperItemCount", c_ubyte), # 大奖物品个数
|
| | | ("SuperItemMoneyType", c_ubyte), # 大奖价值货币类型
|
| | | ("SuperItemMoneyValue", c_int), # 大奖价值
|
| | | ("RemainCount", c_ushort), # 开奖剩余份数
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), # 是否拍品
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xC0
|
| | | self.SubCmd = 0x12
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | |
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xC0
|
| | | self.SubCmd = 0x12
|
| | | self.RoundID = 0
|
| | | self.RoundNum = 0
|
| | | self.SuperItemID = 0
|
| | | self.SuperItemCount = 0
|
| | | self.SuperItemMoneyType = 0
|
| | | self.SuperItemMoneyValue = 0
|
| | | self.RemainCount = 0
|
| | | self.ItemID = 0
|
| | | self.ItemCount = 0
|
| | | self.IsBind = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCLuckyCloudBuyRoundInfo)
|
| | | return sizeof(tagGCLuckyCloudBuyRoundItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// C0 12 幸运云购轮次信息 //tagGCLuckyCloudBuyRoundInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCLuckyCloudBuyRoundInfo(Structure):
|
| | | Head = tagHead()
|
| | | ZoneID = 0 #(BYTE ZoneID)// 所属分区ID
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | RoundID = 0 #(DWORD RoundID)// 轮次唯一ID标识,当收到的轮次ID变更时,前端需清空购买号码记录缓存
|
| | | RoundNum = 0 #(BYTE RoundNum)// 今日第几轮
|
| | | SuperItemID = 0 #(DWORD SuperItemID)// 大奖物品ID
|
| | | SuperItemCount = 0 #(BYTE SuperItemCount)// 大奖物品个数
|
| | | SuperItemMoneyType = 0 #(BYTE SuperItemMoneyType)// 大奖价值货币类型
|
| | | SuperItemMoneyValue = 0 #(DWORD SuperItemMoneyValue)// 大奖价值
|
| | | LVLimit = 0 #(WORD LVLimit)//开启等级
|
| | | BaseItemCount = 0 #(BYTE BaseItemCount)// 每次购买固定奖励物品数
|
| | | BaseItemList = list() #(vector<tagGCLuckyCloudBuyRoundItem> BaseItemList)// 每次购买固定奖励物品信息
|
| | | RandItemCount = 0 #(BYTE RandItemCount)// 每次购买随机奖励物品数
|
| | | RandItemList = list() #(vector<tagGCLuckyCloudBuyRoundItem> RandItemList)// 每次购买随机奖励物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x12
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.RoundID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SuperItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SuperItemMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SuperItemMoneyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.LVLimit,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.BaseItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.BaseItemCount):
|
| | | temBaseItemList = tagGCLuckyCloudBuyRoundItem()
|
| | | _pos = temBaseItemList.ReadData(_lpData, _pos)
|
| | | self.BaseItemList.append(temBaseItemList)
|
| | | self.RandItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RandItemCount):
|
| | | temRandItemList = tagGCLuckyCloudBuyRoundItem()
|
| | | _pos = temRandItemList.ReadData(_lpData, _pos)
|
| | | self.RandItemList.append(temRandItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xC0
|
| | | self.Head.SubCmd = 0x12
|
| | | self.ZoneID = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.RoundID = 0
|
| | | self.RoundNum = 0
|
| | | self.SuperItemID = 0
|
| | | self.SuperItemCount = 0
|
| | | self.SuperItemMoneyType = 0
|
| | | self.SuperItemMoneyValue = 0
|
| | | self.LVLimit = 0
|
| | | self.BaseItemCount = 0
|
| | | self.BaseItemList = list()
|
| | | self.RandItemCount = 0
|
| | | self.RandItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.BaseItemCount):
|
| | | length += self.BaseItemList[i].GetLength()
|
| | | length += 1
|
| | | for i in range(self.RandItemCount):
|
| | | length += self.RandItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ZoneID)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteDWORD(data, self.RoundID)
|
| | | data = CommFunc.WriteBYTE(data, self.RoundNum)
|
| | | data = CommFunc.WriteDWORD(data, self.SuperItemID)
|
| | | data = CommFunc.WriteBYTE(data, self.SuperItemCount)
|
| | | data = CommFunc.WriteBYTE(data, self.SuperItemMoneyType)
|
| | | data = CommFunc.WriteDWORD(data, self.SuperItemMoneyValue)
|
| | | data = CommFunc.WriteWORD(data, self.LVLimit)
|
| | | data = CommFunc.WriteBYTE(data, self.BaseItemCount)
|
| | | for i in range(self.BaseItemCount):
|
| | | data = CommFunc.WriteString(data, self.BaseItemList[i].GetLength(), self.BaseItemList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.RandItemCount)
|
| | | for i in range(self.RandItemCount):
|
| | | data = CommFunc.WriteString(data, self.RandItemList[i].GetLength(), self.RandItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ZoneID:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | RoundID:%d,
|
| | | RoundNum:%d,
|
| | | SuperItemID:%d,
|
| | | SuperItemCount:%d,
|
| | | SuperItemMoneyType:%d,
|
| | | SuperItemMoneyValue:%d,
|
| | | RemainCount:%d
|
| | | LVLimit:%d,
|
| | | BaseItemCount:%d,
|
| | | BaseItemList:%s,
|
| | | RandItemCount:%d,
|
| | | RandItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Head.OutputString(),
|
| | | self.ZoneID,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.RoundID,
|
| | | self.RoundNum,
|
| | | self.SuperItemID,
|
| | | self.SuperItemCount,
|
| | | self.SuperItemMoneyType,
|
| | | self.SuperItemMoneyValue,
|
| | | self.RemainCount
|
| | | self.LVLimit,
|
| | | self.BaseItemCount,
|
| | | "...",
|
| | | self.RandItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCLuckyCloudBuyRoundInfo=tagGCLuckyCloudBuyRoundInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyRoundInfo.Cmd,m_NAtagGCLuckyCloudBuyRoundInfo.SubCmd))] = m_NAtagGCLuckyCloudBuyRoundInfo
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyRoundInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyRoundInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyRoundInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C1 07 跨服战场玩家信息 #tagMCCrossBattlefieldPlayerInfo
|
| | |
|
| | | class tagMCCrossBattlefieldPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BuyOpenCountToday", c_ubyte), # 今日已购买开启战场次数
|
| | | ("HighScoreToday", c_int), # 今日最高积分
|
| | | ("EnterCountWeek", c_int), # 本周总参与次数
|
| | | ("BuyOpenCountWeek", c_int), # 本周总购买召集次数
|
| | | ("HighScoreTotalWeek", c_int), # 本周每日最高分累加总分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xC1
|
| | | self.SubCmd = 0x07
|
| | | 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 = 0xC1
|
| | | self.SubCmd = 0x07
|
| | | self.BuyOpenCountToday = 0
|
| | | self.HighScoreToday = 0
|
| | | self.EnterCountWeek = 0
|
| | | self.BuyOpenCountWeek = 0
|
| | | self.HighScoreTotalWeek = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCCrossBattlefieldPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// C1 07 跨服战场玩家信息 //tagMCCrossBattlefieldPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BuyOpenCountToday:%d,
|
| | | HighScoreToday:%d,
|
| | | EnterCountWeek:%d,
|
| | | BuyOpenCountWeek:%d,
|
| | | HighScoreTotalWeek:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BuyOpenCountToday,
|
| | | self.HighScoreToday,
|
| | | self.EnterCountWeek,
|
| | | self.BuyOpenCountWeek,
|
| | | self.HighScoreTotalWeek
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossBattlefieldPlayerInfo=tagMCCrossBattlefieldPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossBattlefieldPlayerInfo.Cmd,m_NAtagMCCrossBattlefieldPlayerInfo.SubCmd))] = m_NAtagMCCrossBattlefieldPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C1 02 跨服PK玩家奖励记录 #tagMCCrossRealmPKAwardState
|
| | |
|
| | | class tagMCCrossRealmPKAwardState(Structure):
|