From 8532cf79b7fec586561bea3cc05d58fd7d5c9b52 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 28 十二月 2023 16:24:08 +0800
Subject: [PATCH] 10077 游戏代币方案

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 0521142..49d2b66 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -4723,6 +4723,84 @@
 
 
 #------------------------------------------------------
+# A1 25 代币购买充值商品编号商品 #tagCMCoinBuyOrderInfo
+
+class  tagCMCoinBuyOrderInfo(Structure):
+    Head = tagHead()
+    AppIDLen = 0    #(BYTE AppIDLen)
+    AppID = ""    #(String AppID)
+    OrderInfoLen = 0    #(BYTE OrderInfoLen)
+    OrderInfo = ""    #(String OrderInfo)//商品编号
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA1
+        self.Head.SubCmd = 0x25
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.AppIDLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.AppID,_pos = CommFunc.ReadString(_lpData, _pos,self.AppIDLen)
+        self.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA1
+        self.Head.SubCmd = 0x25
+        self.AppIDLen = 0
+        self.AppID = ""
+        self.OrderInfoLen = 0
+        self.OrderInfo = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += len(self.AppID)
+        length += 1
+        length += len(self.OrderInfo)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.AppIDLen)
+        data = CommFunc.WriteString(data, self.AppIDLen, self.AppID)
+        data = CommFunc.WriteBYTE(data, self.OrderInfoLen)
+        data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                AppIDLen:%d,
+                                AppID:%s,
+                                OrderInfoLen:%d,
+                                OrderInfo:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.AppIDLen,
+                                self.AppID,
+                                self.OrderInfoLen,
+                                self.OrderInfo
+                                )
+        return DumpString
+
+
+m_NAtagCMCoinBuyOrderInfo=tagCMCoinBuyOrderInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCoinBuyOrderInfo.Head.Cmd,m_NAtagCMCoinBuyOrderInfo.Head.SubCmd))] = m_NAtagCMCoinBuyOrderInfo
+
+
+#------------------------------------------------------
 # A1 20 货币兑换 #tagCMMoneyExchange
 
 class  tagCMMoneyExchange(Structure):

--
Gitblit v1.8.0