| | |
| | | ("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
|
| | |
|
| | |
| | |
|
| | | m_NAtagMCAttackMode=tagMCAttackMode()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAttackMode.Cmd,m_NAtagMCAttackMode.SubCmd))] = m_NAtagMCAttackMode
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 06 自动转化为对应物品ID个数刷新 #tagMCAutoItemCountRefresh
|
| | |
|
| | | class tagMCAutoItemCount(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_int), |
| | | ]
|
| | |
|
| | | 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(tagMCAutoItemCount)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A2 06 自动转化为对应物品ID个数刷新 //tagMCAutoItemCountRefresh:
|
| | | ItemID:%d,
|
| | | ItemCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCAutoItemCountRefresh(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)// 刷新个数
|
| | | ItemCountList = list() #(vector<tagMCAutoItemCount> ItemCountList)// 物品信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x06
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temItemCountList = tagMCAutoItemCount()
|
| | | _pos = temItemCountList.ReadData(_lpData, _pos)
|
| | | self.ItemCountList.append(temItemCountList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x06
|
| | | self.Count = 0
|
| | | self.ItemCountList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.ItemCountList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.ItemCountList[i].GetLength(), self.ItemCountList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ItemCountList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCAutoItemCountRefresh=tagMCAutoItemCountRefresh()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAutoItemCountRefresh.Head.Cmd,m_NAtagMCAutoItemCountRefresh.Head.SubCmd))] = m_NAtagMCAutoItemCountRefresh
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagMCGatherSoulHoleInfo=tagMCGatherSoulHoleInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherSoulHoleInfo.Head.Cmd,m_NAtagMCGatherSoulHoleInfo.Head.SubCmd))] = m_NAtagMCGatherSoulHoleInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 61 新聚魂孔信息 #tagMCGatherTheSoulHoleInfo
|
| | |
|
| | | class tagMCGatherTheSoulHoleInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 孔数
|
| | | HoleSoulList = list() #(vector<DWORD> HoleSoulList)// 孔聚魂ID列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x61
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.HoleSoulList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x61
|
| | | self.Count = 0
|
| | | self.HoleSoulList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 4 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteDWORD(data, self.HoleSoulList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | HoleSoulList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGatherTheSoulHoleInfo=tagMCGatherTheSoulHoleInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherTheSoulHoleInfo.Head.Cmd,m_NAtagMCGatherTheSoulHoleInfo.Head.SubCmd))] = m_NAtagMCGatherTheSoulHoleInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 60 新聚魂信息 #tagMCGatherTheSoulInfo
|
| | |
|
| | | class tagMCGatherTheSoul(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("SoulID", c_int), |
| | | ("LV", 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.SoulID = 0
|
| | | self.LV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGatherTheSoul)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 60 新聚魂信息 //tagMCGatherTheSoulInfo:
|
| | | SoulID:%d,
|
| | | LV:%d
|
| | | '''\
|
| | | %(
|
| | | self.SoulID,
|
| | | self.LV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGatherTheSoulInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | SoulList = list() #(vector<tagMCGatherTheSoul> SoulList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x60
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temSoulList = tagMCGatherTheSoul()
|
| | | _pos = temSoulList.ReadData(_lpData, _pos)
|
| | | self.SoulList.append(temSoulList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x60
|
| | | self.Count = 0
|
| | | self.SoulList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.SoulList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.SoulList[i].GetLength(), self.SoulList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | SoulList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGatherTheSoulInfo=tagMCGatherTheSoulInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGatherTheSoulInfo.Head.Cmd,m_NAtagMCGatherTheSoulInfo.Head.SubCmd))] = m_NAtagMCGatherTheSoulInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | # A3 51 寻宝功能信息 #tagMCTreasureInfo
|
| | |
|
| | | class tagMCTreasureTypeInfo(Structure):
|
| | | TreasureType = 0 #(BYTE TreasureType)//寻宝类型
|
| | | LuckValue = 0 #(WORD LuckValue)//当前幸运值
|
| | | IndexCount = 0 #(BYTE IndexCount)//索引个数
|
| | | FreeCountTime = list() #(vector<DWORD> FreeCountTime)// 模式对应开始计算免费次数时间time值
|
| | | data = None
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("TreasureType", c_ubyte), #寻宝类型
|
| | | ("LuckValue", c_ushort), #当前幸运值
|
| | | ("TreasureCount", c_int), #已寻宝总次数
|
| | | ("FreeCountToday", c_ushort), #今日已免费寻宝次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | self.TreasureType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LuckValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.IndexCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.IndexCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.FreeCountTime.append(value)
|
| | | return _pos
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.TreasureType = 0
|
| | | self.LuckValue = 0
|
| | | self.IndexCount = 0
|
| | | self.FreeCountTime = list()
|
| | | self.TreasureCount = 0
|
| | | self.FreeCountToday = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.IndexCount
|
| | |
|
| | | return length
|
| | | return sizeof(tagMCTreasureTypeInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteBYTE(data, self.TreasureType)
|
| | | data = CommFunc.WriteWORD(data, self.LuckValue)
|
| | | data = CommFunc.WriteBYTE(data, self.IndexCount)
|
| | | for i in range(self.IndexCount):
|
| | | data = CommFunc.WriteDWORD(data, self.FreeCountTime[i])
|
| | | return data
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | DumpString = '''// A3 51 寻宝功能信息 //tagMCTreasureInfo:
|
| | | TreasureType:%d,
|
| | | LuckValue:%d,
|
| | | IndexCount:%d,
|
| | | FreeCountTime:%s
|
| | | TreasureCount:%d,
|
| | | FreeCountToday:%d
|
| | | '''\
|
| | | %(
|
| | | self.TreasureType,
|
| | | self.LuckValue,
|
| | | self.IndexCount,
|
| | | "..."
|
| | | self.TreasureCount,
|
| | | self.FreeCountToday
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | class tagMCTreasureResult(Structure):
|
| | | Head = tagHead()
|
| | | AddTreasureScore = 0 #(WORD AddTreasureScore)// 本次寻宝增加的寻宝积分
|
| | | AddMoneyType = 0 #(BYTE AddMoneyType)// 本次寻宝增加的积分货币类型,可能为0
|
| | | AddMoneyValue = 0 #(WORD AddMoneyValue)// 本次寻宝增加的积分货币值,可能为0
|
| | | AddTreasureLuck = 0 #(WORD AddTreasureLuck)// 本次寻宝增加的幸运值
|
| | | TreasureResultLen = 0 #(WORD TreasureResultLen)
|
| | | TreasureResult = "" #(String TreasureResult)// 获得物品结果[[格子编号, 物品ID,个数,是否绑定], ...]
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.AddTreasureScore,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.AddMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AddMoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.AddTreasureLuck,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.TreasureResultLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.TreasureResult,_pos = CommFunc.ReadString(_lpData, _pos,self.TreasureResultLen)
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x50
|
| | | self.AddTreasureScore = 0
|
| | | self.AddMoneyType = 0
|
| | | self.AddMoneyValue = 0
|
| | | self.AddTreasureLuck = 0
|
| | | self.TreasureResultLen = 0
|
| | | self.TreasureResult = ""
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += 2
|
| | | length += 2
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteWORD(data, self.AddTreasureScore)
|
| | | data = CommFunc.WriteBYTE(data, self.AddMoneyType)
|
| | | data = CommFunc.WriteWORD(data, self.AddMoneyValue)
|
| | | data = CommFunc.WriteWORD(data, self.AddTreasureLuck)
|
| | | data = CommFunc.WriteWORD(data, self.TreasureResultLen)
|
| | | data = CommFunc.WriteString(data, self.TreasureResultLen, self.TreasureResult)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | AddTreasureScore:%d,
|
| | | AddMoneyType:%d,
|
| | | AddMoneyValue:%d,
|
| | | AddTreasureLuck:%d,
|
| | | TreasureResultLen:%d,
|
| | | TreasureResult:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.AddTreasureScore,
|
| | | self.AddMoneyType,
|
| | | self.AddMoneyValue,
|
| | | self.AddTreasureLuck,
|
| | | self.TreasureResultLen,
|
| | | self.TreasureResult
|
| | |
| | | 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)// 购买次数礼包列表
|
| | | ShopType = 0 #(WORD ShopType)// 开放商店类型,可能为0不开放
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | 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()
|
| | | _pos = temBuyCountGiftList.ReadData(_lpData, _pos)
|
| | | self.BuyCountGiftList.append(temBuyCountGiftList)
|
| | | self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.ResetType = 0
|
| | | self.LimitLV = 0
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDInfoList = list()
|
| | | self.CTGIDList = list()
|
| | | self.GiftCount = 0
|
| | | self.BuyCountGiftList = list()
|
| | | self.ShopType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | 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()
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | 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())
|
| | | data = CommFunc.WriteWORD(data, self.ShopType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | ResetType:%d,
|
| | | LimitLV:%d,
|
| | | CTGIDCount:%d,
|
| | | CTGIDInfoList:%s,
|
| | | CTGIDList:%s,
|
| | | GiftCount:%d,
|
| | | BuyCountGiftList:%s
|
| | | BuyCountGiftList:%s,
|
| | | ShopType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.CTGIDCount,
|
| | | "...",
|
| | | self.GiftCount,
|
| | | "..."
|
| | | "...",
|
| | | self.ShopType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("ItemCount", c_ushort),
|
| | | ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中;
|
| | | ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0
|
| | | ("LotteryScore", c_int), #当前抽奖积分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.ItemCount = 0
|
| | | self.PosNum = 0
|
| | | self.TotalTimesNow = 0
|
| | | self.LotteryScore = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | PosNum:%d,
|
| | | TotalTimesNow:%d
|
| | | TotalTimesNow:%d,
|
| | | LotteryScore:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | |
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.PosNum,
|
| | | self.TotalTimesNow
|
| | | self.TotalTimesNow,
|
| | | self.LotteryScore
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | #------------------------------------------------------
|
| | | # AA 58 仙匣秘境活动信息 #tagMCActXianXiaMJInfo
|
| | |
|
| | | class tagMCActXianXiaMJAwardItem(Structure):
|
| | | class tagMCActXianXiaMJItem(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(tagMCActXianXiaMJItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 58 仙匣秘境活动信息 //tagMCActXianXiaMJInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActXianXiaMJBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCActXianXiaMJItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCActXianXiaMJItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActXianXiaMJInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)// 活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | UseItemID = 0 #(DWORD UseItemID)//消耗物品ID,默认1个;消耗物品或货币二选一即可,或都配则先消耗道具,不足则消耗货币
|
| | | MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
|
| | | MoneyValue = 0 #(WORD MoneyValue)//消耗货币值
|
| | | LotteryAddScore = 0 #(WORD LotteryAddScore)//每次抽奖加积分
|
| | | LayerAddScore = 0 #(WORD LayerAddScore)//每次跨层加积分
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCActXianXiaMJBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x58
|
| | | 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.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.UseItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LotteryAddScore,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LayerAddScore,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCActXianXiaMJBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x58
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.IsDayReset = 0
|
| | | self.LimitLV = 0
|
| | | self.UseItemID = 0
|
| | | self.MoneyType = 0
|
| | | self.MoneyValue = 0
|
| | | self.LotteryAddScore = 0
|
| | | self.LayerAddScore = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[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.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteWORD(data, self.LimitLV)
|
| | | data = CommFunc.WriteDWORD(data, self.UseItemID)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneyType)
|
| | | data = CommFunc.WriteWORD(data, self.MoneyValue)
|
| | | data = CommFunc.WriteWORD(data, self.LotteryAddScore)
|
| | | data = CommFunc.WriteWORD(data, self.LayerAddScore)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | UseItemID:%d,
|
| | | MoneyType:%d,
|
| | | MoneyValue:%d,
|
| | | LotteryAddScore:%d,
|
| | | LayerAddScore:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.UseItemID,
|
| | | self.MoneyType,
|
| | | self.MoneyValue,
|
| | | self.LotteryAddScore,
|
| | | self.LayerAddScore,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActXianXiaMJInfo=tagMCActXianXiaMJInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJInfo.Head.Cmd,m_NAtagMCActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 79 仙匣秘境层信息 #tagMCActXianXiaMJLayerInfo
|
| | |
|
| | | class tagMCActXianXiaMJLayerItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库
|
| | |
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActXianXiaMJAwardItem)
|
| | | return sizeof(tagMCActXianXiaMJLayerItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 58 仙匣秘境活动信息 //tagMCActXianXiaMJInfo:
|
| | | DumpString = '''// AA 79 仙匣秘境层信息 //tagMCActXianXiaMJLayerInfo:
|
| | | ItemLibType:%d,
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActXianXiaMJInfo(Structure):
|
| | | class tagMCActXianXiaMJLayerInfo(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)// 限制等级
|
| | | ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置
|
| | | MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
|
| | | MoneyValue = 0 #(WORD MoneyValue)//消耗货币值
|
| | | LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层
|
| | | LayerNum = 0 #(WORD LayerNum)//当前奖池第几层
|
| | | LotteryScore = 0 #(DWORD LotteryScore)//当前抽奖积分
|
| | | AwardItemCount = 0 #(BYTE AwardItemCount)
|
| | | AwardItemList = list() #(vector<tagMCActXianXiaMJAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
|
| | | AwardItemList = list() #(vector<tagMCActXianXiaMJLayerItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品
|
| | | SuperItemCount = 0 #(BYTE SuperItemCount)
|
| | | SuperItemList = list() #(vector<tagMCActXianXiaMJAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
|
| | | SuperItemList = list() #(vector<tagMCActXianXiaMJLayerItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品;
|
| | | SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x58
|
| | | self.Head.SubCmd = 0x79
|
| | | 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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LayerNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.LotteryScore,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardItemCount):
|
| | | temAwardItemList = tagMCActXianXiaMJAwardItem()
|
| | | temAwardItemList = tagMCActXianXiaMJLayerItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.SuperItemCount):
|
| | | temSuperItemList = tagMCActXianXiaMJAwardItem()
|
| | | temSuperItemList = tagMCActXianXiaMJLayerItem()
|
| | | _pos = temSuperItemList.ReadData(_lpData, _pos)
|
| | | self.SuperItemList.append(temSuperItemList)
|
| | | self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | |
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x58
|
| | | self.Head.SubCmd = 0x79
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.LimitLV = 0
|
| | | self.ResetType = 0
|
| | | self.MoneyType = 0
|
| | | self.MoneyValue = 0
|
| | | self.LayerNum = 0
|
| | | self.LotteryScore = 0
|
| | | self.AwardItemCount = 0
|
| | | self.AwardItemList = list()
|
| | | self.SuperItemCount = 0
|
| | |
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.AwardItemCount):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
| | | 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.ResetType)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneyType)
|
| | | data = CommFunc.WriteWORD(data, self.MoneyValue)
|
| | | data = CommFunc.WriteBYTE(data, self.LayerNum)
|
| | | data = CommFunc.WriteWORD(data, self.LayerNum)
|
| | | data = CommFunc.WriteDWORD(data, self.LotteryScore)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardItemCount)
|
| | | for i in range(self.AwardItemCount):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | |
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | LimitLV:%d,
|
| | | ResetType:%d,
|
| | | MoneyType:%d,
|
| | | MoneyValue:%d,
|
| | | LayerNum:%d,
|
| | | LotteryScore:%d,
|
| | | AwardItemCount:%d,
|
| | | AwardItemList:%s,
|
| | | SuperItemCount:%d,
|
| | |
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.LimitLV,
|
| | | self.ResetType,
|
| | | self.MoneyType,
|
| | | self.MoneyValue,
|
| | | self.LayerNum,
|
| | | self.LotteryScore,
|
| | | self.AwardItemCount,
|
| | | "...",
|
| | | self.SuperItemCount,
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActXianXiaMJInfo=tagMCActXianXiaMJInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJInfo.Head.Cmd,m_NAtagMCActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJInfo
|
| | | m_NAtagMCActXianXiaMJLayerInfo=tagMCActXianXiaMJLayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJLayerInfo.Head.Cmd,m_NAtagMCActXianXiaMJLayerInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJLayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagMCCrossActBossTrialInfo=tagMCCrossActBossTrialInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActBossTrialInfo.Head.Cmd,m_NAtagMCCrossActBossTrialInfo.Head.SubCmd))] = m_NAtagMCCrossActBossTrialInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 80 仙匣秘境跨服活动信息 #tagMCCrossActXianXiaMJInfo
|
| | |
|
| | | class tagMCCrossActXianXiaMJItem(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(tagMCCrossActXianXiaMJItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 80 仙匣秘境跨服活动信息 //tagMCCrossActXianXiaMJInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActXianXiaMJBillard(Structure):
|
| | | Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名
|
| | | Count = 0 #(BYTE Count)// 奖励物品数
|
| | | AwardItemList = list() #(vector<tagMCCrossActXianXiaMJItem> AwardItemList)// 奖励物品列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temAwardItemList = tagMCCrossActXianXiaMJItem()
|
| | | _pos = temAwardItemList.ReadData(_lpData, _pos)
|
| | | self.AwardItemList.append(temAwardItemList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Rank = 0
|
| | | self.Count = 0
|
| | | self.AwardItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.AwardItemList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Rank:%d,
|
| | | Count:%d,
|
| | | AwardItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Rank,
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCCrossActXianXiaMJInfo(Structure):
|
| | | Head = tagHead()
|
| | | ServerInfoLen = 0 #(BYTE ServerInfoLen)
|
| | | ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服
|
| | | GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss
|
| | | JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss
|
| | | IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置
|
| | | RankLimitPersonal = 0 #(WORD RankLimitPersonal)// 个人榜上榜积分保底限制;
|
| | | PersonalBillCount = 0 #(BYTE PersonalBillCount)
|
| | | PersonalBillboardInfoList = list() #(vector<tagMCCrossActXianXiaMJBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x80
|
| | | 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.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
|
| | | self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RankLimitPersonal,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.PersonalBillCount):
|
| | | temPersonalBillboardInfoList = tagMCCrossActXianXiaMJBillard()
|
| | | _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos)
|
| | | self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x80
|
| | | self.ServerInfoLen = 0
|
| | | self.ServerIDRangeInfo = ""
|
| | | self.GroupValue1 = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.JoinStartTime = ""
|
| | | self.JoinEndTime = ""
|
| | | self.IsDayReset = 0
|
| | | self.RankLimitPersonal = 0
|
| | | self.PersonalBillCount = 0
|
| | | self.PersonalBillboardInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.ServerIDRangeInfo)
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 5
|
| | | length += 5
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | for i in range(self.PersonalBillCount):
|
| | | length += self.PersonalBillboardInfoList[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.WriteBYTE(data, self.GroupValue1)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinStartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.JoinEndTime)
|
| | | data = CommFunc.WriteBYTE(data, self.IsDayReset)
|
| | | data = CommFunc.WriteWORD(data, self.RankLimitPersonal)
|
| | | data = CommFunc.WriteBYTE(data, self.PersonalBillCount)
|
| | | for i in range(self.PersonalBillCount):
|
| | | data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ServerInfoLen:%d,
|
| | | ServerIDRangeInfo:%s,
|
| | | GroupValue1:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | JoinStartTime:%s,
|
| | | JoinEndTime:%s,
|
| | | IsDayReset:%d,
|
| | | RankLimitPersonal:%d,
|
| | | PersonalBillCount:%d,
|
| | | PersonalBillboardInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ServerInfoLen,
|
| | | self.ServerIDRangeInfo,
|
| | | self.GroupValue1,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.JoinStartTime,
|
| | | self.JoinEndTime,
|
| | | self.IsDayReset,
|
| | | self.RankLimitPersonal,
|
| | | self.PersonalBillCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCCrossActXianXiaMJInfo=tagMCCrossActXianXiaMJInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActXianXiaMJInfo.Head.Cmd,m_NAtagMCCrossActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCCrossActXianXiaMJInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("NeedValue", c_int), # 奖励所需值
|
| | | ("FreeRewardState", c_ubyte), # 免费奖励是否已领取
|
| | | ("ZLRewardState", c_ubyte), # 战令奖励是否已领取
|
| | | ("FreeRewardState", c_ubyte), # 免费战令奖励是否已领取
|
| | | ("ZLRewardState", c_ubyte), # 普通战令奖励是否已领取
|
| | | ("ZLRewardStateH", c_ubyte), # 高级战令奖励是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.NeedValue = 0
|
| | | self.FreeRewardState = 0
|
| | | self.ZLRewardState = 0
|
| | | self.ZLRewardStateH = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// B1 20 战令信息 //tagMCZhanlingInfo:
|
| | | NeedValue:%d,
|
| | | FreeRewardState:%d,
|
| | | ZLRewardState:%d
|
| | | ZLRewardState:%d,
|
| | | ZLRewardStateH:%d
|
| | | '''\
|
| | | %(
|
| | | self.NeedValue,
|
| | | self.FreeRewardState,
|
| | | self.ZLRewardState
|
| | | self.ZLRewardState,
|
| | | self.ZLRewardStateH
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | class tagMCZhanlingInfo(Structure):
|
| | | Head = tagHead()
|
| | | ZhanlingType = 0 #(BYTE ZhanlingType)// 战令类型
|
| | | IsActivite = 0 #(BYTE IsActivite)// 是否已激活
|
| | | IsActivite = 0 #(BYTE IsActivite)// 普通战令是否已激活
|
| | | IsActiviteH = 0 #(BYTE IsActiviteH)// 高级战令是否已激活
|
| | | Value1 = 0 #(DWORD Value1)// 战令对应的自定义值,可选,如登录战令代表开始计算日期时间戳
|
| | | RewardCount = 0 #(WORD RewardCount)
|
| | | RewardList = list() #(vector<tagMCZhanling> RewardList)
|
| | | data = None
|
| | |
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ZhanlingType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsActivite,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsActiviteH,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Value1,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.RewardCount):
|
| | | temRewardList = tagMCZhanling()
|
| | |
| | | self.Head.SubCmd = 0x20
|
| | | self.ZhanlingType = 0
|
| | | self.IsActivite = 0
|
| | | self.IsActiviteH = 0
|
| | | self.Value1 = 0
|
| | | self.RewardCount = 0
|
| | | self.RewardList = list()
|
| | | return
|
| | |
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 2
|
| | | for i in range(self.RewardCount):
|
| | | length += self.RewardList[i].GetLength()
|
| | |
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ZhanlingType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsActivite)
|
| | | data = CommFunc.WriteBYTE(data, self.IsActiviteH)
|
| | | data = CommFunc.WriteDWORD(data, self.Value1)
|
| | | data = CommFunc.WriteWORD(data, self.RewardCount)
|
| | | for i in range(self.RewardCount):
|
| | | data = CommFunc.WriteString(data, self.RewardList[i].GetLength(), self.RewardList[i].GetBuffer())
|
| | |
| | | Head:%s,
|
| | | ZhanlingType:%d,
|
| | | IsActivite:%d,
|
| | | IsActiviteH:%d,
|
| | | Value1:%d,
|
| | | RewardCount:%d,
|
| | | RewardList:%s
|
| | | '''\
|
| | |
| | | self.Head.OutputString(),
|
| | | self.ZhanlingType,
|
| | | self.IsActivite,
|
| | | self.IsActiviteH,
|
| | | self.Value1,
|
| | | self.RewardCount,
|
| | | "..."
|
| | | )
|
| | |
| | | ("EnterCountWeek", c_int), # 本周总参与次数
|
| | | ("BuyOpenCountWeek", c_int), # 本周总购买召集次数
|
| | | ("HighScoreTotalWeek", c_int), # 本周每日最高分累加总分
|
| | | ("ZoneID", c_ubyte), # 所属分区ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.EnterCountWeek = 0
|
| | | self.BuyOpenCountWeek = 0
|
| | | self.HighScoreTotalWeek = 0
|
| | | self.ZoneID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | HighScoreToday:%d,
|
| | | EnterCountWeek:%d,
|
| | | BuyOpenCountWeek:%d,
|
| | | HighScoreTotalWeek:%d
|
| | | HighScoreTotalWeek:%d,
|
| | | ZoneID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | |
| | | self.HighScoreToday,
|
| | | self.EnterCountWeek,
|
| | | self.BuyOpenCountWeek,
|
| | | self.HighScoreTotalWeek
|
| | | self.HighScoreTotalWeek,
|
| | | self.ZoneID
|
| | | )
|
| | | return DumpString
|
| | |
|