From 83ea442cfaceaf76648c6ec948e4494a10e228db Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 12 九月 2024 17:01:40 +0800
Subject: [PATCH] 10261 【越南】【砍树】仙盟徽章,头像框,头像(动态),聊天气泡,聊天表情(增加仙盟徽章)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py |   63 ++++++++++++++++++++++++++++++-
 1 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 4265437..0f9e00f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -379,6 +379,58 @@
 
 
 #------------------------------------------------------
+# A4 13 修改家族徽章 #tagCGChangeFamilyEmblem
+
+class  tagCGChangeFamilyEmblem(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("EmblemID", c_ubyte),    # 更换的徽章ID
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA4
+        self.SubCmd = 0x13
+        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 = 0xA4
+        self.SubCmd = 0x13
+        self.EmblemID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCGChangeFamilyEmblem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A4 13 修改家族徽章 //tagCGChangeFamilyEmblem:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                EmblemID:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.EmblemID
+                                )
+        return DumpString
+
+
+m_NAtagCGChangeFamilyEmblem=tagCGChangeFamilyEmblem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGChangeFamilyEmblem.Cmd,m_NAtagCGChangeFamilyEmblem.SubCmd))] = m_NAtagCGChangeFamilyEmblem
+
+
+#------------------------------------------------------
 # A4 08 查询家族行为信息 #tagCGQueryFamilyAction
 
 class  tagCGQueryFamilyAction(Structure):
@@ -712,6 +764,7 @@
     Head = tagHead()
     Name = ""    #(char Name[33])
     FakeID = 0    #(WORD FakeID)//假仙盟编号
+    EmblemID = 0    #(BYTE EmblemID)//选择徽章ID,解锁仙盟等级为1级的均为可选ID
     data = None
 
     def __init__(self):
@@ -725,6 +778,7 @@
         _pos = self.Head.ReadData(_lpData, _pos)
         self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33)
         self.FakeID,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.EmblemID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         return _pos
 
     def Clear(self):
@@ -734,6 +788,7 @@
         self.Head.SubCmd = 0x04
         self.Name = ""
         self.FakeID = 0
+        self.EmblemID = 0
         return
 
     def GetLength(self):
@@ -741,6 +796,7 @@
         length += self.Head.GetLength()
         length += 33
         length += 2
+        length += 1
 
         return length
 
@@ -749,18 +805,21 @@
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
         data = CommFunc.WriteString(data, 33, self.Name)
         data = CommFunc.WriteWORD(data, self.FakeID)
+        data = CommFunc.WriteBYTE(data, self.EmblemID)
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
                                 Name:%s,
-                                FakeID:%d
+                                FakeID:%d,
+                                EmblemID:%d
                                 '''\
                                 %(
                                 self.Head.OutputString(),
                                 self.Name,
-                                self.FakeID
+                                self.FakeID,
+                                self.EmblemID
                                 )
         return DumpString
 

--
Gitblit v1.8.0