From 50e41acd370d6545269cc59f7bed734ea9f7b398 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 30 十月 2018 12:03:12 +0800
Subject: [PATCH] 4380 【主干】【后端】装备传奇属性战力优化
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 739 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 703 insertions(+), 36 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index c9d94d8..6832b79 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4234,6 +4234,114 @@
#------------------------------------------------------
+# A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
+
+class tagGCStoreServerBuyCnt(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("GoodsID", c_int), #商品标识
+ ("BuyCnt", 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.GoodsID = 0
+ self.BuyCnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagGCStoreServerBuyCnt)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A9 06 商城全服购买次数通知 //tagGCStoreServerBuyCntInfo:
+ GoodsID:%d,
+ BuyCnt:%d
+ '''\
+ %(
+ self.GoodsID,
+ self.BuyCnt
+ )
+ return DumpString
+
+
+class tagGCStoreServerBuyCntInfo(Structure):
+ Head = tagHead()
+ Count = 0 #(WORD Count)//数量
+ InfoList = list() #(vector<tagGCStoreServerBuyCnt> InfoList)//次数信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA9
+ 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):
+ temInfoList = tagGCStoreServerBuyCnt()
+ _pos = temInfoList.ReadData(_lpData, _pos)
+ self.InfoList.append(temInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x06
+ self.Count = 0
+ self.InfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 2
+ for i in range(self.Count):
+ length += self.InfoList[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.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ InfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCStoreServerBuyCntInfo=tagGCStoreServerBuyCntInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCStoreServerBuyCntInfo.Head.Cmd,m_NAtagGCStoreServerBuyCntInfo.Head.SubCmd))] = m_NAtagGCStoreServerBuyCntInfo
+
+
+#------------------------------------------------------
#A9 21 角色改名结果 #tagUpdatePlayerNameResult
class tagUpdatePlayerNameResult(Structure):
@@ -17081,6 +17189,134 @@
#------------------------------------------------------
+# A7 16 小助手设置 #tagMCLittleHelperSet
+
+class tagMCLittleHelperFuncSet(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("SetNum", c_ubyte), # 托管功能设置编号1~20,每个编号对应的托管功能前端自定义
+ ("Value1", c_int), # 自定义值1,如果存储的是勾选信息, 按二进制位存储代表是否勾选,支持31位,每位代表的含义前端自定义
+ ("Value2", c_int), # 自定义值2
+ ("Value3", c_int), # 自定义值3
+ ("Value4", c_int), # 自定义值4
+ ("Value5", c_int), # 自定义值5
+ ("Value6", c_int), # 自定义值6
+ ]
+
+ 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.SetNum = 0
+ self.Value1 = 0
+ self.Value2 = 0
+ self.Value3 = 0
+ self.Value4 = 0
+ self.Value5 = 0
+ self.Value6 = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCLittleHelperFuncSet)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A7 16 小助手设置 //tagMCLittleHelperSet:
+ SetNum:%d,
+ Value1:%d,
+ Value2:%d,
+ Value3:%d,
+ Value4:%d,
+ Value5:%d,
+ Value6:%d
+ '''\
+ %(
+ self.SetNum,
+ self.Value1,
+ self.Value2,
+ self.Value3,
+ self.Value4,
+ self.Value5,
+ self.Value6
+ )
+ return DumpString
+
+
+class tagMCLittleHelperSet(Structure):
+ Head = tagHead()
+ FuncSetCount = 0 #(BYTE FuncSetCount)// 托管功能设置数,暂支持20个
+ FuncSetList = list() #(vector<tagMCLittleHelperFuncSet> FuncSetList)// 托管功能设置列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA7
+ self.Head.SubCmd = 0x16
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.FuncSetCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.FuncSetCount):
+ temFuncSetList = tagMCLittleHelperFuncSet()
+ _pos = temFuncSetList.ReadData(_lpData, _pos)
+ self.FuncSetList.append(temFuncSetList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA7
+ self.Head.SubCmd = 0x16
+ self.FuncSetCount = 0
+ self.FuncSetList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.FuncSetCount):
+ length += self.FuncSetList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.FuncSetCount)
+ for i in range(self.FuncSetCount):
+ data = CommFunc.WriteString(data, self.FuncSetList[i].GetLength(), self.FuncSetList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ FuncSetCount:%d,
+ FuncSetList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.FuncSetCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCLittleHelperSet=tagMCLittleHelperSet()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLittleHelperSet.Head.Cmd,m_NAtagMCLittleHelperSet.Head.SubCmd))] = m_NAtagMCLittleHelperSet
+
+
+#------------------------------------------------------
# A7 14 通知查询的NPC数量 #tagMCNPCCntList
class tagMCNPCCntInfo(Structure):
@@ -18935,6 +19171,449 @@
m_NAtagMCVirtualItemDrop=tagMCVirtualItemDrop()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCVirtualItemDrop.Head.Cmd,m_NAtagMCVirtualItemDrop.Head.SubCmd))] = m_NAtagMCVirtualItemDrop
+
+
+#------------------------------------------------------
+# AA 1B 许愿池拖动结果 #tagMCActWishingDragResult
+
+class tagMCPlayerWishingDragInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("WellType", c_ubyte), # 库 0-可选库 1-结果库
+ ("Index", c_ubyte), # 索引
+ ("ItemID", c_int), # 物品ID
+ ("ItemCnt", c_ushort), # 物品数量
+ ("IsBind", c_ubyte), # 是否绑定
+ ("IsSpecial", 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.WellType = 0
+ self.Index = 0
+ self.ItemID = 0
+ self.ItemCnt = 0
+ self.IsBind = 0
+ self.IsSpecial = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCPlayerWishingDragInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 1B 许愿池拖动结果 //tagMCActWishingDragResult:
+ WellType:%d,
+ Index:%d,
+ ItemID:%d,
+ ItemCnt:%d,
+ IsBind:%d,
+ IsSpecial:%d
+ '''\
+ %(
+ self.WellType,
+ self.Index,
+ self.ItemID,
+ self.ItemCnt,
+ self.IsBind,
+ self.IsSpecial
+ )
+ return DumpString
+
+
+class tagMCActWishingDragResult(Structure):
+ Head = tagHead()
+ Cnt = 0 #(BYTE Cnt)
+ InfoList = list() #(vector<tagMCPlayerWishingDragInfo> InfoList)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x1B
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Cnt):
+ temInfoList = tagMCPlayerWishingDragInfo()
+ _pos = temInfoList.ReadData(_lpData, _pos)
+ self.InfoList.append(temInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x1B
+ self.Cnt = 0
+ self.InfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.Cnt):
+ length += self.InfoList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Cnt)
+ for i in range(self.Cnt):
+ data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Cnt:%d,
+ InfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Cnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCActWishingDragResult=tagMCActWishingDragResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingDragResult.Head.Cmd,m_NAtagMCActWishingDragResult.Head.SubCmd))] = m_NAtagMCActWishingDragResult
+
+
+#------------------------------------------------------
+# AA 19 许愿池活动信息 #tagMCActWishingWellInfo
+
+class tagMCWishingWellItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemID", c_int), # 物品ID
+ ("ItemCnt", c_ushort), # 物品数量
+ ("IsBind", c_ubyte), # 是否绑定
+ ("Mark", 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.ItemCnt = 0
+ self.IsBind = 0
+ self.Mark = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCWishingWellItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 19 许愿池活动信息 //tagMCActWishingWellInfo:
+ ItemID:%d,
+ ItemCnt:%d,
+ IsBind:%d,
+ Mark:%d
+ '''\
+ %(
+ self.ItemID,
+ self.ItemCnt,
+ self.IsBind,
+ self.Mark
+ )
+ return DumpString
+
+
+class tagMCActWishingWellInfo(Structure):
+ Head = tagHead()
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
+ ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ Count = 0 #(WORD Count)// 物品数
+ WellItemInfo = list() #(vector<tagMCWishingWellItem> WellItemInfo)// 随机库物品信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x19
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ for i in range(self.Count):
+ temWellItemInfo = tagMCWishingWellItem()
+ _pos = temWellItemInfo.ReadData(_lpData, _pos)
+ self.WellItemInfo.append(temWellItemInfo)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x19
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.IsDayReset = 0
+ self.ResetType = 0
+ self.LimitLV = 0
+ self.Count = 0
+ self.WellItemInfo = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 10
+ length += 10
+ length += 1
+ length += 1
+ length += 2
+ length += 2
+ for i in range(self.Count):
+ length += self.WellItemInfo[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteString(data, 10, self.StartDate)
+ data = CommFunc.WriteString(data, 10, self.EndtDate)
+ data = CommFunc.WriteBYTE(data, self.IsDayReset)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
+ data = CommFunc.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteWORD(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteString(data, self.WellItemInfo[i].GetLength(), self.WellItemInfo[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ StartDate:%s,
+ EndtDate:%s,
+ IsDayReset:%d,
+ ResetType:%d,
+ LimitLV:%d,
+ Count:%d,
+ WellItemInfo:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.StartDate,
+ self.EndtDate,
+ self.IsDayReset,
+ self.ResetType,
+ self.LimitLV,
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCActWishingWellInfo=tagMCActWishingWellInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingWellInfo.Head.Cmd,m_NAtagMCActWishingWellInfo.Head.SubCmd))] = m_NAtagMCActWishingWellInfo
+
+
+#------------------------------------------------------
+# AA 1A 许愿池活动玩家信息 #tagMCActWishingWellPlayerInfo
+
+class tagMCPlayerWishingWellItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemID", c_int), # 物品ID
+ ("ItemCnt", c_ushort), # 物品数量
+ ("IsBind", c_ubyte), # 是否绑定
+ ("IsSpecial", 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.ItemCnt = 0
+ self.IsBind = 0
+ self.IsSpecial = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCPlayerWishingWellItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 1A 许愿池活动玩家信息 //tagMCActWishingWellPlayerInfo:
+ ItemID:%d,
+ ItemCnt:%d,
+ IsBind:%d,
+ IsSpecial:%d
+ '''\
+ %(
+ self.ItemID,
+ self.ItemCnt,
+ self.IsBind,
+ self.IsSpecial
+ )
+ return DumpString
+
+
+class tagMCActWishingWellPlayerInfo(Structure):
+ Head = tagHead()
+ FreeStartTime = 0 #(DWORD FreeStartTime)// 免费开始倒计时时间
+ WishCnt = 0 #(DWORD WishCnt)// 许愿付费刷新次数
+ WellItemCnt = 0 #(BYTE WellItemCnt)//许愿池物品数量
+ WellItemInfo = list() #(vector<tagMCPlayerWishingWellItem> WellItemInfo)// 随机库物品信息
+ CurAwardCnt = 0 #(BYTE CurAwardCnt)// 当前奖励物品数量
+ CurAwardItemInfo = list() #(vector<tagMCPlayerWishingWellItem> CurAwardItemInfo)// 当前奖励物品
+ LastAwardCnt = 0 #(BYTE LastAwardCnt)// 可领取奖励物品数量
+ LastAwardItemInfo = list() #(vector<tagMCPlayerWishingWellItem> LastAwardItemInfo)// 可领取奖励物品
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x1A
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.FreeStartTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.WishCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.WellItemCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.WellItemCnt):
+ temWellItemInfo = tagMCPlayerWishingWellItem()
+ _pos = temWellItemInfo.ReadData(_lpData, _pos)
+ self.WellItemInfo.append(temWellItemInfo)
+ self.CurAwardCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.CurAwardCnt):
+ temCurAwardItemInfo = tagMCPlayerWishingWellItem()
+ _pos = temCurAwardItemInfo.ReadData(_lpData, _pos)
+ self.CurAwardItemInfo.append(temCurAwardItemInfo)
+ self.LastAwardCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.LastAwardCnt):
+ temLastAwardItemInfo = tagMCPlayerWishingWellItem()
+ _pos = temLastAwardItemInfo.ReadData(_lpData, _pos)
+ self.LastAwardItemInfo.append(temLastAwardItemInfo)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x1A
+ self.FreeStartTime = 0
+ self.WishCnt = 0
+ self.WellItemCnt = 0
+ self.WellItemInfo = list()
+ self.CurAwardCnt = 0
+ self.CurAwardItemInfo = list()
+ self.LastAwardCnt = 0
+ self.LastAwardItemInfo = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 4
+ length += 1
+ for i in range(self.WellItemCnt):
+ length += self.WellItemInfo[i].GetLength()
+ length += 1
+ for i in range(self.CurAwardCnt):
+ length += self.CurAwardItemInfo[i].GetLength()
+ length += 1
+ for i in range(self.LastAwardCnt):
+ length += self.LastAwardItemInfo[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteDWORD(data, self.FreeStartTime)
+ data = CommFunc.WriteDWORD(data, self.WishCnt)
+ data = CommFunc.WriteBYTE(data, self.WellItemCnt)
+ for i in range(self.WellItemCnt):
+ data = CommFunc.WriteString(data, self.WellItemInfo[i].GetLength(), self.WellItemInfo[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.CurAwardCnt)
+ for i in range(self.CurAwardCnt):
+ data = CommFunc.WriteString(data, self.CurAwardItemInfo[i].GetLength(), self.CurAwardItemInfo[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.LastAwardCnt)
+ for i in range(self.LastAwardCnt):
+ data = CommFunc.WriteString(data, self.LastAwardItemInfo[i].GetLength(), self.LastAwardItemInfo[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ FreeStartTime:%d,
+ WishCnt:%d,
+ WellItemCnt:%d,
+ WellItemInfo:%s,
+ CurAwardCnt:%d,
+ CurAwardItemInfo:%s,
+ LastAwardCnt:%d,
+ LastAwardItemInfo:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.FreeStartTime,
+ self.WishCnt,
+ self.WellItemCnt,
+ "...",
+ self.CurAwardCnt,
+ "...",
+ self.LastAwardCnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCActWishingWellPlayerInfo=tagMCActWishingWellPlayerInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingWellPlayerInfo.Head.Cmd,m_NAtagMCActWishingWellPlayerInfo.Head.SubCmd))] = m_NAtagMCActWishingWellPlayerInfo
#------------------------------------------------------
@@ -21136,64 +21815,52 @@
# AA 16 通知超值礼包信息 #tagMCSuperGiftInfo
class tagMCSuperGiftInfo(Structure):
- Head = tagHead()
- GiftID = 0 #(DWORD GiftID)//商品ID
- EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
- data = None
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("StartTime", c_int),
+ ]
def __init__(self):
self.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x16
+ self.Cmd = 0xAA
+ self.SubCmd = 0x16
return
- def ReadData(self, _lpData, _pos=0, _Len=0):
+ def ReadData(self, stringData, _pos=0, _len=0):
self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
- return _pos
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAA
- self.Head.SubCmd = 0x16
- self.GiftID = 0
- self.EndtDate = ""
+ self.Cmd = 0xAA
+ self.SubCmd = 0x16
+ self.StartTime = 0
return
def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 10
-
- return length
+ return sizeof(tagMCSuperGiftInfo)
def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.GiftID)
- data = CommFunc.WriteString(data, 10, self.EndtDate)
- return data
+ return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''
- Head:%s,
- GiftID:%d,
- EndtDate:%s
+ DumpString = '''// AA 16 通知超值礼包信息 //tagMCSuperGiftInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ StartTime:%d
'''\
%(
- self.Head.OutputString(),
- self.GiftID,
- self.EndtDate
+ self.Cmd,
+ self.SubCmd,
+ self.StartTime
)
return DumpString
m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Head.Cmd,m_NAtagMCSuperGiftInfo.Head.SubCmd))] = m_NAtagMCSuperGiftInfo
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Cmd,m_NAtagMCSuperGiftInfo.SubCmd))] = m_NAtagMCSuperGiftInfo
#------------------------------------------------------
--
Gitblit v1.8.0