From 01a0e539b786ae0f1c46646874502367f5410aca Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 04 二月 2026 18:18:51 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(优化游戏服及跨服启动、通讯逻辑;服务器类型增加跨服中心、跨服事件、时间管理;跨服玩家在线状态、基础信息、玩家资源增减管理、发送跨服个人邮件等;跨服公会初版,修复公会成员审核、成员战力刷新等bug,增加公会名次同步;跨服公会暂未测试;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 1133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 1,075 insertions(+), 58 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 7763c91..c146402 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -9008,6 +9008,9 @@
 
 class  tagMCTreasureResult(Structure):
     Head = tagHead()
+    TreasureType = 0    #(BYTE TreasureType)//寻宝类型
+    TreasureIndex = 0    #(BYTE TreasureIndex)//寻宝索引
+    CostType = 0    #(BYTE CostType)//消耗类型:0-默认仙玉;1-免费次数;2-寻宝道具
     AddMoneyType = 0    #(BYTE AddMoneyType)// 本次寻宝增加的积分货币类型,可能为0
     AddMoneyValue = 0    #(WORD AddMoneyValue)// 本次寻宝增加的积分货币值,可能为0
     AddTreasureLuck = 0    #(WORD AddTreasureLuck)// 本次寻宝增加的幸运值
@@ -9024,6 +9027,9 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
+        self.TreasureType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.TreasureIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.CostType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.AddMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.AddMoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.AddTreasureLuck,_pos = CommFunc.ReadWORD(_lpData, _pos)
@@ -9036,6 +9042,9 @@
         self.Head.Clear()
         self.Head.Cmd = 0xA3
         self.Head.SubCmd = 0x50
+        self.TreasureType = 0
+        self.TreasureIndex = 0
+        self.CostType = 0
         self.AddMoneyType = 0
         self.AddMoneyValue = 0
         self.AddTreasureLuck = 0
@@ -9047,6 +9056,9 @@
         length = 0
         length += self.Head.GetLength()
         length += 1
+        length += 1
+        length += 1
+        length += 1
         length += 2
         length += 2
         length += 2
@@ -9057,6 +9069,9 @@
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.TreasureType)
+        data = CommFunc.WriteBYTE(data, self.TreasureIndex)
+        data = CommFunc.WriteBYTE(data, self.CostType)
         data = CommFunc.WriteBYTE(data, self.AddMoneyType)
         data = CommFunc.WriteWORD(data, self.AddMoneyValue)
         data = CommFunc.WriteWORD(data, self.AddTreasureLuck)
@@ -9067,6 +9082,9 @@
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
+                                TreasureType:%d,
+                                TreasureIndex:%d,
+                                CostType:%d,
                                 AddMoneyType:%d,
                                 AddMoneyValue:%d,
                                 AddTreasureLuck:%d,
@@ -9075,6 +9093,9 @@
                                 '''\
                                 %(
                                 self.Head.OutputString(),
+                                self.TreasureType,
+                                self.TreasureIndex,
+                                self.CostType,
                                 self.AddMoneyType,
                                 self.AddMoneyValue,
                                 self.AddTreasureLuck,
@@ -10704,6 +10725,158 @@
 
 
 #------------------------------------------------------
+# A5 05 公会跨服互通信息 #tagSCFamilyCrossInfo
+
+class  tagSCFamilyCrossInfo(Structure):
+    Head = tagHead()
+    ZoneID = 0    #(BYTE ZoneID)// 所属分区
+    ServerCnt = 0    #(WORD ServerCnt)
+    ServerIDList = list()    #(vector<DWORD> ServerIDList)// 互通服务器ID列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x05
+        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.ServerCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        for i in range(self.ServerCnt):
+            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+            self.ServerIDList.append(value)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x05
+        self.ZoneID = 0
+        self.ServerCnt = 0
+        self.ServerIDList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 2
+        length += 4 * self.ServerCnt
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.ZoneID)
+        data = CommFunc.WriteWORD(data, self.ServerCnt)
+        for i in range(self.ServerCnt):
+            data = CommFunc.WriteDWORD(data, self.ServerIDList[i])
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                ZoneID:%d,
+                                ServerCnt:%d,
+                                ServerIDList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.ZoneID,
+                                self.ServerCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCFamilyCrossInfo=tagSCFamilyCrossInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFamilyCrossInfo.Head.Cmd,m_NAtagSCFamilyCrossInfo.Head.SubCmd))] = m_NAtagSCFamilyCrossInfo
+
+
+#------------------------------------------------------
+# A5 24 公会成员删除 #tagSCFamilyMemDel
+
+class  tagSCFamilyMemDel(Structure):
+    Head = tagHead()
+    Type = 0    #(BYTE Type)// 0-踢出;1-主动退出
+    PlayerID = 0    #(DWORD PlayerID)
+    NameLen = 0    #(BYTE NameLen)
+    Name = ""    #(String Name)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x24
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x24
+        self.Type = 0
+        self.PlayerID = 0
+        self.NameLen = 0
+        self.Name = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 4
+        length += 1
+        length += len(self.Name)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.Type)
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.Name)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Type:%d,
+                                PlayerID:%d,
+                                NameLen:%d,
+                                Name:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Type,
+                                self.PlayerID,
+                                self.NameLen,
+                                self.Name
+                                )
+        return DumpString
+
+
+m_NAtagSCFamilyMemDel=tagSCFamilyMemDel()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFamilyMemDel.Head.Cmd,m_NAtagSCFamilyMemDel.Head.SubCmd))] = m_NAtagSCFamilyMemDel
+
+
+#------------------------------------------------------
 # A5 22 家族申请加入的玩家信息 #tagMCFamilyReqJoinInfo
 
 class  tagMCFamilyReqJoinPlayer(Structure):
@@ -11317,6 +11490,7 @@
     TotalPage = 0    #(BYTE TotalPage)//一共有多少页
     FamilyCount = 0    #(BYTE FamilyCount)
     FamilyList = list()    #(vector<tagMCFamilyView> FamilyList)//本页家族信息列表
+    Rank = 0    #(DWORD Rank)//玩家公会所在名次,0-没有公会或没有在榜上;>0-对应排名
     data = None
 
     def __init__(self):
@@ -11338,6 +11512,7 @@
             temFamilyList = tagMCFamilyView()
             _pos = temFamilyList.ReadData(_lpData, _pos)
             self.FamilyList.append(temFamilyList)
+        self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -11352,6 +11527,7 @@
         self.TotalPage = 0
         self.FamilyCount = 0
         self.FamilyList = list()
+        self.Rank = 0
         return
 
     def GetLength(self):
@@ -11365,6 +11541,7 @@
         length += 1
         for i in range(self.FamilyCount):
             length += self.FamilyList[i].GetLength()
+        length += 4
 
         return length
 
@@ -11379,6 +11556,7 @@
         data = CommFunc.WriteBYTE(data, self.FamilyCount)
         for i in range(self.FamilyCount):
             data = CommFunc.WriteString(data, self.FamilyList[i].GetLength(), self.FamilyList[i].GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.Rank)
         return data
 
     def OutputString(self):
@@ -11390,7 +11568,8 @@
                                 ShowCount:%d,
                                 TotalPage:%d,
                                 FamilyCount:%d,
-                                FamilyList:%s
+                                FamilyList:%s,
+                                Rank:%d
                                 '''\
                                 %(
                                 self.Head.OutputString(),
@@ -11400,7 +11579,8 @@
                                 self.ShowCount,
                                 self.TotalPage,
                                 self.FamilyCount,
-                                "..."
+                                "...",
+                                self.Rank
                                 )
         return DumpString
 
@@ -11717,6 +11897,7 @@
     LeaderID = 0    #(DWORD LeaderID)//族长玩家ID
     MemberCount = 0    #(BYTE MemberCount)//人数
     MemberList = list()    #(vector<tagMCRoleFamilyMember> MemberList)//size = MemberCount
+    Extra1 = 0    #(DWORD Extra1)//附加字段1
     data = None
 
     def __init__(self):
@@ -11747,6 +11928,7 @@
             temMemberList = tagMCRoleFamilyMember()
             _pos = temMemberList.ReadData(_lpData, _pos)
             self.MemberList.append(temMemberList)
+        self.Extra1,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -11770,6 +11952,7 @@
         self.LeaderID = 0
         self.MemberCount = 0
         self.MemberList = list()
+        self.Extra1 = 0
         return
 
     def GetLength(self):
@@ -11792,6 +11975,7 @@
         length += 1
         for i in range(self.MemberCount):
             length += self.MemberList[i].GetLength()
+        length += 4
 
         return length
 
@@ -11815,6 +11999,7 @@
         data = CommFunc.WriteBYTE(data, self.MemberCount)
         for i in range(self.MemberCount):
             data = CommFunc.WriteString(data, self.MemberList[i].GetLength(), self.MemberList[i].GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.Extra1)
         return data
 
     def OutputString(self):
@@ -11835,7 +12020,8 @@
                                 Broadcast:%s,
                                 LeaderID:%d,
                                 MemberCount:%d,
-                                MemberList:%s
+                                MemberList:%s,
+                                Extra1:%d
                                 '''\
                                 %(
                                 self.Head.OutputString(),
@@ -11854,7 +12040,8 @@
                                 self.Broadcast,
                                 self.LeaderID,
                                 self.MemberCount,
-                                "..."
+                                "...",
+                                self.Extra1
                                 )
         return DumpString
 
@@ -30165,6 +30352,114 @@
 
 
 #------------------------------------------------------
+# B1 63 战斗预设切换信息 #tagSCBatPresetSwitchInfo
+
+class  tagSCBatPresetSwitch(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("BatPresetType", c_ubyte),    #战斗预设类型:1-主线战斗;2-演武场防守;
+                  ("BatPresetID", c_ubyte),    #该战斗功能所使用的战斗预设ID
+                  ]
+
+    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.BatPresetType = 0
+        self.BatPresetID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCBatPresetSwitch)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 63 战斗预设切换信息 //tagSCBatPresetSwitchInfo:
+                                BatPresetType:%d,
+                                BatPresetID:%d
+                                '''\
+                                %(
+                                self.BatPresetType,
+                                self.BatPresetID
+                                )
+        return DumpString
+
+
+class  tagSCBatPresetSwitchInfo(Structure):
+    Head = tagHead()
+    BatFuncCnt = 0    #(BYTE BatFuncCnt)
+    BatPresetList = list()    #(vector<tagSCBatPresetSwitch> BatPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x63
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.BatFuncCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.BatFuncCnt):
+            temBatPresetList = tagSCBatPresetSwitch()
+            _pos = temBatPresetList.ReadData(_lpData, _pos)
+            self.BatPresetList.append(temBatPresetList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x63
+        self.BatFuncCnt = 0
+        self.BatPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.BatFuncCnt):
+            length += self.BatPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.BatFuncCnt)
+        for i in range(self.BatFuncCnt):
+            data = CommFunc.WriteString(data, self.BatPresetList[i].GetLength(), self.BatPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                BatFuncCnt:%d,
+                                BatPresetList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.BatFuncCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCBatPresetSwitchInfo=tagSCBatPresetSwitchInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBatPresetSwitchInfo.Head.Cmd,m_NAtagSCBatPresetSwitchInfo.Head.SubCmd))] = m_NAtagSCBatPresetSwitchInfo
+
+
+#------------------------------------------------------
 # B1 30 红颜信息 #tagSCBeautyInfo
 
 class  tagSCBeautySkin(Structure):
@@ -31096,6 +31391,356 @@
 
 
 #------------------------------------------------------
+# B1 61 功能预设信息 #tagSCFuncPresetInfoList
+
+class  tagSCFuncPreset(Structure):
+    PresetID = 0    #(BYTE PresetID)//预设方案ID
+    NameLen = 0    #(BYTE NameLen)
+    PresetName = ""    #(String PresetName)//预设名称
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.PresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PresetName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        return _pos
+
+    def Clear(self):
+        self.PresetID = 0
+        self.NameLen = 0
+        self.PresetName = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        length += len(self.PresetName)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.PresetID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.PresetName)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                PresetID:%d,
+                                NameLen:%d,
+                                PresetName:%s
+                                '''\
+                                %(
+                                self.PresetID,
+                                self.NameLen,
+                                self.PresetName
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetInfo(Structure):
+    FuncPresetType = 0    #(BYTE FuncPresetType)//预设类型,1-全局战斗;2-阵容;3-命格;
+    UnlockState = 0    #(DWORD UnlockState)//该功能预设解锁状态,按预设ID二进制位运算记录是否已解锁
+    PresetCnt = 0    #(BYTE PresetCnt)
+    PresetList = list()    #(vector<tagSCFuncPreset> PresetList)//本功能下预设列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.FuncPresetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.UnlockState,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.PresetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.PresetCnt):
+            temPresetList = tagSCFuncPreset()
+            _pos = temPresetList.ReadData(_lpData, _pos)
+            self.PresetList.append(temPresetList)
+        return _pos
+
+    def Clear(self):
+        self.FuncPresetType = 0
+        self.UnlockState = 0
+        self.PresetCnt = 0
+        self.PresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 4
+        length += 1
+        for i in range(self.PresetCnt):
+            length += self.PresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.FuncPresetType)
+        data = CommFunc.WriteDWORD(data, self.UnlockState)
+        data = CommFunc.WriteBYTE(data, self.PresetCnt)
+        for i in range(self.PresetCnt):
+            data = CommFunc.WriteString(data, self.PresetList[i].GetLength(), self.PresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                FuncPresetType:%d,
+                                UnlockState:%d,
+                                PresetCnt:%d,
+                                PresetList:%s
+                                '''\
+                                %(
+                                self.FuncPresetType,
+                                self.UnlockState,
+                                self.PresetCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetInfoList(Structure):
+    Head = tagHead()
+    FuncCnt = 0    #(BYTE FuncCnt)
+    FuncPresetList = list()    #(vector<tagSCFuncPresetInfo> FuncPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x61
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.FuncCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.FuncCnt):
+            temFuncPresetList = tagSCFuncPresetInfo()
+            _pos = temFuncPresetList.ReadData(_lpData, _pos)
+            self.FuncPresetList.append(temFuncPresetList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x61
+        self.FuncCnt = 0
+        self.FuncPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.FuncCnt):
+            length += self.FuncPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.FuncCnt)
+        for i in range(self.FuncCnt):
+            data = CommFunc.WriteString(data, self.FuncPresetList[i].GetLength(), self.FuncPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                FuncCnt:%d,
+                                FuncPresetList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.FuncCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCFuncPresetInfoList=tagSCFuncPresetInfoList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFuncPresetInfoList.Head.Cmd,m_NAtagSCFuncPresetInfoList.Head.SubCmd))] = m_NAtagSCFuncPresetInfoList
+
+
+#------------------------------------------------------
+# B1 62 功能预设切换信息 #tagSCFuncPresetSwitchInfo
+
+class  tagSCFuncPresetFunc(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("FuncPresetType", c_ubyte),    #预设类型,2-阵容;3-命格;
+                  ("FuncPresetID", c_ubyte),    #该全局战斗预设下本功能使用的预设ID
+                  ]
+
+    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.FuncPresetType = 0
+        self.FuncPresetID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCFuncPresetFunc)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 62 功能预设切换信息 //tagSCFuncPresetSwitchInfo:
+                                FuncPresetType:%d,
+                                FuncPresetID:%d
+                                '''\
+                                %(
+                                self.FuncPresetType,
+                                self.FuncPresetID
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetBat(Structure):
+    BatPresetID = 0    #(BYTE BatPresetID)//所属全局战斗预设ID
+    FuncCnt = 0    #(BYTE FuncCnt)
+    FuncPresetList = list()    #(vector<tagSCFuncPresetFunc> FuncPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.BatPresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.FuncCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.FuncCnt):
+            temFuncPresetList = tagSCFuncPresetFunc()
+            _pos = temFuncPresetList.ReadData(_lpData, _pos)
+            self.FuncPresetList.append(temFuncPresetList)
+        return _pos
+
+    def Clear(self):
+        self.BatPresetID = 0
+        self.FuncCnt = 0
+        self.FuncPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        for i in range(self.FuncCnt):
+            length += self.FuncPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.BatPresetID)
+        data = CommFunc.WriteBYTE(data, self.FuncCnt)
+        for i in range(self.FuncCnt):
+            data = CommFunc.WriteString(data, self.FuncPresetList[i].GetLength(), self.FuncPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                BatPresetID:%d,
+                                FuncCnt:%d,
+                                FuncPresetList:%s
+                                '''\
+                                %(
+                                self.BatPresetID,
+                                self.FuncCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetSwitchInfo(Structure):
+    Head = tagHead()
+    BatPresetCnt = 0    #(BYTE BatPresetCnt)
+    BatPresetList = list()    #(vector<tagSCFuncPresetBat> BatPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x62
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.BatPresetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.BatPresetCnt):
+            temBatPresetList = tagSCFuncPresetBat()
+            _pos = temBatPresetList.ReadData(_lpData, _pos)
+            self.BatPresetList.append(temBatPresetList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x62
+        self.BatPresetCnt = 0
+        self.BatPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.BatPresetCnt):
+            length += self.BatPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.BatPresetCnt)
+        for i in range(self.BatPresetCnt):
+            data = CommFunc.WriteString(data, self.BatPresetList[i].GetLength(), self.BatPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                BatPresetCnt:%d,
+                                BatPresetList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.BatPresetCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCFuncPresetSwitchInfo=tagSCFuncPresetSwitchInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFuncPresetSwitchInfo.Head.Cmd,m_NAtagSCFuncPresetSwitchInfo.Head.SubCmd))] = m_NAtagSCFuncPresetSwitchInfo
+
+
+#------------------------------------------------------
 # B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList
 
 class  tagMCFuncSysPrivilegeInfo(Structure):
@@ -31448,11 +32093,10 @@
 
 
 #------------------------------------------------------
-# B1 24 阵容信息 #tagSCLineupInfo
+# B1 24 武将预设信息 #tagSCHeroPresetInfo
 
-class  tagSCLineup(Structure):
-    LineupID = 0    #(BYTE LineupID)// 阵容ID
-    ShapeType = 0    #(BYTE ShapeType)// 阵型
+class  tagSCHeroPreset(Structure):
+    PresetID = 0    #(BYTE PresetID)//阵容方案预设ID
     HeroCnt = 0    #(BYTE HeroCnt)
     HeroItemIndexList = list()    #(vector<WORD> HeroItemIndexList)// 所在武将背包索引+1列表 [站位1物品索引+1, 站位2, ...],站位无武将时为0
     data = None
@@ -31463,8 +32107,7 @@
 
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
-        self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.HeroCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.HeroCnt):
             value,_pos=CommFunc.ReadWORD(_lpData,_pos)
@@ -31472,8 +32115,7 @@
         return _pos
 
     def Clear(self):
-        self.LineupID = 0
-        self.ShapeType = 0
+        self.PresetID = 0
         self.HeroCnt = 0
         self.HeroItemIndexList = list()
         return
@@ -31482,15 +32124,13 @@
         length = 0
         length += 1
         length += 1
-        length += 1
         length += 2 * self.HeroCnt
 
         return length
 
     def GetBuffer(self):
         data = ''
-        data = CommFunc.WriteBYTE(data, self.LineupID)
-        data = CommFunc.WriteBYTE(data, self.ShapeType)
+        data = CommFunc.WriteBYTE(data, self.PresetID)
         data = CommFunc.WriteBYTE(data, self.HeroCnt)
         for i in range(self.HeroCnt):
             data = CommFunc.WriteWORD(data, self.HeroItemIndexList[i])
@@ -31498,24 +32138,22 @@
 
     def OutputString(self):
         DumpString = '''
-                                LineupID:%d,
-                                ShapeType:%d,
+                                PresetID:%d,
                                 HeroCnt:%d,
                                 HeroItemIndexList:%s
                                 '''\
                                 %(
-                                self.LineupID,
-                                self.ShapeType,
+                                self.PresetID,
                                 self.HeroCnt,
                                 "..."
                                 )
         return DumpString
 
 
-class  tagSCLineupInfo(Structure):
+class  tagSCHeroPresetInfo(Structure):
     Head = tagHead()
-    LineupCnt = 0    #(BYTE LineupCnt)
-    LineupList = list()    #(vector<tagSCLineup> LineupList)
+    PresetCnt = 0    #(BYTE PresetCnt)
+    PresetList = list()    #(vector<tagSCHeroPreset> PresetList)
     data = None
 
     def __init__(self):
@@ -31527,11 +32165,11 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
-        self.LineupCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        for i in range(self.LineupCnt):
-            temLineupList = tagSCLineup()
-            _pos = temLineupList.ReadData(_lpData, _pos)
-            self.LineupList.append(temLineupList)
+        self.PresetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.PresetCnt):
+            temPresetList = tagSCHeroPreset()
+            _pos = temPresetList.ReadData(_lpData, _pos)
+            self.PresetList.append(temPresetList)
         return _pos
 
     def Clear(self):
@@ -31539,43 +32177,43 @@
         self.Head.Clear()
         self.Head.Cmd = 0xB1
         self.Head.SubCmd = 0x24
-        self.LineupCnt = 0
-        self.LineupList = list()
+        self.PresetCnt = 0
+        self.PresetList = list()
         return
 
     def GetLength(self):
         length = 0
         length += self.Head.GetLength()
         length += 1
-        for i in range(self.LineupCnt):
-            length += self.LineupList[i].GetLength()
+        for i in range(self.PresetCnt):
+            length += self.PresetList[i].GetLength()
 
         return length
 
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.LineupCnt)
-        for i in range(self.LineupCnt):
-            data = CommFunc.WriteString(data, self.LineupList[i].GetLength(), self.LineupList[i].GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.PresetCnt)
+        for i in range(self.PresetCnt):
+            data = CommFunc.WriteString(data, self.PresetList[i].GetLength(), self.PresetList[i].GetBuffer())
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
-                                LineupCnt:%d,
-                                LineupList:%s
+                                PresetCnt:%d,
+                                PresetList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
-                                self.LineupCnt,
+                                self.PresetCnt,
                                 "..."
                                 )
         return DumpString
 
 
-m_NAtagSCLineupInfo=tagSCLineupInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLineupInfo.Head.Cmd,m_NAtagSCLineupInfo.Head.SubCmd))] = m_NAtagSCLineupInfo
+m_NAtagSCHeroPresetInfo=tagSCHeroPresetInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCHeroPresetInfo.Head.Cmd,m_NAtagSCHeroPresetInfo.Head.SubCmd))] = m_NAtagSCHeroPresetInfo
 
 
 #------------------------------------------------------
@@ -31748,6 +32386,66 @@
 
 m_NAtagSCLLMJInfo=tagSCLLMJInfo()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLLMJInfo.Cmd,m_NAtagSCLLMJInfo.SubCmd))] = m_NAtagSCLLMJInfo
+
+
+#------------------------------------------------------
+# B1 32 命格信息 #tagSCMinggeInfo
+
+class  tagSCMinggeInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("GanwuLV", c_ushort),    #感悟等级,从1开始
+                  ("GanwuExp", c_int),    #当前感悟等级经验,每级从0开始
+                  ("Lingying", c_int),    #当前灵应值
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB1
+        self.SubCmd = 0x32
+        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 = 0xB1
+        self.SubCmd = 0x32
+        self.GanwuLV = 0
+        self.GanwuExp = 0
+        self.Lingying = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCMinggeInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 32 命格信息 //tagSCMinggeInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                GanwuLV:%d,
+                                GanwuExp:%d,
+                                Lingying:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.GanwuLV,
+                                self.GanwuExp,
+                                self.Lingying
+                                )
+        return DumpString
+
+
+m_NAtagSCMinggeInfo=tagSCMinggeInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCMinggeInfo.Cmd,m_NAtagSCMinggeInfo.SubCmd))] = m_NAtagSCMinggeInfo
 
 
 #------------------------------------------------------
@@ -38646,6 +39344,190 @@
 
 m_NAtagSCUseSkill=tagSCUseSkill()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCUseSkill.Head.Cmd,m_NAtagSCUseSkill.Head.SubCmd))] = m_NAtagSCUseSkill
+
+
+#------------------------------------------------------
+# B4 32 查看NPC属性结果 #tagSCViewNPCAttrRet
+
+class  tagSCViewNPCAttr(Structure):
+    PosNum = 0    #(BYTE PosNum)// 在本阵容中的站位,从1开始
+    NPCID = 0    #(DWORD NPCID)// 战斗NPCID,不同的实例ID对应的NPCID可能一样
+    HeroID = 0    #(DWORD HeroID)// 武将ID,玩家或NPC均可能有,如果有值则外观相关以该武将为准,否则以NPCID为准
+    LV = 0    #(WORD LV)// 等级,玩家的武将等级或NPC成长等级,等级显示以该值为准
+    Star = 0    #(BYTE Star)// 星级
+    BreakLV = 0    #(BYTE BreakLV)// 突破
+    AwakeLV = 0    #(BYTE AwakeLV)// 觉醒
+    AttrLen = 0    #(WORD AttrLen)
+    AttrMsg = ""    #(String AttrMsg)// 属性信息 {"属性ID":value, ...}
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.PosNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.NPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.HeroID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.Star,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.BreakLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.AwakeLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.AttrLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.AttrMsg,_pos = CommFunc.ReadString(_lpData, _pos,self.AttrLen)
+        return _pos
+
+    def Clear(self):
+        self.PosNum = 0
+        self.NPCID = 0
+        self.HeroID = 0
+        self.LV = 0
+        self.Star = 0
+        self.BreakLV = 0
+        self.AwakeLV = 0
+        self.AttrLen = 0
+        self.AttrMsg = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 4
+        length += 4
+        length += 2
+        length += 1
+        length += 1
+        length += 1
+        length += 2
+        length += len(self.AttrMsg)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.PosNum)
+        data = CommFunc.WriteDWORD(data, self.NPCID)
+        data = CommFunc.WriteDWORD(data, self.HeroID)
+        data = CommFunc.WriteWORD(data, self.LV)
+        data = CommFunc.WriteBYTE(data, self.Star)
+        data = CommFunc.WriteBYTE(data, self.BreakLV)
+        data = CommFunc.WriteBYTE(data, self.AwakeLV)
+        data = CommFunc.WriteWORD(data, self.AttrLen)
+        data = CommFunc.WriteString(data, self.AttrLen, self.AttrMsg)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                PosNum:%d,
+                                NPCID:%d,
+                                HeroID:%d,
+                                LV:%d,
+                                Star:%d,
+                                BreakLV:%d,
+                                AwakeLV:%d,
+                                AttrLen:%d,
+                                AttrMsg:%s
+                                '''\
+                                %(
+                                self.PosNum,
+                                self.NPCID,
+                                self.HeroID,
+                                self.LV,
+                                self.Star,
+                                self.BreakLV,
+                                self.AwakeLV,
+                                self.AttrLen,
+                                self.AttrMsg
+                                )
+        return DumpString
+
+
+class  tagSCViewNPCAttrRet(Structure):
+    Head = tagHead()
+    MapID = 0    #(DWORD MapID)// 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等)
+    FuncLineID = 0    #(DWORD FuncLineID)// MapID对应的扩展值,如具体某个关卡等
+    ViewNPCID = 0    #(DWORD ViewNPCID)// 指定查看某个NPCID,发0则查看该关卡阵容所有NPC
+    NPCCnt = 0    #(BYTE NPCCnt)
+    NPCAttrList = list()    #(vector<tagSCViewNPCAttr> NPCAttrList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB4
+        self.Head.SubCmd = 0x32
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.FuncLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.ViewNPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NPCCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.NPCCnt):
+            temNPCAttrList = tagSCViewNPCAttr()
+            _pos = temNPCAttrList.ReadData(_lpData, _pos)
+            self.NPCAttrList.append(temNPCAttrList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB4
+        self.Head.SubCmd = 0x32
+        self.MapID = 0
+        self.FuncLineID = 0
+        self.ViewNPCID = 0
+        self.NPCCnt = 0
+        self.NPCAttrList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 4
+        length += 4
+        length += 4
+        length += 1
+        for i in range(self.NPCCnt):
+            length += self.NPCAttrList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.MapID)
+        data = CommFunc.WriteDWORD(data, self.FuncLineID)
+        data = CommFunc.WriteDWORD(data, self.ViewNPCID)
+        data = CommFunc.WriteBYTE(data, self.NPCCnt)
+        for i in range(self.NPCCnt):
+            data = CommFunc.WriteString(data, self.NPCAttrList[i].GetLength(), self.NPCAttrList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                MapID:%d,
+                                FuncLineID:%d,
+                                ViewNPCID:%d,
+                                NPCCnt:%d,
+                                NPCAttrList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.MapID,
+                                self.FuncLineID,
+                                self.ViewNPCID,
+                                self.NPCCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCViewNPCAttrRet=tagSCViewNPCAttrRet()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCViewNPCAttrRet.Head.Cmd,m_NAtagSCViewNPCAttrRet.Head.SubCmd))] = m_NAtagSCViewNPCAttrRet
 
 
 #------------------------------------------------------
@@ -48141,12 +49023,133 @@
 
 
 #------------------------------------------------------
-# C2 02 跨服通用信息包 #tagSSCommMsg
+# C2 03 跨服中心事件同步 #tagSSCrossCenterEvent
+
+class  tagSSCrossCenterEvent(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("ServerID", c_int),    
+                  ("ServerType", c_ubyte),    #服务器类型
+                  ("EventValue", c_int),    #事件值,yyyyMMddhh用于判断过天等
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC2
+        self.SubCmd = 0x03
+        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 = 0xC2
+        self.SubCmd = 0x03
+        self.ServerID = 0
+        self.ServerType = 0
+        self.EventValue = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSSCrossCenterEvent)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C2 03 跨服中心事件同步 //tagSSCrossCenterEvent:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                ServerID:%d,
+                                ServerType:%d,
+                                EventValue:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.ServerID,
+                                self.ServerType,
+                                self.EventValue
+                                )
+        return DumpString
+
+
+m_NAtagSSCrossCenterEvent=tagSSCrossCenterEvent()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSSCrossCenterEvent.Cmd,m_NAtagSSCrossCenterEvent.SubCmd))] = m_NAtagSSCrossCenterEvent
+
+
+#------------------------------------------------------
+# C2 02 服务器连接跨服成功 #tagSSServerConnOK
+
+class  tagSSServerConnOK(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("ServerID", c_int),    
+                  ("ServerType", c_ubyte),    #服务器类型
+                  ("IsReconn", c_ubyte),    #是否重连的
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC2
+        self.SubCmd = 0x02
+        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 = 0xC2
+        self.SubCmd = 0x02
+        self.ServerID = 0
+        self.ServerType = 0
+        self.IsReconn = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSSServerConnOK)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C2 02 服务器连接跨服成功 //tagSSServerConnOK:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                ServerID:%d,
+                                ServerType:%d,
+                                IsReconn:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.ServerID,
+                                self.ServerType,
+                                self.IsReconn
+                                )
+        return DumpString
+
+
+m_NAtagSSServerConnOK=tagSSServerConnOK()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSSServerConnOK.Cmd,m_NAtagSSServerConnOK.SubCmd))] = m_NAtagSSServerConnOK
+
+
+#------------------------------------------------------
+# C2 10 跨服通用信息包 #tagSSCommMsg
 
 class  tagSSCommMsg(Structure):
     Head = tagHead()
     FromServerID = 0    #(DWORD FromServerID)//哪个服发的
-    ServerTime = 0    #(DWORD ServerTime)//来源服务器时间戳
+    ServerType = 0    #(BYTE ServerType)//服务器类型
+    PlayerID = 0    #(DWORD PlayerID)//哪个玩家触发发送的
     TypeLen = 0    #(BYTE TypeLen)
     MsgType = ""    #(String MsgType)
     Len = 0    #(DWORD Len)
@@ -48156,14 +49159,15 @@
     def __init__(self):
         self.Clear()
         self.Head.Cmd = 0xC2
-        self.Head.SubCmd = 0x02
+        self.Head.SubCmd = 0x10
         return
 
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
         self.FromServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
-        self.ServerTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.ServerType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.TypeLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.MsgType,_pos = CommFunc.ReadString(_lpData, _pos,self.TypeLen)
         self.Len,_pos = CommFunc.ReadDWORD(_lpData, _pos)
@@ -48174,9 +49178,10 @@
         self.Head = tagHead()
         self.Head.Clear()
         self.Head.Cmd = 0xC2
-        self.Head.SubCmd = 0x02
+        self.Head.SubCmd = 0x10
         self.FromServerID = 0
-        self.ServerTime = 0
+        self.ServerType = 0
+        self.PlayerID = 0
         self.TypeLen = 0
         self.MsgType = ""
         self.Len = 0
@@ -48187,6 +49192,7 @@
         length = 0
         length += self.Head.GetLength()
         length += 4
+        length += 1
         length += 4
         length += 1
         length += len(self.MsgType)
@@ -48199,7 +49205,8 @@
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
         data = CommFunc.WriteDWORD(data, self.FromServerID)
-        data = CommFunc.WriteDWORD(data, self.ServerTime)
+        data = CommFunc.WriteBYTE(data, self.ServerType)
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
         data = CommFunc.WriteBYTE(data, self.TypeLen)
         data = CommFunc.WriteString(data, self.TypeLen, self.MsgType)
         data = CommFunc.WriteDWORD(data, self.Len)
@@ -48210,7 +49217,8 @@
         DumpString = '''
                                 Head:%s,
                                 FromServerID:%d,
-                                ServerTime:%d,
+                                ServerType:%d,
+                                PlayerID:%d,
                                 TypeLen:%d,
                                 MsgType:%s,
                                 Len:%d,
@@ -48219,7 +49227,8 @@
                                 %(
                                 self.Head.OutputString(),
                                 self.FromServerID,
-                                self.ServerTime,
+                                self.ServerType,
+                                self.PlayerID,
                                 self.TypeLen,
                                 self.MsgType,
                                 self.Len,
@@ -48233,14 +49242,16 @@
 
 
 #------------------------------------------------------
-# C2 01 跨服服务器间的测试包 #tagSSTest
+# C2 01 跨服服务器心跳包 #tagSSHeart
 
-class  tagSSTest(Structure):
+class  tagSSHeart(Structure):
     _pack_ = 1
     _fields_ = [
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
-                  ("Data", c_int),    #测试
+                  ("ServerID", c_int),    
+                  ("ServerType", c_ubyte),    #服务器类型
+                  ("ServerTime", c_int),    #服务器时间戳
                   ]
 
     def __init__(self):
@@ -48257,28 +49268,34 @@
     def Clear(self):
         self.Cmd = 0xC2
         self.SubCmd = 0x01
-        self.Data = 0
+        self.ServerID = 0
+        self.ServerType = 0
+        self.ServerTime = 0
         return
 
     def GetLength(self):
-        return sizeof(tagSSTest)
+        return sizeof(tagSSHeart)
 
     def GetBuffer(self):
         return string_at(addressof(self), self.GetLength())
 
     def OutputString(self):
-        DumpString = '''// C2 01 跨服服务器间的测试包 //tagSSTest:
+        DumpString = '''// C2 01 跨服服务器心跳包 //tagSSHeart:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                Data:%d
+                                ServerID:%d,
+                                ServerType:%d,
+                                ServerTime:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.Data
+                                self.ServerID,
+                                self.ServerType,
+                                self.ServerTime
                                 )
         return DumpString
 
 
-m_NAtagSSTest=tagSSTest()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSSTest.Cmd,m_NAtagSSTest.SubCmd))] = m_NAtagSSTest
\ No newline at end of file
+m_NAtagSSHeart=tagSSHeart()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSSHeart.Cmd,m_NAtagSSHeart.SubCmd))] = m_NAtagSSHeart
\ No newline at end of file

--
Gitblit v1.8.0