From bc433db8262081f0400bcb9c2c3476000662daf3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 七月 2024 14:24:53 +0800
Subject: [PATCH] 10205 【越南】【主干】【港台】【砍树】自选礼包(支持一次性放入超65535个数叠加物品;邮件同步支持一次性领取超65535个数叠加物品)

---
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py |  140 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 134 insertions(+), 6 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 5e54f8c..a44bae5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -1085,7 +1085,7 @@
                   ("Type", c_ubyte),    #类型 TBillboardType
                   ("StartIndex", c_int),    #查看的起始名次索引, 默认0
                   ("WatchCnt", c_ubyte),    #查看条数,默认20,最大不超过100
-                  ("IsWatchSelf", c_ubyte),    #是否查看自己名次前后,默认10条数据
+                  ("WatchID", c_int),    #查看指定ID名次前后,如玩家ID、家族ID等
                   ]
 
     def __init__(self):
@@ -1105,7 +1105,7 @@
         self.Type = 0
         self.StartIndex = 0
         self.WatchCnt = 0
-        self.IsWatchSelf = 0
+        self.WatchID = 0
         return
 
     def GetLength(self):
@@ -1121,7 +1121,7 @@
                                 Type:%d,
                                 StartIndex:%d,
                                 WatchCnt:%d,
-                                IsWatchSelf:%d
+                                WatchID:%d
                                 '''\
                                 %(
                                 self.Cmd,
@@ -1129,7 +1129,7 @@
                                 self.Type,
                                 self.StartIndex,
                                 self.WatchCnt,
-                                self.IsWatchSelf
+                                self.WatchID
                                 )
         return DumpString
 
@@ -2379,6 +2379,66 @@
 
 m_NAtagCGUseAssistThanksGift=tagCGUseAssistThanksGift()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGUseAssistThanksGift.Cmd,m_NAtagCGUseAssistThanksGift.SubCmd))] = m_NAtagCGUseAssistThanksGift
+
+
+#------------------------------------------------------
+# B0 20 请求膜拜玩家 #tagCGWorship
+
+class  tagCGWorship(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("PlayerID", c_int),    # 目标玩家ID
+                  ("WorshipType", c_ubyte),    # 膜拜类型
+                  ("WorshipValue", c_int),    # 膜拜类型对应的功能值,如名次或其他,由具体膜拜类型定义对应值含义
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB0
+        self.SubCmd = 0x20
+        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 = 0xB0
+        self.SubCmd = 0x20
+        self.PlayerID = 0
+        self.WorshipType = 0
+        self.WorshipValue = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCGWorship)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B0 20 请求膜拜玩家 //tagCGWorship:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                PlayerID:%d,
+                                WorshipType:%d,
+                                WorshipValue:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.PlayerID,
+                                self.WorshipType,
+                                self.WorshipValue
+                                )
+        return DumpString
+
+
+m_NAtagCGWorship=tagCGWorship()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGWorship.Cmd,m_NAtagCGWorship.SubCmd))] = m_NAtagCGWorship
 
 
 #------------------------------------------------------
@@ -4613,6 +4673,9 @@
                   ("Type", c_ubyte),    #榜单类型
                   ("GroupValue1", c_ubyte),    # 分组值1
                   ("GroupValue2", c_ubyte),    # 分组值2,与分组值1组合归为同组榜单数据
+                  ("StartIndex", c_int),    #查看的起始名次索引, 默认0
+                  ("WatchCnt", c_ubyte),    #查看条数,默认20,最大不超过100
+                  ("WatchID", c_int),    #查看指定ID名次前后,如玩家ID、家族ID等
                   ]
 
     def __init__(self):
@@ -4632,6 +4695,9 @@
         self.Type = 0
         self.GroupValue1 = 0
         self.GroupValue2 = 0
+        self.StartIndex = 0
+        self.WatchCnt = 0
+        self.WatchID = 0
         return
 
     def GetLength(self):
@@ -4646,14 +4712,20 @@
                                 SubCmd:%s,
                                 Type:%d,
                                 GroupValue1:%d,
-                                GroupValue2:%d
+                                GroupValue2:%d,
+                                StartIndex:%d,
+                                WatchCnt:%d,
+                                WatchID:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.Type,
                                 self.GroupValue1,
-                                self.GroupValue2
+                                self.GroupValue2,
+                                self.StartIndex,
+                                self.WatchCnt,
+                                self.WatchID
                                 )
         return DumpString
 
@@ -5185,6 +5257,62 @@
 
 
 #------------------------------------------------------
+# A1 26 充值自选物品选择 #tagCMSelectCTGItem
+
+class  tagCMSelectCTGItem(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("RecordID", c_ushort),    #充值ID
+                  ("SelectItemValue", c_int),    # 自选物品索引值,每两位存储每个自选索引对应选择的物品索引+1,存储位值为0代表未选择,最多支持选择4种物品
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA1
+        self.SubCmd = 0x26
+        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 = 0xA1
+        self.SubCmd = 0x26
+        self.RecordID = 0
+        self.SelectItemValue = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMSelectCTGItem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A1 26 充值自选物品选择 //tagCMSelectCTGItem:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                RecordID:%d,
+                                SelectItemValue:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.RecordID,
+                                self.SelectItemValue
+                                )
+        return DumpString
+
+
+m_NAtagCMSelectCTGItem=tagCMSelectCTGItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSelectCTGItem.Cmd,m_NAtagCMSelectCTGItem.SubCmd))] = m_NAtagCMSelectCTGItem
+
+
+#------------------------------------------------------
 #A1 03 设置是否成年 #tagCMAdult
 
 class  tagCMAdult(Structure):

--
Gitblit v1.8.0