From a53ebf8a767a99aee01b8ae39af45634766d0bb3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 13 七月 2022 17:34:51 +0800
Subject: [PATCH] 9663 【越南】【BT7】【主干】防范NPC获取刷新点坐标报错

---
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 1043 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 1,014 insertions(+), 29 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 3a9ad76..14ebe55 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -561,33 +561,41 @@
 #A0 04 同步客户端时间 #tagServerDateTime
 
 class  tagServerDateTime(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("Year", c_ushort),    
-                  ("Month", c_ubyte),    
-                  ("Day", c_ubyte),    
-                  ("Hour", c_ubyte),    
-                  ("Minute", c_ubyte),    
-                  ("Second", c_ubyte),    
-                  ("MicSecond", c_int),    
-                  ]
+    Head = tagHead()
+    Year = 0    #(WORD Year)
+    Month = 0    #(BYTE Month)
+    Day = 0    #(BYTE Day)
+    Hour = 0    #(BYTE Hour)
+    Minute = 0    #(BYTE Minute)
+    Second = 0    #(BYTE Second)
+    MicSecond = 0    #(DWORD MicSecond)
+    CrossServerTime = ""    #(char CrossServerTime[19])
+    data = None
 
     def __init__(self):
         self.Clear()
-        self.Cmd = 0xA0
-        self.SubCmd = 0x04
+        self.Head.Cmd = 0xA0
+        self.Head.SubCmd = 0x04
         return
 
-    def ReadData(self, stringData, _pos=0, _len=0):
+    def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
-        memmove(addressof(self), stringData[_pos:], self.GetLength())
-        return _pos + self.GetLength()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Year,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.Month,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Day,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Hour,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Minute,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Second,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.MicSecond,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.CrossServerTime,_pos = CommFunc.ReadString(_lpData, _pos,19)
+        return _pos
 
     def Clear(self):
-        self.Cmd = 0xA0
-        self.SubCmd = 0x04
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA0
+        self.Head.SubCmd = 0x04
         self.Year = 0
         self.Month = 0
         self.Day = 0
@@ -595,42 +603,64 @@
         self.Minute = 0
         self.Second = 0
         self.MicSecond = 0
+        self.CrossServerTime = ""
         return
 
     def GetLength(self):
-        return sizeof(tagServerDateTime)
+        length = 0
+        length += self.Head.GetLength()
+        length += 2
+        length += 1
+        length += 1
+        length += 1
+        length += 1
+        length += 1
+        length += 4
+        length += 19
+
+        return length
 
     def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteWORD(data, self.Year)
+        data = CommFunc.WriteBYTE(data, self.Month)
+        data = CommFunc.WriteBYTE(data, self.Day)
+        data = CommFunc.WriteBYTE(data, self.Hour)
+        data = CommFunc.WriteBYTE(data, self.Minute)
+        data = CommFunc.WriteBYTE(data, self.Second)
+        data = CommFunc.WriteDWORD(data, self.MicSecond)
+        data = CommFunc.WriteString(data, 19, self.CrossServerTime)
+        return data
 
     def OutputString(self):
-        DumpString = '''//A0 04 同步客户端时间 //tagServerDateTime:
-                                Cmd:%s,
-                                SubCmd:%s,
+        DumpString = '''
+                                Head:%s,
                                 Year:%d,
                                 Month:%d,
                                 Day:%d,
                                 Hour:%d,
                                 Minute:%d,
                                 Second:%d,
-                                MicSecond:%d
+                                MicSecond:%d,
+                                CrossServerTime:%s
                                 '''\
                                 %(
-                                self.Cmd,
-                                self.SubCmd,
+                                self.Head.OutputString(),
                                 self.Year,
                                 self.Month,
                                 self.Day,
                                 self.Hour,
                                 self.Minute,
                                 self.Second,
-                                self.MicSecond
+                                self.MicSecond,
+                                self.CrossServerTime
                                 )
         return DumpString
 
 
 m_NAtagServerDateTime=tagServerDateTime()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagServerDateTime.Cmd,m_NAtagServerDateTime.SubCmd))] = m_NAtagServerDateTime
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagServerDateTime.Head.Cmd,m_NAtagServerDateTime.Head.SubCmd))] = m_NAtagServerDateTime
 
 
 #------------------------------------------------------
@@ -12258,6 +12288,290 @@
 
 
 #------------------------------------------------------
+# 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-蓝
+    ServerOnly = 0    #(BYTE ServerOnly)//是否仅本服玩家可加入,0-否,1-是
+    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.ServerOnly,_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.ServerOnly = 0
+        self.FactionPlayerCount = 0
+        self.FactionPlayerList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 4
+        length += 1
+        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.ServerOnly)
+        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,
+                                ServerOnly:%d,
+                                FactionPlayerCount:%d,
+                                FactionPlayerList:%s
+                                '''\
+                                %(
+                                self.BuyPlayerID,
+                                self.Faction,
+                                self.ServerOnly,
+                                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):
@@ -13266,6 +13580,501 @@
 
 m_NAtagGCCrossRealmPKStartMatch=tagGCCrossRealmPKStartMatch()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKStartMatch.Cmd,m_NAtagGCCrossRealmPKStartMatch.SubCmd))] = m_NAtagGCCrossRealmPKStartMatch
+
+
+#------------------------------------------------------
+# C0 14 幸运云购开奖记录 #tagGCLuckyCloudBuyLotteryRecInfo
+
+class  tagGCLuckyCloudBuyLotteryRec(Structure):
+    SuperItemID = 0    #(DWORD SuperItemID)// 大奖物品ID
+    SuperItemCount = 0    #(BYTE SuperItemCount)// 大奖物品个数
+    NameLen = 0    #(BYTE NameLen)
+    PlayerName = ""    #(String PlayerName)// 中奖玩家名
+    LotteryNum = 0    #(WORD LotteryNum)// 开奖号码
+    LotteryTime = 0    #(DWORD LotteryTime)// 开奖时间戳,秒
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.SuperItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.LotteryNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.LotteryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.SuperItemID = 0
+        self.SuperItemCount = 0
+        self.NameLen = 0
+        self.PlayerName = ""
+        self.LotteryNum = 0
+        self.LotteryTime = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 4
+        length += 1
+        length += 1
+        length += len(self.PlayerName)
+        length += 2
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteDWORD(data, self.SuperItemID)
+        data = CommFunc.WriteBYTE(data, self.SuperItemCount)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
+        data = CommFunc.WriteWORD(data, self.LotteryNum)
+        data = CommFunc.WriteDWORD(data, self.LotteryTime)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                SuperItemID:%d,
+                                SuperItemCount:%d,
+                                NameLen:%d,
+                                PlayerName:%s,
+                                LotteryNum:%d,
+                                LotteryTime:%d
+                                '''\
+                                %(
+                                self.SuperItemID,
+                                self.SuperItemCount,
+                                self.NameLen,
+                                self.PlayerName,
+                                self.LotteryNum,
+                                self.LotteryTime
+                                )
+        return DumpString
+
+
+class  tagGCLuckyCloudBuyLotteryRecInfo(Structure):
+    Head = tagHead()
+    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 __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xC0
+        self.Head.SubCmd = 0x14
+        return
+
+    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):
+            temLotteryRecList = tagGCLuckyCloudBuyLotteryRec()
+            _pos = temLotteryRecList.ReadData(_lpData, _pos)
+            self.LotteryRecList.append(temLotteryRecList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        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()
+        return
+
+    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):
+            length += self.LotteryRecList[i].GetLength()
+
+        return length
+
+    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):
+            data = CommFunc.WriteString(data, self.LotteryRecList[i].GetLength(), self.LotteryRecList[i].GetBuffer())
+        return data
+
+    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,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCLuckyCloudBuyLotteryRecInfo=tagGCLuckyCloudBuyLotteryRecInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyLotteryRecInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyLotteryRecInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyLotteryRecInfo
+
+
+#------------------------------------------------------
+# C0 13 幸运云购购买号码记录 #tagGCLuckyCloudBuyNumRecInfo
+
+class  tagGCLuckyCloudBuyNumRec(Structure):
+    NameLen = 0    #(BYTE NameLen)
+    PlayerName = ""    #(String PlayerName)
+    BuyNum = 0    #(WORD BuyNum)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        self.BuyNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.NameLen = 0
+        self.PlayerName = ""
+        self.BuyNum = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += len(self.PlayerName)
+        length += 2
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
+        data = CommFunc.WriteWORD(data, self.BuyNum)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                NameLen:%d,
+                                PlayerName:%s,
+                                BuyNum:%d
+                                '''\
+                                %(
+                                self.NameLen,
+                                self.PlayerName,
+                                self.BuyNum
+                                )
+        return DumpString
+
+
+class  tagGCLuckyCloudBuyNumRecInfo(Structure):
+    Head = tagHead()
+    RemainCount = 0    #(WORD RemainCount)// 开奖剩余份数
+    Count = 0    #(WORD Count)
+    BuyNumRecList = list()    #(vector<tagGCLuckyCloudBuyNumRec> BuyNumRecList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xC0
+        self.Head.SubCmd = 0x13
+        return
+
+    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()
+            _pos = temBuyNumRecList.ReadData(_lpData, _pos)
+            self.BuyNumRecList.append(temBuyNumRecList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        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()
+
+        return length
+
+    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())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                RemainCount:%d,
+                                Count:%d,
+                                BuyNumRecList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.RemainCount,
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCLuckyCloudBuyNumRecInfo=tagGCLuckyCloudBuyNumRecInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyNumRecInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyNumRecInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyNumRecInfo
+
+
+#------------------------------------------------------
+# C0 12 幸运云购轮次信息 #tagGCLuckyCloudBuyRoundInfo
+
+class  tagGCLuckyCloudBuyRoundItem(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(tagGCLuckyCloudBuyRoundItem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C0 12 幸运云购轮次信息 //tagGCLuckyCloudBuyRoundInfo:
+                                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,
+                                LVLimit:%d,
+                                BaseItemCount:%d,
+                                BaseItemList:%s,
+                                RandItemCount:%d,
+                                RandItemList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.ZoneID,
+                                self.StartDate,
+                                self.EndtDate,
+                                self.RoundID,
+                                self.RoundNum,
+                                self.SuperItemID,
+                                self.SuperItemCount,
+                                self.SuperItemMoneyType,
+                                self.SuperItemMoneyValue,
+                                self.LVLimit,
+                                self.BaseItemCount,
+                                "...",
+                                self.RandItemCount,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCLuckyCloudBuyRoundInfo=tagGCLuckyCloudBuyRoundInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyRoundInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyRoundInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyRoundInfo
 
 
 #------------------------------------------------------
@@ -18527,6 +19336,62 @@
 
 m_NAtagMCInvestInfo=tagMCInvestInfo()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCInvestInfo.Head.Cmd,m_NAtagMCInvestInfo.Head.SubCmd))] = m_NAtagMCInvestInfo
+
+
+#------------------------------------------------------
+# A3 55 炼体信息 #tagMCLianTiInfo
+
+class  tagMCLianTiInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("LianTiLV", c_ubyte),    #炼体等级
+                  ("EatItemCount", c_int),    #当前等级已吃丹个数
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA3
+        self.SubCmd = 0x55
+        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 = 0xA3
+        self.SubCmd = 0x55
+        self.LianTiLV = 0
+        self.EatItemCount = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCLianTiInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A3 55 炼体信息 //tagMCLianTiInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                LianTiLV:%d,
+                                EatItemCount:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.LianTiLV,
+                                self.EatItemCount
+                                )
+        return DumpString
+
+
+m_NAtagMCLianTiInfo=tagMCLianTiInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLianTiInfo.Cmd,m_NAtagMCLianTiInfo.SubCmd))] = m_NAtagMCLianTiInfo
 
 
 #------------------------------------------------------
@@ -40446,6 +41311,74 @@
 
 
 #------------------------------------------------------
+# 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):
@@ -40762,6 +41695,58 @@
 
 
 #------------------------------------------------------
+# C1 08 幸运云购玩家信息 #tagMCLuckyCloudBuyPlayerInfo
+
+class  tagMCLuckyCloudBuyPlayerInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("BuyCount", c_ushort),    # 本轮已购买份数
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC1
+        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 = 0xC1
+        self.SubCmd = 0x08
+        self.BuyCount = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCLuckyCloudBuyPlayerInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C1 08 幸运云购玩家信息 //tagMCLuckyCloudBuyPlayerInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                BuyCount:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.BuyCount
+                                )
+        return DumpString
+
+
+m_NAtagMCLuckyCloudBuyPlayerInfo=tagMCLuckyCloudBuyPlayerInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLuckyCloudBuyPlayerInfo.Cmd,m_NAtagMCLuckyCloudBuyPlayerInfo.SubCmd))] = m_NAtagMCLuckyCloudBuyPlayerInfo
+
+
+#------------------------------------------------------
 # C1 04 准备进入跨服服务器 #tagMCPrepareEnterCrossServer
 
 class  tagMCPrepareEnterCrossServer(Structure):

--
Gitblit v1.8.0