From 4279d7e2bf5c4ed9414ee89d0cc4bf0a0407c607 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 25 六月 2024 16:15:44 +0800
Subject: [PATCH] 10185 【越南】【港台】【主干】BOSS凭证修改(有跨服凭证榜活动时验证跨服参与时间点;否则验证本服活动的参与时间点;)

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index c8826b9..5e54f8c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -19428,6 +19428,62 @@
 
 
 #------------------------------------------------------
+# B2 24 使用仙树升级减时物品 #tagCMUseTreeLVUPTimeItem
+
+class  tagCMUseTreeLVUPTimeItem(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("UseCount", c_int),    # 使用个数
+                  ("IsAutoBuy", c_ubyte),    # 不足个数是否自动购买
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB2
+        self.SubCmd = 0x24
+        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 = 0xB2
+        self.SubCmd = 0x24
+        self.UseCount = 0
+        self.IsAutoBuy = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMUseTreeLVUPTimeItem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B2 24 使用仙树升级减时物品 //tagCMUseTreeLVUPTimeItem:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                UseCount:%d,
+                                IsAutoBuy:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.UseCount,
+                                self.IsAutoBuy
+                                )
+        return DumpString
+
+
+m_NAtagCMUseTreeLVUPTimeItem=tagCMUseTreeLVUPTimeItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseTreeLVUPTimeItem.Cmd,m_NAtagCMUseTreeLVUPTimeItem.SubCmd))] = m_NAtagCMUseTreeLVUPTimeItem
+
+
+#------------------------------------------------------
 # B3 17 情戒解锁 #tagCMLoveRingUnlock
 
 class  tagCMLoveRingUnlock(Structure):
@@ -20894,7 +20950,8 @@
     Head = tagHead()
     MapID = 0    #(DWORD MapID)// 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等)
     FuncLineID = 0    #(WORD FuncLineID)
-    PlayerID = 0    #(DWORD PlayerID)// 战斗目标玩家ID,可为0,某些功能可能有用,如竞技场
+    TagType = 0    #(BYTE TagType)// 战斗目标类型,0-NPC,1-玩家,2-队伍
+    TagID = 0    #(DWORD TagID)// 战斗目标类型对应的ID
     ValueCount = 0    #(BYTE ValueCount)
     ValueList = list()    #(vector<DWORD> ValueList)// 附加值列表,可选,具体含义由MapID决定
     data = None
@@ -20910,7 +20967,8 @@
         _pos = self.Head.ReadData(_lpData, _pos)
         self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.FuncLineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
-        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.TagType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.TagID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.ValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.ValueCount):
             value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
@@ -20924,7 +20982,8 @@
         self.Head.SubCmd = 0x10
         self.MapID = 0
         self.FuncLineID = 0
-        self.PlayerID = 0
+        self.TagType = 0
+        self.TagID = 0
         self.ValueCount = 0
         self.ValueList = list()
         return
@@ -20934,6 +20993,7 @@
         length += self.Head.GetLength()
         length += 4
         length += 2
+        length += 1
         length += 4
         length += 1
         length += 4 * self.ValueCount
@@ -20945,7 +21005,8 @@
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
         data = CommFunc.WriteDWORD(data, self.MapID)
         data = CommFunc.WriteWORD(data, self.FuncLineID)
-        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteBYTE(data, self.TagType)
+        data = CommFunc.WriteDWORD(data, self.TagID)
         data = CommFunc.WriteBYTE(data, self.ValueCount)
         for i in range(self.ValueCount):
             data = CommFunc.WriteDWORD(data, self.ValueList[i])
@@ -20956,7 +21017,8 @@
                                 Head:%s,
                                 MapID:%d,
                                 FuncLineID:%d,
-                                PlayerID:%d,
+                                TagType:%d,
+                                TagID:%d,
                                 ValueCount:%d,
                                 ValueList:%s
                                 '''\
@@ -20964,7 +21026,8 @@
                                 self.Head.OutputString(),
                                 self.MapID,
                                 self.FuncLineID,
-                                self.PlayerID,
+                                self.TagType,
+                                self.TagID,
                                 self.ValueCount,
                                 "..."
                                 )

--
Gitblit v1.8.0