hch
2019-01-05 847625c298ff7b3c2208eba8fdc3d231bb8988b2
5717 【1.4.100】充值兑换优化
3个文件已修改
71 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -258,7 +258,7 @@
Writer = alee
Releaser = alee
RegType = 0
RegisterPackCount = 3
RegisterPackCount = 4
PacketCMD_1=0xA8
PacketSubCMD_1=0x01
@@ -272,6 +272,11 @@
PacketSubCMD_3=0x05
PacketCallFunc_3=OnVIPKillNPCLVInfoSwitch
PacketCMD_4=0xA8
PacketSubCMD_4=0x06
PacketCallFunc_4=OnQueryRecharge
;在线奖励
[PlayerOnlinePrize]
ScriptName = Player\PlayerOnlinePrize.py
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -11895,6 +11895,54 @@
#------------------------------------------------------
# A8 06 查询充值结果 #tagCMQueryRecharge
class  tagCMQueryRecharge(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA8
        self.SubCmd = 0x06
        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 = 0xA8
        self.SubCmd = 0x06
        return
    def GetLength(self):
        return sizeof(tagCMQueryRecharge)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A8 06 查询充值结果 //tagCMQueryRecharge:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMQueryRecharge=tagCMQueryRecharge()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryRecharge.Cmd,m_NAtagCMQueryRecharge.SubCmd))] = m_NAtagCMQueryRecharge
#------------------------------------------------------
# A8 05 VIP杀怪等级信息同步开关 #tagCMVIPKillNPCLVInfoSwitch
class  tagCMVIPKillNPCLVInfoSwitch(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
@@ -628,3 +628,19 @@
#===============================================================================
# // A8 06 查询充值结果 #tagCMQueryRecharge
#
# struct    tagCMQueryRecharge
# {
#    tagHead        Head;
# };
#===============================================================================
def OnQueryRecharge(index, packData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    if tick - curPlayer.GetDictByKey("QRtick") < 10000:
        return
    curPlayer.SetDict("QRtick", tick)
    curPlayer.SendDBQueryRecharge()
    return