4695 【后端】【1.2】新增首充赠送仙玉(老号上线重置已重置次数); 4399 【后端】【1.2.0】聊天新增支持气泡框选择功能(已购买对应VIP礼包的玩家上线默认激活对应气泡框)
3个文件已修改
1个文件已添加
98 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetVerFix.py 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4465,6 +4465,12 @@
Def_ClientServerInitOK,             #跨服子服启动成功6
) = range(7)
#版本修正标记, 使用key格式 Def_Player_Dict_VersionFix
(
Def_VerFix_ChatBubbleBox, # 1.2版本购买VIP礼包可获得激活气泡框道具,针对已购买过VIP礼包的老号处理;
Def_VerFix_CTGDoublePrize, # 1.2版本开放首充双倍,重置老号充值ID对应累计充值次数;
) = range(2)
##==================================================================================================
#游戏消费点类型定义
Def_CostType_List = (
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetVerFix.py
New file
@@ -0,0 +1,48 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.SetVerFix
#
# @todo:设置版本修复状态
# @author hxp
# @date 2018-11-10
# @version 1.0
#
# 详细描述: 设置版本修复状态
#
#-------------------------------------------------------------------------------
#"""Version = 2018-11-10 15:00"""
#-------------------------------------------------------------------------------
import PlayerControl
import GameWorld
import ChConfig
## 逻辑实现
#  @param curPlayer
#  @param cmdList 参数列表
#  @return None
def OnExec(curPlayer, cmdList):
    if not cmdList:
        GameWorld.DebugAnswer(curPlayer, "重置所有版本修复状态: SetVerFix 0")
        GameWorld.DebugAnswer(curPlayer, "设置某个版本修复状态: SetVerFix 修复索引 状态")
        return
    if len(cmdList) == 1 and cmdList[0] == 0:
        for i in xrange(5):
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_VersionFix % i, 0)
        GameWorld.DebugAnswer(curPlayer, "重置版本修复成功!")
        return
    if len(cmdList) == 2:
        fixIndex, value = cmdList
        state = 1 if value else 0
        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, fixIndex, state)
        GameWorld.DebugAnswer(curPlayer, "设置版本修复状态: fixIndex=%s,state=%s" % (fixIndex, state))
        return
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -56,6 +56,27 @@
def GetCoinRate(): return IpyGameDataPY.GetFuncCfg("PayRMB")
def OnLogin(curPlayer):
    # 重置充值次数
    if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_CTGDoublePrize):
        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_CTGDoublePrize, 1)
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for i in xrange(ipyDataMgr.GetCTGCount()):
            ipyData = ipyDataMgr.GetCTGByIndex(i)
            recordID = ipyData.GetRecordID()
            totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)
            todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % recordID)
            if not totalBuyCount and not todayBuyCount:
                continue
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, 0)
            drDict = {"PlayerID":curPlayer.GetPlayerID(),"AccID":curPlayer.GetAccID(), "totalBuyCount":totalBuyCount, "todayBuyCount":todayBuyCount, "recordID":recordID}
            DataRecordPack.SendEventPack("ResetCTGCount", drDict, curPlayer)
            GameWorld.Log("重置充值次数: recordID=%s,totalBuyCount=%s,todayBuyCount=%s"
                          % (recordID, totalBuyCount, todayBuyCount), curPlayer.GetPlayerID())
    else:
        GameWorld.DebugLog("已经重置过充值次数!")
    Sync_CoinToGoldCountInfo(curPlayer)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
@@ -36,6 +36,7 @@
import PlayerFamilyRedPacket
import GameFuncComm
import PlayerTeam
import ChPlayer
import time
#---------------------------------------------------------------------
@@ -215,6 +216,28 @@
#  @return None
def DoOnLogin(curPlayer, tick):
    #记录登陆时间
    # VIP礼包聊天气泡框
    if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_ChatBubbleBox):
        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_ChatBubbleBox, 1)
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for i in xrange(ipyDataMgr.GetChatBubbleBoxCount()):
            ipyData = ipyDataMgr.GetChatBubbleBoxByIndex(i)
            needVIPLVGift = ipyData.GetNeedVIPLVGift()
            if not needVIPLVGift:
                continue
            record = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_VipAwardRecord)
            hasBuy = record & pow(2, needVIPLVGift)
            if not hasBuy:
                continue
            boxID = ipyData.GetBoxID()
            ChPlayer.DoActivateChatBubbleBox(curPlayer, boxID)
            drDict = {"PlayerID":curPlayer.GetPlayerID(),"AccID":curPlayer.GetAccID(), "needVIPLVGift":needVIPLVGift, "BoxID":boxID}
            DataRecordPack.SendEventPack("VIPGiftActChatBubbleBox", drDict, curPlayer)
            GameWorld.Log("老号激活VIP礼包聊天气泡框: boxID=%s,needVIPLVGift=%s" % (boxID, needVIPLVGift), curPlayer.GetPlayerID())
    else:
        GameWorld.DebugLog("已经激活过老号VIP气泡框")
    Sycn_VIPMsg(curPlayer)
    Sycn_VIPAwardRecord(curPlayer)
    Sycn_VIPTime(curPlayer, True)