From e6062b42c1191e9ab95e000a38276634eff0e1f1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 27 九月 2023 02:57:09 +0800
Subject: [PATCH] 9949 【BT0.1】【主干】天星塔修改(全服奖励修改)

---
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 4a1280f..ffcc7ac 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -4775,6 +4775,66 @@
 
 
 #------------------------------------------------------
+# A1 20 货币兑换 #tagCMMoneyExchange
+
+class  tagCMMoneyExchange(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("SrcMoneyType", c_ubyte),    # 源货币类型
+                  ("TagMoneyType", c_ubyte),    # 目标货币类型
+                  ("ExchangeValue", c_int),    # 兑换数量(消耗源货币的数量)
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA1
+        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 = 0xA1
+        self.SubCmd = 0x20
+        self.SrcMoneyType = 0
+        self.TagMoneyType = 0
+        self.ExchangeValue = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMMoneyExchange)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A1 20 货币兑换 //tagCMMoneyExchange:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                SrcMoneyType:%d,
+                                TagMoneyType:%d,
+                                ExchangeValue:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.SrcMoneyType,
+                                self.TagMoneyType,
+                                self.ExchangeValue
+                                )
+        return DumpString
+
+
+m_NAtagCMMoneyExchange=tagCMMoneyExchange()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMMoneyExchange.Cmd,m_NAtagCMMoneyExchange.SubCmd))] = m_NAtagCMMoneyExchange
+
+
+#------------------------------------------------------
 # A1 01 玩家电脑信息 #tagCMPCInfo
 
 class  tagCMPCInfo(Structure):

--
Gitblit v1.8.0