From e95c880a51289fb5f4f54b1a24ff6d590dceef0d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 01 二月 2021 16:56:00 +0800
Subject: [PATCH] 8718 【主干】【BT2】充值前向服务器咨询是否可充值封包
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 12 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 52 +++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 13 ++++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 52 +++++++++++++++++
4 files changed, 129 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 1ee8a8d..9fdde86 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -4059,6 +4059,58 @@
#------------------------------------------------------
+# A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
+
+class tagCMQueryCoinToGoldCount(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("RecordID", c_ubyte), #充值记录ID,也就是充值ID,发0则查全部
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA1
+ self.SubCmd = 0x23
+ 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 = 0x23
+ self.RecordID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMQueryCoinToGoldCount)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A1 23 查询充值次数 //tagCMQueryCoinToGoldCount:
+ Cmd:%s,
+ SubCmd:%s,
+ RecordID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.RecordID
+ )
+ return DumpString
+
+
+m_NAtagCMQueryCoinToGoldCount=tagCMQueryCoinToGoldCount()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryCoinToGoldCount.Cmd,m_NAtagCMQueryCoinToGoldCount.SubCmd))] = m_NAtagCMQueryCoinToGoldCount
+
+
+#------------------------------------------------------
# A1 08 刷新主服角色信息 #tagCMRefreshMainServerRole
class tagCMRefreshMainServerRole(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 3790a2b..91af389 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -1318,6 +1318,18 @@
PacketSubCMD_1=0x5
PacketCallFunc_1=GeTuiSetting
+;充值
+[PlayerCoin]
+ScriptName = Player\PlayerCoin.py
+Writer = hxp
+Releaser = hxp
+RegType = 0
+RegisterPackCount = 1
+
+PacketCMD_1=0xA1
+PacketSubCMD_1=0x23
+PacketCallFunc_1=OnQueryCoinToGoldCount
+
;首充
[PlayerGoldGift]
ScriptName = Player\PlayerGoldGift.py
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 1ee8a8d..9fdde86 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -4059,6 +4059,58 @@
#------------------------------------------------------
+# A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
+
+class tagCMQueryCoinToGoldCount(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("RecordID", c_ubyte), #充值记录ID,也就是充值ID,发0则查全部
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA1
+ self.SubCmd = 0x23
+ 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 = 0x23
+ self.RecordID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMQueryCoinToGoldCount)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A1 23 查询充值次数 //tagCMQueryCoinToGoldCount:
+ Cmd:%s,
+ SubCmd:%s,
+ RecordID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.RecordID
+ )
+ return DumpString
+
+
+m_NAtagCMQueryCoinToGoldCount=tagCMQueryCoinToGoldCount()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryCoinToGoldCount.Cmd,m_NAtagCMQueryCoinToGoldCount.SubCmd))] = m_NAtagCMQueryCoinToGoldCount
+
+
+#------------------------------------------------------
# A1 08 刷新主服角色信息 #tagCMRefreshMainServerRole
class tagCMRefreshMainServerRole(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index 0d0b93c..e55f5da 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -163,6 +163,19 @@
Sync_DayFreeGoldGiftState(curPlayer)
return
+#// A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
+#
+#struct tagCMQueryCoinToGoldCount
+#{
+# tagHead Head;
+# BYTE RecordID; //充值记录ID,也就是充值ID,发0则查全部
+#};
+def OnQueryCoinToGoldCount(index, clientData, tick):
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ recordID = clientData.RecordID
+ Sync_CoinToGoldCountInfo(curPlayer, [recordID] if recordID else [])
+ return
+
## 创角赠送
# @param curPlayer 玩家实例
# @return None
--
Gitblit v1.8.0