From 061310cd9cb46af344fa429b5f3f605f7bbb5046 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期一, 19 十一月 2018 19:21:40 +0800 Subject: [PATCH] 4740 子 【开发】【1.3】通过多倍修行点额外获得的修行点有上限限制(每日) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py index 632f29d..33bb1cc 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py @@ -232,30 +232,33 @@ multiple = 1 if addValue: #__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, nuwTotalPoint) - multiple = __GetActionAddPer(curPlayer) - addValue *= multiple + multiple, extraPointLimit = __GetActionAddPer(curPlayer) + curExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint) + addExtraPoint = max(0, min(addValue*(multiple-1),extraPointLimit-curExtraPoint)) if extraPointLimit else addValue*(multiple-1) + __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, curExtraPoint+addExtraPoint) + addValue = addValue + addExtraPoint realmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint) __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint, realmPoint+addValue) SyncDailyActivityInfo(curPlayer) - GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s" - % (activityNum, addPbCnt, addValue, multiple), curPlayer.GetPlayerID()) + GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s" + % (activityNum, addPbCnt, addValue, multiple, addExtraPoint, curExtraPoint), curPlayer.GetPlayerID()) return def __GetActionAddPer(curPlayer): - multiple = 1 + multiple, extraPointLimit = 1, 0 #倍数、额外可获得修行点上限 actRealmPointInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RealmPoint, {})# 多倍修行点活动 if not actRealmPointInfo: - return multiple + return multiple, extraPointLimit if not actRealmPointInfo.get(ShareDefine.ActKey_State): - return multiple + return multiple, extraPointLimit actRealmPointIpyData = IpyGameDataPY.GetIpyGameData("ActRealmPoint", actRealmPointInfo.get(ShareDefine.ActKey_CfgID, 0)) if not actRealmPointIpyData: - return multiple + return multiple, extraPointLimit if curPlayer.GetLV() < actRealmPointIpyData.GetLVLimit(): - return multiple - return actRealmPointIpyData.GetMultiple() + return multiple, extraPointLimit + return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit() ## 同步活跃度信息 # @param curPlayer @@ -268,6 +271,7 @@ sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage) sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord) sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint) + sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint) NetPackCommon.SendFakePack(curPlayer, sendPack) return -- Gitblit v1.8.0