From a7cda2ada3349bce6a6f9261752c0a2fe5e6927b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 15 十月 2025 19:26:45 +0800
Subject: [PATCH] 263 【主界面】头像系统(内政-幻境阁系统)-服务端(玩家改名)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  116 ++++++++++++++++++++++++++++++++--------------------------
 1 files changed, 64 insertions(+), 52 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 465a0be..2654c9c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -19721,6 +19721,70 @@
 
 
 #------------------------------------------------------
+# A9 21 角色改名结果 #tagSCRenameResult
+
+class  tagSCRenameResult(Structure):
+    Head = tagHead()
+    PlayerName = ""    #(char PlayerName[33])//size = 14
+    Result = 0    #(BYTE Result)//角色改名结果
+    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)
+        self.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA9
+        self.Head.SubCmd = 0x21
+        self.PlayerName = ""
+        self.Result = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 33
+        length += 1
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteString(data, 33, self.PlayerName)
+        data = CommFunc.WriteBYTE(data, self.Result)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                PlayerName:%s,
+                                Result:%d
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.PlayerName,
+                                self.Result
+                                )
+        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):
@@ -19826,58 +19890,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
 
 
 #------------------------------------------------------

--
Gitblit v1.8.0