From c280ced8be799a899efc78b21cc807d435ab6609 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 10 二月 2026 19:34:03 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(退出公会时间根据当前是否互通取对应的本服或跨服时间;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 135 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 131 insertions(+), 4 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 143ce97..fa266ef 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -677,6 +677,77 @@
#------------------------------------------------------
+# A1 31 前端自定义保存设置内容 #tagCSSettingData
+
+class tagCSSettingData(Structure):
+ Head = tagHead()
+ KeyNum = 0 #(BYTE KeyNum)// 自定义key编号,后端使用数字key存储,前端自行进行转换定义,限制100个
+ DataLen = 0 #(BYTE DataLen)
+ SetData = "" #(String SetData)//自定义保存的内容
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA1
+ self.Head.SubCmd = 0x31
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.KeyNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.DataLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.SetData,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA1
+ self.Head.SubCmd = 0x31
+ self.KeyNum = 0
+ self.DataLen = 0
+ self.SetData = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += len(self.SetData)
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.KeyNum)
+ data = CommFunc.WriteBYTE(data, self.DataLen)
+ data = CommFunc.WriteString(data, self.DataLen, self.SetData)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ KeyNum:%d,
+ DataLen:%d,
+ SetData:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.KeyNum,
+ self.DataLen,
+ self.SetData
+ )
+ return DumpString
+
+
+m_NAtagCSSettingData=tagCSSettingData()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSSettingData.Head.Cmd,m_NAtagCSSettingData.Head.SubCmd))] = m_NAtagCSSettingData
+
+
+#------------------------------------------------------
#A1 03 设置是否成年 #tagCMAdult
class tagCMAdult(Structure):
@@ -2165,7 +2236,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("PlayerID", c_int),
- ("EquipClassLV", c_ubyte), #大于0为查看指定境界阶装备信息, 0为查看默认信息
+ ("ServerID", c_int), #玩家服务器ID,发0默认本服玩家
]
def __init__(self):
@@ -2183,7 +2254,7 @@
self.Cmd = 0xA2
self.SubCmd = 0x12
self.PlayerID = 0
- self.EquipClassLV = 0
+ self.ServerID = 0
return
def GetLength(self):
@@ -2197,13 +2268,13 @@
Cmd:%s,
SubCmd:%s,
PlayerID:%d,
- EquipClassLV:%d
+ ServerID:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.PlayerID,
- self.EquipClassLV
+ self.ServerID
)
return DumpString
@@ -7565,6 +7636,62 @@
#------------------------------------------------------
+# A6 19 查看目标公会 #tagCSViewTagFamily
+
+class tagCSViewTagFamily(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("FamilyID", c_int),
+ ("DataServerID", c_int), #数据所在服务器ID
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA6
+ self.SubCmd = 0x19
+ 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 = 0xA6
+ self.SubCmd = 0x19
+ self.FamilyID = 0
+ self.DataServerID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSViewTagFamily)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A6 19 查看目标公会 //tagCSViewTagFamily:
+ Cmd:%s,
+ SubCmd:%s,
+ FamilyID:%d,
+ DataServerID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.FamilyID,
+ self.DataServerID
+ )
+ return DumpString
+
+
+m_NAtagCSViewTagFamily=tagCSViewTagFamily()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSViewTagFamily.Cmd,m_NAtagCSViewTagFamily.SubCmd))] = m_NAtagCSViewTagFamily
+
+
+#------------------------------------------------------
# A6 16 珍宝阁操作 #tagCMZhenbaogeOP
class tagCMZhenbaogeOP(Structure):
--
Gitblit v1.8.0