hxp
2021-02-01 e95c880a51289fb5f4f54b1a24ff6d590dceef0d
8718 【主干】【BT2】充值前向服务器咨询是否可充值封包
4个文件已修改
129 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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):
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
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):
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