From e4fc3ac2dea951d1345acb647cf9bc36142951e9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 12 二月 2026 11:41:47 +0800
Subject: [PATCH] 16 卡牌服务端(删除不需要的旧活动:成长必买、限时特惠、限时礼包、每日礼包、限时抢购、极品白拿、运势活动、天帝礼包、转盘、许愿池、幸运鉴宝;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 841 +++++---------------------------------------------------
1 files changed, 75 insertions(+), 766 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 040afff..7f6125f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -677,6 +677,77 @@
#------------------------------------------------------
+# A1 31 前端自定义保存设置内容 #tagCSSettingData
+
+class tagCSSettingData(Structure):
+ Head = tagHead()
+ KeyNum = 0 #(BYTE KeyNum)// 自定义key编号,后端使用数字key存储,前端自行进行转换定义,限制100个
+ DataLen = 0 #(BYTE DataLen)
+ SetData = "" #(String SetData)//自定义保存的内容
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA1
+ self.Head.SubCmd = 0x31
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.KeyNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.DataLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.SetData,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA1
+ self.Head.SubCmd = 0x31
+ self.KeyNum = 0
+ self.DataLen = 0
+ self.SetData = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += len(self.SetData)
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.KeyNum)
+ data = CommFunc.WriteBYTE(data, self.DataLen)
+ data = CommFunc.WriteString(data, self.DataLen, self.SetData)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ KeyNum:%d,
+ DataLen:%d,
+ SetData:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.KeyNum,
+ self.DataLen,
+ self.SetData
+ )
+ return DumpString
+
+
+m_NAtagCSSettingData=tagCSSettingData()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSSettingData.Head.Cmd,m_NAtagCSSettingData.Head.SubCmd))] = m_NAtagCSSettingData
+
+
+#------------------------------------------------------
#A1 03 设置是否成年 #tagCMAdult
class tagCMAdult(Structure):
@@ -7573,7 +7644,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("FamilyID", c_int),
- ("ServerID", c_int), #公会服务器ID,发0默认本服公会
+ ("DataServerID", c_int), #数据所在服务器ID
]
def __init__(self):
@@ -7591,7 +7662,7 @@
self.Cmd = 0xA6
self.SubCmd = 0x19
self.FamilyID = 0
- self.ServerID = 0
+ self.DataServerID = 0
return
def GetLength(self):
@@ -7605,13 +7676,13 @@
Cmd:%s,
SubCmd:%s,
FamilyID:%d,
- ServerID:%d
+ DataServerID:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.FamilyID,
- self.ServerID
+ self.DataServerID
)
return DumpString
@@ -8816,241 +8887,6 @@
#------------------------------------------------------
-# AA 20 天帝礼包选择物品 #tagCMActGodGiftChooseItem
-
-class tagCMActGodGiftChooseItemInfo(Structure):
- ItemLibType = 0 #(BYTE ItemLibType)//物品库类型
- Count = 0 #(BYTE Count)//选择个数
- ItemNumList = list() #(vector<BYTE> ItemNumList)//选择物品编号列表
- data = None
-
- def __init__(self):
- self.Clear()
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- self.ItemLibType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.Count):
- value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
- self.ItemNumList.append(value)
- return _pos
-
- def Clear(self):
- self.ItemLibType = 0
- self.Count = 0
- self.ItemNumList = list()
- return
-
- def GetLength(self):
- length = 0
- length += 1
- length += 1
- length += 1 * self.Count
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteBYTE(data, self.ItemLibType)
- data = CommFunc.WriteBYTE(data, self.Count)
- for i in range(self.Count):
- data = CommFunc.WriteBYTE(data, self.ItemNumList[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- ItemLibType:%d,
- Count:%d,
- ItemNumList:%s
- '''\
- %(
- self.ItemLibType,
- self.Count,
- "..."
- )
- return DumpString
-
-
-class tagCMActGodGiftChooseItem(Structure):
- Head = tagHead()
- ActNum = 0 #(BYTE ActNum)//活动编号
- ChooseLibCount = 0 #(BYTE ChooseLibCount)//选择库个数
- ChooseItemList = list() #(vector<tagCMActGodGiftChooseItemInfo> ChooseItemList)//选择库物品信息列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x20
- 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.ChooseLibCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.ChooseLibCount):
- temChooseItemList = tagCMActGodGiftChooseItemInfo()
- _pos = temChooseItemList.ReadData(_lpData, _pos)
- self.ChooseItemList.append(temChooseItemList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x20
- self.ActNum = 0
- self.ChooseLibCount = 0
- self.ChooseItemList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- for i in range(self.ChooseLibCount):
- length += self.ChooseItemList[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.WriteBYTE(data, self.ChooseLibCount)
- for i in range(self.ChooseLibCount):
- data = CommFunc.WriteString(data, self.ChooseItemList[i].GetLength(), self.ChooseItemList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActNum:%d,
- ChooseLibCount:%d,
- ChooseItemList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActNum,
- self.ChooseLibCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagCMActGodGiftChooseItem=tagCMActGodGiftChooseItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGodGiftChooseItem.Head.Cmd,m_NAtagCMActGodGiftChooseItem.Head.SubCmd))] = m_NAtagCMActGodGiftChooseItem
-
-
-#------------------------------------------------------
-# AA 21 天帝礼包抽奖 #tagCMActGodGiftlottery
-
-class tagCMActGodGiftlottery(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x21
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x21
- self.ActNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActGodGiftlottery)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 21 天帝礼包抽奖 //tagCMActGodGiftlottery:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum
- )
- return DumpString
-
-
-m_NAtagCMActGodGiftlottery=tagCMActGodGiftlottery()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGodGiftlottery.Cmd,m_NAtagCMActGodGiftlottery.SubCmd))] = m_NAtagCMActGodGiftlottery
-
-
-#------------------------------------------------------
-# AA 22 天帝礼包重置 #tagCMActGodGiftReset
-
-class tagCMActGodGiftReset(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x22
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x22
- self.ActNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActGodGiftReset)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 22 天帝礼包重置 //tagCMActGodGiftReset:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum
- )
- return DumpString
-
-
-m_NAtagCMActGodGiftReset=tagCMActGodGiftReset()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActGodGiftReset.Cmd,m_NAtagCMActGodGiftReset.SubCmd))] = m_NAtagCMActGodGiftReset
-
-
-#------------------------------------------------------
# AA 25 炼器操作 #tagCMActLianqiOP
class tagCMActLianqiOP(Structure):
@@ -9112,533 +8948,6 @@
m_NAtagCMActLianqiOP=tagCMActLianqiOP()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActLianqiOP.Cmd,m_NAtagCMActLianqiOP.SubCmd))] = m_NAtagCMActLianqiOP
-
-
-#------------------------------------------------------
-# AA 12 选择转盘活动物品 #tagCMActTurntableChooseItem
-
-class tagCMActTurntableChooseItem(Structure):
- Head = tagHead()
- ActNum = 0 #(BYTE ActNum)// 活动编号
- GoodItemNumCount = 0 #(BYTE GoodItemNumCount)
- GoodItemNumList = list() #(vector<BYTE> GoodItemNumList)// 选择的极品物品编号列表
- SuperItemNumCount = 0 #(BYTE SuperItemNumCount)
- SuperItemNumList = list() #(vector<BYTE> SuperItemNumList)// 选择的终极物品编号列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x12
- 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.GoodItemNumCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.GoodItemNumCount):
- value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
- self.GoodItemNumList.append(value)
- self.SuperItemNumCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.SuperItemNumCount):
- value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
- self.SuperItemNumList.append(value)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x12
- self.ActNum = 0
- self.GoodItemNumCount = 0
- self.GoodItemNumList = list()
- self.SuperItemNumCount = 0
- self.SuperItemNumList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1
- length += 1 * self.GoodItemNumCount
- length += 1
- length += 1 * self.SuperItemNumCount
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.ActNum)
- data = CommFunc.WriteBYTE(data, self.GoodItemNumCount)
- for i in range(self.GoodItemNumCount):
- data = CommFunc.WriteBYTE(data, self.GoodItemNumList[i])
- data = CommFunc.WriteBYTE(data, self.SuperItemNumCount)
- for i in range(self.SuperItemNumCount):
- data = CommFunc.WriteBYTE(data, self.SuperItemNumList[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- ActNum:%d,
- GoodItemNumCount:%d,
- GoodItemNumList:%s,
- SuperItemNumCount:%d,
- SuperItemNumList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.ActNum,
- self.GoodItemNumCount,
- "...",
- self.SuperItemNumCount,
- "..."
- )
- return DumpString
-
-
-m_NAtagCMActTurntableChooseItem=tagCMActTurntableChooseItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActTurntableChooseItem.Head.Cmd,m_NAtagCMActTurntableChooseItem.Head.SubCmd))] = m_NAtagCMActTurntableChooseItem
-
-
-#------------------------------------------------------
-# AA 13 启动转盘 #tagCMActTurntableStart
-
-class tagCMActTurntableStart(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), # 活动编号
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x13
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x13
- self.ActNum = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActTurntableStart)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 13 启动转盘 //tagCMActTurntableStart:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum
- )
- return DumpString
-
-
-m_NAtagCMActTurntableStart=tagCMActTurntableStart()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActTurntableStart.Cmd,m_NAtagCMActTurntableStart.SubCmd))] = m_NAtagCMActTurntableStart
-
-
-#------------------------------------------------------
-# AA 07 许愿池活动刷新奖池 #tagCMActWishingRefresh
-
-class tagCMActWishingRefresh(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("IsFree", c_ubyte), # 是否免费刷新
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- 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 = 0xAA
- self.SubCmd = 0x07
- self.IsFree = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActWishingRefresh)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 07 许愿池活动刷新奖池 //tagCMActWishingRefresh:
- Cmd:%s,
- SubCmd:%s,
- IsFree:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.IsFree
- )
- return DumpString
-
-
-m_NAtagCMActWishingRefresh=tagCMActWishingRefresh()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActWishingRefresh.Cmd,m_NAtagCMActWishingRefresh.SubCmd))] = m_NAtagCMActWishingRefresh
-
-
-#------------------------------------------------------
-# AA 06 许愿池活动许愿 #tagCMActWishing
-
-class tagCMActWishing(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("SrcWellType", c_ubyte), # 来源库 0-可选库 1-结果库
- ("SrcIndex", c_ubyte), # 来源索引
- ("DesWellType", c_ubyte), # 目标库 0-可选库 1-结果库
- ("DesIndex", c_ubyte), # 目标索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x06
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x06
- self.SrcWellType = 0
- self.SrcIndex = 0
- self.DesWellType = 0
- self.DesIndex = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMActWishing)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 06 许愿池活动许愿 //tagCMActWishing:
- Cmd:%s,
- SubCmd:%s,
- SrcWellType:%d,
- SrcIndex:%d,
- DesWellType:%d,
- DesIndex:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.SrcWellType,
- self.SrcIndex,
- self.DesWellType,
- self.DesIndex
- )
- return DumpString
-
-
-m_NAtagCMActWishing=tagCMActWishing()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActWishing.Cmd,m_NAtagCMActWishing.SubCmd))] = m_NAtagCMActWishing
-
-
-#------------------------------------------------------
-# AA 10 节日祝福瓶选择奖励物品 #tagCMFeastWishBottleChooseItem
-
-class tagCMFeastWishBottleChooseItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("BottleNum", c_ubyte), #瓶子编号
- ("RecordIndex", c_ubyte), #物品索引,用于选择及记录是否已选择
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x10
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x10
- self.BottleNum = 0
- self.RecordIndex = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFeastWishBottleChooseItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 10 节日祝福瓶选择奖励物品 //tagCMFeastWishBottleChooseItem:
- Cmd:%s,
- SubCmd:%s,
- BottleNum:%d,
- RecordIndex:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.BottleNum,
- self.RecordIndex
- )
- return DumpString
-
-
-m_NAtagCMFeastWishBottleChooseItem=tagCMFeastWishBottleChooseItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishBottleChooseItem.Cmd,m_NAtagCMFeastWishBottleChooseItem.SubCmd))] = m_NAtagCMFeastWishBottleChooseItem
-
-
-#------------------------------------------------------
-# AA 11 节日祝福池祝福 #tagCMFeastWishPoolWish
-
-class tagCMFeastWishPoolWish(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("WishCount", c_ubyte), #祝福次数
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x11
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x11
- self.WishCount = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFeastWishPoolWish)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 11 节日祝福池祝福 //tagCMFeastWishPoolWish:
- Cmd:%s,
- SubCmd:%s,
- WishCount:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.WishCount
- )
- return DumpString
-
-
-m_NAtagCMFeastWishPoolWish=tagCMFeastWishPoolWish()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishPoolWish.Cmd,m_NAtagCMFeastWishPoolWish.SubCmd))] = m_NAtagCMFeastWishPoolWish
-
-
-#------------------------------------------------------
-# AA 05 限时抢购预约 #tagCMFlashSaleAppointment
-
-class tagCMFlashSaleAppointment(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ActNum", c_ubyte), #活动编号
- ("GoodsID", c_int), # 抢购商品标识
- ("State", c_ubyte), # 1-预约 0-取消
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x05
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x05
- self.ActNum = 0
- self.GoodsID = 0
- self.State = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMFlashSaleAppointment)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 05 限时抢购预约 //tagCMFlashSaleAppointment:
- Cmd:%s,
- SubCmd:%s,
- ActNum:%d,
- GoodsID:%d,
- State:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ActNum,
- self.GoodsID,
- self.State
- )
- return DumpString
-
-
-m_NAtagCMFlashSaleAppointment=tagCMFlashSaleAppointment()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFlashSaleAppointment.Cmd,m_NAtagCMFlashSaleAppointment.SubCmd))] = m_NAtagCMFlashSaleAppointment
-
-
-#------------------------------------------------------
-#AA 01 领取累计登陆礼 # tagCMGetTotalLoginDayAward
-
-class tagCMGetTotalLoginDayAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("Index", c_ubyte), # 领取礼物
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x01
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x01
- self.Index = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGetTotalLoginDayAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''//AA 01 领取累计登陆礼 // tagCMGetTotalLoginDayAward:
- Cmd:%s,
- SubCmd:%s,
- Index:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.Index
- )
- return DumpString
-
-
-m_NAtagCMGetTotalLoginDayAward=tagCMGetTotalLoginDayAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetTotalLoginDayAward.Cmd,m_NAtagCMGetTotalLoginDayAward.SubCmd))] = m_NAtagCMGetTotalLoginDayAward
-
-
-#------------------------------------------------------
-# AA 08 开始幸运鉴宝 #tagCMStartLuckyTreasure
-
-class tagCMStartLuckyTreasure(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAA
- self.SubCmd = 0x08
- return
-
- def ReadData(self, stringData, _pos=0, _len=0):
- self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
-
- def Clear(self):
- self.Cmd = 0xAA
- self.SubCmd = 0x08
- return
-
- def GetLength(self):
- return sizeof(tagCMStartLuckyTreasure)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AA 08 开始幸运鉴宝 //tagCMStartLuckyTreasure:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMStartLuckyTreasure=tagCMStartLuckyTreasure()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMStartLuckyTreasure.Cmd,m_NAtagCMStartLuckyTreasure.SubCmd))] = m_NAtagCMStartLuckyTreasure
#------------------------------------------------------
--
Gitblit v1.8.0