From 43e7b36534ba2bb1bb4e399d1536061e5890ab99 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 16 十月 2025 10:47:58 +0800
Subject: [PATCH] 263 【主界面】头像系统(内政-幻境阁系统)-服务端(优化改名逻辑)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  760 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 481 insertions(+), 279 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index a17f6a5..539e81d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -9466,114 +9466,6 @@
 
 
 #------------------------------------------------------
-# A3 CE 称号星级信息 #tagMCTitleStarInfo
-
-class  tagMCTitleStar(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("TitleID", c_int),    # 称号ID
-                  ("Star", 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.TitleID = 0
-        self.Star = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCTitleStar)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A3 CE 称号星级信息 //tagMCTitleStarInfo:
-                                TitleID:%d,
-                                Star:%d
-                                '''\
-                                %(
-                                self.TitleID,
-                                self.Star
-                                )
-        return DumpString
-
-
-class  tagMCTitleStarInfo(Structure):
-    Head = tagHead()
-    Count = 0    #(BYTE Count)
-    TitleStarList = list()    #(vector<tagMCTitleStar> TitleStarList)
-    data = None
-
-    def __init__(self):
-        self.Clear()
-        self.Head.Cmd = 0xA3
-        self.Head.SubCmd = 0xCE
-        return
-
-    def ReadData(self, _lpData, _pos=0, _Len=0):
-        self.Clear()
-        _pos = self.Head.ReadData(_lpData, _pos)
-        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        for i in range(self.Count):
-            temTitleStarList = tagMCTitleStar()
-            _pos = temTitleStarList.ReadData(_lpData, _pos)
-            self.TitleStarList.append(temTitleStarList)
-        return _pos
-
-    def Clear(self):
-        self.Head = tagHead()
-        self.Head.Clear()
-        self.Head.Cmd = 0xA3
-        self.Head.SubCmd = 0xCE
-        self.Count = 0
-        self.TitleStarList = list()
-        return
-
-    def GetLength(self):
-        length = 0
-        length += self.Head.GetLength()
-        length += 1
-        for i in range(self.Count):
-            length += self.TitleStarList[i].GetLength()
-
-        return length
-
-    def GetBuffer(self):
-        data = ''
-        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.Count)
-        for i in range(self.Count):
-            data = CommFunc.WriteString(data, self.TitleStarList[i].GetLength(), self.TitleStarList[i].GetBuffer())
-        return data
-
-    def OutputString(self):
-        DumpString = '''
-                                Head:%s,
-                                Count:%d,
-                                TitleStarList:%s
-                                '''\
-                                %(
-                                self.Head.OutputString(),
-                                self.Count,
-                                "..."
-                                )
-        return DumpString
-
-
-m_NAtagMCTitleStarInfo=tagMCTitleStarInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTitleStarInfo.Head.Cmd,m_NAtagMCTitleStarInfo.Head.SubCmd))] = m_NAtagMCTitleStarInfo
-
-
-#------------------------------------------------------
 # A3 56 通天令信息 #tagMCTongTianLingInfo
 
 class  tagMCTongTianLingInfo(Structure):
@@ -13129,6 +13021,7 @@
     RealmLV = 0    #(BYTE RealmLV)//境界
     Face = 0    #(DWORD Face)//基本脸型
     FacePic = 0    #(DWORD FacePic)//头像框
+    TitleID = 0    #(DWORD TitleID)//称号
     FightPower = 0    #(DWORD FightPower)//战力,求余亿部分
     FightPowerEx = 0    #(DWORD FightPowerEx)//战力,整除亿部分
     ServerID = 0    #(DWORD ServerID)//所属区服ID
@@ -13150,6 +13043,7 @@
         self.RealmLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.TitleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
@@ -13166,6 +13060,7 @@
         self.RealmLV = 0
         self.Face = 0
         self.FacePic = 0
+        self.TitleID = 0
         self.FightPower = 0
         self.FightPowerEx = 0
         self.ServerID = 0
@@ -13186,6 +13081,7 @@
         length += 4
         length += 4
         length += 4
+        length += 4
         length += 1
 
         return length
@@ -13201,6 +13097,7 @@
         data = CommFunc.WriteBYTE(data, self.RealmLV)
         data = CommFunc.WriteDWORD(data, self.Face)
         data = CommFunc.WriteDWORD(data, self.FacePic)
+        data = CommFunc.WriteDWORD(data, self.TitleID)
         data = CommFunc.WriteDWORD(data, self.FightPower)
         data = CommFunc.WriteDWORD(data, self.FightPowerEx)
         data = CommFunc.WriteDWORD(data, self.ServerID)
@@ -13218,6 +13115,7 @@
                                 RealmLV:%d,
                                 Face:%d,
                                 FacePic:%d,
+                                TitleID:%d,
                                 FightPower:%d,
                                 FightPowerEx:%d,
                                 ServerID:%d,
@@ -13233,6 +13131,7 @@
                                 self.RealmLV,
                                 self.Face,
                                 self.FacePic,
+                                self.TitleID,
                                 self.FightPower,
                                 self.FightPowerEx,
                                 self.ServerID,
@@ -13863,6 +13762,7 @@
     RealmLV = 0    #(BYTE RealmLV)//境界
     Face = 0    #(DWORD Face)//基本脸型
     FacePic = 0    #(DWORD FacePic)//头像框
+    TitleID = 0    #(DWORD TitleID)//称号
     FightPower = 0    #(DWORD FightPower)//战力,求余亿部分
     FightPowerEx = 0    #(DWORD FightPowerEx)//战力,整除亿部分
     ServerID = 0    #(DWORD ServerID)//所属区服ID
@@ -13889,6 +13789,7 @@
         self.RealmLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.TitleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
@@ -13910,6 +13811,7 @@
         self.RealmLV = 0
         self.Face = 0
         self.FacePic = 0
+        self.TitleID = 0
         self.FightPower = 0
         self.FightPowerEx = 0
         self.ServerID = 0
@@ -13938,6 +13840,7 @@
         length += 4
         length += 4
         length += 4
+        length += 4
         length += 1
         length += 4
 
@@ -13955,6 +13858,7 @@
         data = CommFunc.WriteBYTE(data, self.RealmLV)
         data = CommFunc.WriteDWORD(data, self.Face)
         data = CommFunc.WriteDWORD(data, self.FacePic)
+        data = CommFunc.WriteDWORD(data, self.TitleID)
         data = CommFunc.WriteDWORD(data, self.FightPower)
         data = CommFunc.WriteDWORD(data, self.FightPowerEx)
         data = CommFunc.WriteDWORD(data, self.ServerID)
@@ -13977,6 +13881,7 @@
                                 RealmLV:%d,
                                 Face:%d,
                                 FacePic:%d,
+                                TitleID:%d,
                                 FightPower:%d,
                                 FightPowerEx:%d,
                                 ServerID:%d,
@@ -13997,6 +13902,7 @@
                                 self.RealmLV,
                                 self.Face,
                                 self.FacePic,
+                                self.TitleID,
                                 self.FightPower,
                                 self.FightPowerEx,
                                 self.ServerID,
@@ -14752,122 +14658,6 @@
 
 m_NAtagMCBossHurtList=tagMCBossHurtList()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBossHurtList.Head.Cmd,m_NAtagMCBossHurtList.Head.SubCmd))] = m_NAtagMCBossHurtList
-
-
-#------------------------------------------------------
-# A7 17 聊天气泡框状态 #tagMCChatBubbleBoxState
-
-class  tagMCChatBubbleBox(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("BoxID", c_ubyte),    #气泡ID
-                  ("State", c_ubyte),    #是否已激活
-                  ("EndTime", c_int),    #到期时间戳,0为永久
-                  ("Star", 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.BoxID = 0
-        self.State = 0
-        self.EndTime = 0
-        self.Star = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCChatBubbleBox)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
-                                BoxID:%d,
-                                State:%d,
-                                EndTime:%d,
-                                Star:%d
-                                '''\
-                                %(
-                                self.BoxID,
-                                self.State,
-                                self.EndTime,
-                                self.Star
-                                )
-        return DumpString
-
-
-class  tagMCChatBubbleBoxState(Structure):
-    Head = tagHead()
-    Count = 0    #(BYTE Count)
-    BoxList = list()    #(vector<tagMCChatBubbleBox> BoxList)
-    data = None
-
-    def __init__(self):
-        self.Clear()
-        self.Head.Cmd = 0xA7
-        self.Head.SubCmd = 0x17
-        return
-
-    def ReadData(self, _lpData, _pos=0, _Len=0):
-        self.Clear()
-        _pos = self.Head.ReadData(_lpData, _pos)
-        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        for i in range(self.Count):
-            temBoxList = tagMCChatBubbleBox()
-            _pos = temBoxList.ReadData(_lpData, _pos)
-            self.BoxList.append(temBoxList)
-        return _pos
-
-    def Clear(self):
-        self.Head = tagHead()
-        self.Head.Clear()
-        self.Head.Cmd = 0xA7
-        self.Head.SubCmd = 0x17
-        self.Count = 0
-        self.BoxList = list()
-        return
-
-    def GetLength(self):
-        length = 0
-        length += self.Head.GetLength()
-        length += 1
-        for i in range(self.Count):
-            length += self.BoxList[i].GetLength()
-
-        return length
-
-    def GetBuffer(self):
-        data = ''
-        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.Count)
-        for i in range(self.Count):
-            data = CommFunc.WriteString(data, self.BoxList[i].GetLength(), self.BoxList[i].GetBuffer())
-        return data
-
-    def OutputString(self):
-        DumpString = '''
-                                Head:%s,
-                                Count:%d,
-                                BoxList:%s
-                                '''\
-                                %(
-                                self.Head.OutputString(),
-                                self.Count,
-                                "..."
-                                )
-        return DumpString
-
-
-m_NAtagMCChatBubbleBoxState=tagMCChatBubbleBoxState()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Head.Cmd,m_NAtagMCChatBubbleBoxState.Head.SubCmd))] = m_NAtagMCChatBubbleBoxState
 
 
 #------------------------------------------------------
@@ -17624,6 +17414,7 @@
     FightPowerEx = 0    #(DWORD FightPowerEx)//战力整除亿部分
     Face = 0    #(DWORD Face)//基本脸型
     FacePic = 0    #(DWORD FacePic)//头像框
+    TitleID = 0    #(DWORD TitleID)//称号
     data = None
 
     def __init__(self):
@@ -17639,6 +17430,7 @@
         self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.TitleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -17649,6 +17441,7 @@
         self.FightPowerEx = 0
         self.Face = 0
         self.FacePic = 0
+        self.TitleID = 0
         return
 
     def GetLength(self):
@@ -17656,6 +17449,7 @@
         length += 4
         length += 33
         length += 2
+        length += 4
         length += 4
         length += 4
         length += 4
@@ -17672,6 +17466,7 @@
         data = CommFunc.WriteDWORD(data, self.FightPowerEx)
         data = CommFunc.WriteDWORD(data, self.Face)
         data = CommFunc.WriteDWORD(data, self.FacePic)
+        data = CommFunc.WriteDWORD(data, self.TitleID)
         return data
 
     def OutputString(self):
@@ -17682,7 +17477,8 @@
                                 FightPower:%d,
                                 FightPowerEx:%d,
                                 Face:%d,
-                                FacePic:%d
+                                FacePic:%d,
+                                TitleID:%d
                                 '''\
                                 %(
                                 self.PlayerID,
@@ -17691,7 +17487,8 @@
                                 self.FightPower,
                                 self.FightPowerEx,
                                 self.Face,
-                                self.FacePic
+                                self.FacePic,
+                                self.TitleID
                                 )
         return DumpString
 
@@ -19924,6 +19721,63 @@
 
 
 #------------------------------------------------------
+# A9 21 角色改名结果 #tagSCRenameResult
+
+class  tagSCRenameResult(Structure):
+    Head = tagHead()
+    PlayerName = ""    #(char PlayerName[33])// 新名字
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA9
+        self.Head.SubCmd = 0x21
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA9
+        self.Head.SubCmd = 0x21
+        self.PlayerName = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 33
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteString(data, 33, self.PlayerName)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                PlayerName:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.PlayerName
+                                )
+        return DumpString
+
+
+m_NAtagSCRenameResult=tagSCRenameResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCRenameResult.Head.Cmd,m_NAtagSCRenameResult.Head.SubCmd))] = m_NAtagSCRenameResult
+
+
+#------------------------------------------------------
 # A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
 
 class  tagGCStoreServerBuyCnt(Structure):
@@ -20029,58 +19883,6 @@
 
 m_NAtagGCStoreServerBuyCntInfo=tagGCStoreServerBuyCntInfo()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCStoreServerBuyCntInfo.Head.Cmd,m_NAtagGCStoreServerBuyCntInfo.Head.SubCmd))] = m_NAtagGCStoreServerBuyCntInfo
-
-
-#------------------------------------------------------
-#A9 21 角色改名结果 #tagUpdatePlayerNameResult
-
-class  tagUpdatePlayerNameResult(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("Result", c_ubyte),    #角色改名结果
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xA9
-        self.SubCmd = 0x21
-        return
-
-    def ReadData(self, stringData, _pos=0, _len=0):
-        self.Clear()
-        memmove(addressof(self), stringData[_pos:], self.GetLength())
-        return _pos + self.GetLength()
-
-    def Clear(self):
-        self.Cmd = 0xA9
-        self.SubCmd = 0x21
-        self.Result = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagUpdatePlayerNameResult)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''//A9 21 角色改名结果 //tagUpdatePlayerNameResult:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                Result:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.Result
-                                )
-        return DumpString
-
-
-m_NAtagUpdatePlayerNameResult=tagUpdatePlayerNameResult()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagUpdatePlayerNameResult.Cmd,m_NAtagUpdatePlayerNameResult.SubCmd))] = m_NAtagUpdatePlayerNameResult
 
 
 #------------------------------------------------------
@@ -35765,6 +35567,122 @@
 
 
 #------------------------------------------------------
+# B1 27 聊天气泡框信息 #tagSCChatBoxInfo
+
+class  tagSCChatBox(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("BoxID", c_int),    #气泡框ID
+                  ("State", c_ubyte),    #是否已激活
+                  ("EndTime", c_int),    #到期时间戳,0为永久
+                  ("Star", 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.BoxID = 0
+        self.State = 0
+        self.EndTime = 0
+        self.Star = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCChatBox)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 27 聊天气泡框信息 //tagSCChatBoxInfo:
+                                BoxID:%d,
+                                State:%d,
+                                EndTime:%d,
+                                Star:%d
+                                '''\
+                                %(
+                                self.BoxID,
+                                self.State,
+                                self.EndTime,
+                                self.Star
+                                )
+        return DumpString
+
+
+class  tagSCChatBoxInfo(Structure):
+    Head = tagHead()
+    Count = 0    #(BYTE Count)
+    BoxList = list()    #(vector<tagSCChatBox> BoxList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x27
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.Count):
+            temBoxList = tagSCChatBox()
+            _pos = temBoxList.ReadData(_lpData, _pos)
+            self.BoxList.append(temBoxList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x27
+        self.Count = 0
+        self.BoxList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.Count):
+            length += self.BoxList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteString(data, self.BoxList[i].GetLength(), self.BoxList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                BoxList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCChatBoxInfo=tagSCChatBoxInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCChatBoxInfo.Head.Cmd,m_NAtagSCChatBoxInfo.Head.SubCmd))] = m_NAtagSCChatBoxInfo
+
+
+#------------------------------------------------------
 # B1 02 玩家时装皮肤激活状态 #tagMCClothesCoatSkinState
 
 class  tagMCClothesCoatLVInfo(Structure):
@@ -36598,6 +36516,122 @@
 
 
 #------------------------------------------------------
+# B1 19 形象信息 #tagSCModelInfo
+
+class  tagSCModel(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("ModelID", c_int),    #形象ID
+                  ("State", c_ubyte),    #是否已激活
+                  ("EndTime", c_int),    #到期时间戳,0为永久
+                  ("Star", 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.ModelID = 0
+        self.State = 0
+        self.EndTime = 0
+        self.Star = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCModel)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 19 形象信息 //tagSCModelInfo:
+                                ModelID:%d,
+                                State:%d,
+                                EndTime:%d,
+                                Star:%d
+                                '''\
+                                %(
+                                self.ModelID,
+                                self.State,
+                                self.EndTime,
+                                self.Star
+                                )
+        return DumpString
+
+
+class  tagSCModelInfo(Structure):
+    Head = tagHead()
+    Count = 0    #(BYTE Count)
+    ModelList = list()    #(vector<tagSCModel> ModelList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x19
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.Count):
+            temModelList = tagSCModel()
+            _pos = temModelList.ReadData(_lpData, _pos)
+            self.ModelList.append(temModelList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x19
+        self.Count = 0
+        self.ModelList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.Count):
+            length += self.ModelList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteString(data, self.ModelList[i].GetLength(), self.ModelList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                ModelList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCModelInfo=tagSCModelInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCModelInfo.Head.Cmd,m_NAtagSCModelInfo.Head.SubCmd))] = m_NAtagSCModelInfo
+
+
+#------------------------------------------------------
 # B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove
 
 class  tagMCNotifyPlayerMove(Structure):
@@ -37294,6 +37328,122 @@
 
 m_NAtagMCTiandaoTreeInfo=tagMCTiandaoTreeInfo()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTiandaoTreeInfo.Head.Cmd,m_NAtagMCTiandaoTreeInfo.Head.SubCmd))] = m_NAtagMCTiandaoTreeInfo
+
+
+#------------------------------------------------------
+# B1 26 称号信息 #tagSCTitleInfo
+
+class  tagSCTitle(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("TitleID", c_int),    #称号ID
+                  ("State", c_ubyte),    #是否已激活
+                  ("EndTime", c_int),    #到期时间戳,0为永久
+                  ("Star", 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.TitleID = 0
+        self.State = 0
+        self.EndTime = 0
+        self.Star = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCTitle)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 26 称号信息 //tagSCTitleInfo:
+                                TitleID:%d,
+                                State:%d,
+                                EndTime:%d,
+                                Star:%d
+                                '''\
+                                %(
+                                self.TitleID,
+                                self.State,
+                                self.EndTime,
+                                self.Star
+                                )
+        return DumpString
+
+
+class  tagSCTitleInfo(Structure):
+    Head = tagHead()
+    Count = 0    #(BYTE Count)
+    TitleList = list()    #(vector<tagSCTitle> TitleList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x26
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.Count):
+            temTitleList = tagSCTitle()
+            _pos = temTitleList.ReadData(_lpData, _pos)
+            self.TitleList.append(temTitleList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x26
+        self.Count = 0
+        self.TitleList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.Count):
+            length += self.TitleList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteString(data, self.TitleList[i].GetLength(), self.TitleList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                TitleList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCTitleInfo=tagSCTitleInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTitleInfo.Head.Cmd,m_NAtagSCTitleInfo.Head.SubCmd))] = m_NAtagSCTitleInfo
 
 
 #------------------------------------------------------
@@ -52230,4 +52380,56 @@
 
 
 m_NAtagMCStartEnterCrossServer=tagMCStartEnterCrossServer()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartEnterCrossServer.Cmd,m_NAtagMCStartEnterCrossServer.SubCmd))] = m_NAtagMCStartEnterCrossServer
\ No newline at end of file
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartEnterCrossServer.Cmd,m_NAtagMCStartEnterCrossServer.SubCmd))] = m_NAtagMCStartEnterCrossServer
+
+
+#------------------------------------------------------
+# C2 01 跨服服务器间的测试包 #tagSSTest
+
+class  tagSSTest(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("Data", c_int),    #测试
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC2
+        self.SubCmd = 0x01
+        return
+
+    def ReadData(self, stringData, _pos=0, _len=0):
+        self.Clear()
+        memmove(addressof(self), stringData[_pos:], self.GetLength())
+        return _pos + self.GetLength()
+
+    def Clear(self):
+        self.Cmd = 0xC2
+        self.SubCmd = 0x01
+        self.Data = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSSTest)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C2 01 跨服服务器间的测试包 //tagSSTest:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                Data:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.Data
+                                )
+        return DumpString
+
+
+m_NAtagSSTest=tagSSTest()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSSTest.Cmd,m_NAtagSSTest.SubCmd))] = m_NAtagSSTest
\ No newline at end of file

--
Gitblit v1.8.0