xdh
2019-06-03 b2c3652b5c42feaaaa0867c44662201db89d9e97
6969 【2.0】【后端】缥缈仙域先随机再扣活跃
2个文件已修改
15 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -286,11 +286,12 @@
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, min(IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint'), curPoint + addValue))
    return
def CostActivityPoint(curPlayer, costPoint):
def CostActivityPoint(curPlayer, costPoint, isOnlyCheck=False):
    # 消耗活跃点
    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    if curPoint < costPoint:
        return
    if not isOnlyCheck:
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint,
                    curPoint - costPoint)
    SyncDailyActivityInfo(curPlayer)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -136,7 +136,7 @@
        GameWorld.DebugLog("    正在寻访仙域中!请先退出寻访")
        return
    costPoint = IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint', 2)
    if not PlayerActivity.CostActivityPoint(curPlayer, costPoint):
    if not PlayerActivity.CostActivityPoint(curPlayer, costPoint, True):
        GameWorld.DebugLog("    寻访仙域需要活跃点不足!costPoint=%s"%costPoint)
        return
@@ -185,6 +185,12 @@
        #更新全服出现次数
        msgStr = str(fdEventIDList)
        GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'AddFairyDomainEvent', msgStr, len(msgStr))
    if not fdEventIDList:
        fdEventIDList = IpyGameDataPY.GetFuncEvalCfg('ImmortalDomain', 5)
        GameWorld.Log('寻访仙域, 没有随机出事件,使用默认事件!! playerLV=%s,visitCnt=%s,默认fdEventIDList=%s'%(curPlayer.GetLV(), visitCnt, fdEventIDList), curPlayer.GetID())
        if not fdEventIDList:
            return
    PlayerActivity.CostActivityPoint(curPlayer, costPoint)
    #奇遇事件 随机档位数据
    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
    for fdEventID in fdEventIDList:
@@ -201,10 +207,6 @@
            condition = random.choice(conditionList)
            index = conditionList.index(condition)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
    if not fdEventIDList:
        GameWorld.Log('寻访仙域, 没有随机出事件!!')
        return
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainVisitCnt, min(visitCnt + 1, ChConfig.Def_UpperLimit_DWord))
    #设置事件