From caba629e01f8f603b8e05f588688c40e82eb6c88 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 21 十一月 2025 16:44:33 +0800
Subject: [PATCH] 358 【内政】红颜系统-服务端
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 317 ++++++++++++++++++++++++++++++++++------------------
1 files changed, 207 insertions(+), 110 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 8adb7ac..ad5e796 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -8964,114 +8964,6 @@
#------------------------------------------------------
-# A3 48 仙宝寻主领奖记录 #tagMCXBXZAwardRecordList
-
-class tagMCXBXZAwardRecord(Structure):
- _pack_ = 1
- _fields_ = [
- ("RecordIndex", c_ushort), #第几个记录值 每个key存31个id 0-30为0, 31-61为1..
- ("Record", c_int), #对应是否领取值
- ]
-
- 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.RecordIndex = 0
- self.Record = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCXBXZAwardRecord)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 48 仙宝寻主领奖记录 //tagMCXBXZAwardRecordList:
- RecordIndex:%d,
- Record:%d
- '''\
- %(
- self.RecordIndex,
- self.Record
- )
- return DumpString
-
-
-class tagMCXBXZAwardRecordList(Structure):
- Head = tagHead()
- RecordCnt = 0 #(WORD RecordCnt)//记录个数
- RecordList = list() #(vector<tagMCXBXZAwardRecord> RecordList)//记录列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x48
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.RecordCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
- for i in range(self.RecordCnt):
- temRecordList = tagMCXBXZAwardRecord()
- _pos = temRecordList.ReadData(_lpData, _pos)
- self.RecordList.append(temRecordList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x48
- self.RecordCnt = 0
- self.RecordList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 2
- for i in range(self.RecordCnt):
- length += self.RecordList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteWORD(data, self.RecordCnt)
- for i in range(self.RecordCnt):
- data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- RecordCnt:%d,
- RecordList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.RecordCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCXBXZAwardRecordList=tagMCXBXZAwardRecordList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCXBXZAwardRecordList.Head.Cmd,m_NAtagMCXBXZAwardRecordList.Head.SubCmd))] = m_NAtagMCXBXZAwardRecordList
-
-
-#------------------------------------------------------
# A4 11 传功邀请信息 #tagGCChuangongInviteInfo
class tagGCChuangongInviteInfo(Structure):
@@ -15003,6 +14895,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("Score", c_int), #当前积分
+ ("WinCnt", c_int), #累计胜利次数
]
def __init__(self):
@@ -15020,6 +14913,7 @@
self.Cmd = 0xA9
self.SubCmd = 0x23
self.Score = 0
+ self.WinCnt = 0
return
def GetLength(self):
@@ -15032,12 +14926,14 @@
DumpString = '''// A9 23 演武场玩家信息 //tagSCArenaPlayerInfo:
Cmd:%s,
SubCmd:%s,
- Score:%d
+ Score:%d,
+ WinCnt:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.Score
+ self.Score,
+ self.WinCnt
)
return DumpString
@@ -32317,6 +32213,207 @@
#------------------------------------------------------
+# B1 30 红颜信息 #tagSCBeautyInfo
+
+class tagSCBeautySkin(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("SkinID", c_ushort), #时装ID
+ ("State", c_ubyte), #是否已激活
+ ("Used", c_ubyte), #是否已穿戴该时装,某个红颜的所有时装穿戴可能都为0,则前端取默认时装进行展示,如果有同步已穿戴的则以后端为准
+ ("Star", c_ubyte), #时装星级,激活时为0星
+ ]
+
+ 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.SkinID = 0
+ self.State = 0
+ self.Used = 0
+ self.Star = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCBeautySkin)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B1 30 红颜信息 //tagSCBeautyInfo:
+ SkinID:%d,
+ State:%d,
+ Used:%d,
+ Star:%d
+ '''\
+ %(
+ self.SkinID,
+ self.State,
+ self.Used,
+ self.Star
+ )
+ return DumpString
+
+
+class tagSCBeauty(Structure):
+ BeautyID = 0 #(WORD BeautyID)//红颜ID
+ State = 0 #(BYTE State)//是否已激活
+ LV = 0 #(WORD LV)//红颜好感等级,激活时为0级
+ Exp = 0 #(WORD Exp)//当前等级经验
+ AwardLV = 0 #(WORD AwardLV)//已经领取到的奖励等级记录
+ SkinCnt = 0 #(BYTE SkinCnt)
+ SkinList = list() #(vector<tagSCBeautySkin> SkinList)//时装皮肤列表,默认解锁的不通知,有变化的才会同步
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.BeautyID,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.Exp,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.AwardLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.SkinCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.SkinCnt):
+ temSkinList = tagSCBeautySkin()
+ _pos = temSkinList.ReadData(_lpData, _pos)
+ self.SkinList.append(temSkinList)
+ return _pos
+
+ def Clear(self):
+ self.BeautyID = 0
+ self.State = 0
+ self.LV = 0
+ self.Exp = 0
+ self.AwardLV = 0
+ self.SkinCnt = 0
+ self.SkinList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 2
+ length += 1
+ length += 2
+ length += 2
+ length += 2
+ length += 1
+ for i in range(self.SkinCnt):
+ length += self.SkinList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteWORD(data, self.BeautyID)
+ data = CommFunc.WriteBYTE(data, self.State)
+ data = CommFunc.WriteWORD(data, self.LV)
+ data = CommFunc.WriteWORD(data, self.Exp)
+ data = CommFunc.WriteWORD(data, self.AwardLV)
+ data = CommFunc.WriteBYTE(data, self.SkinCnt)
+ for i in range(self.SkinCnt):
+ data = CommFunc.WriteString(data, self.SkinList[i].GetLength(), self.SkinList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ BeautyID:%d,
+ State:%d,
+ LV:%d,
+ Exp:%d,
+ AwardLV:%d,
+ SkinCnt:%d,
+ SkinList:%s
+ '''\
+ %(
+ self.BeautyID,
+ self.State,
+ self.LV,
+ self.Exp,
+ self.AwardLV,
+ self.SkinCnt,
+ "..."
+ )
+ return DumpString
+
+
+class tagSCBeautyInfo(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)
+ BeautyList = list() #(vector<tagSCBeauty> BeautyList)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB1
+ self.Head.SubCmd = 0x30
+ 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):
+ temBeautyList = tagSCBeauty()
+ _pos = temBeautyList.ReadData(_lpData, _pos)
+ self.BeautyList.append(temBeautyList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB1
+ self.Head.SubCmd = 0x30
+ self.Count = 0
+ self.BeautyList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.Count):
+ length += self.BeautyList[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.BeautyList[i].GetLength(), self.BeautyList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ BeautyList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagSCBeautyInfo=tagSCBeautyInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBeautyInfo.Head.Cmd,m_NAtagSCBeautyInfo.Head.SubCmd))] = m_NAtagSCBeautyInfo
+
+
+#------------------------------------------------------
# B1 27 聊天气泡框信息 #tagSCChatBoxInfo
class tagSCChatBox(Structure):
--
Gitblit v1.8.0