From 1ea73e1885835466265ce788d93556b7030ee0e8 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期日, 30 十二月 2018 18:42:00 +0800 Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(GM工具增加子服服务器维护,文字翻译版) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 34 +++++++++++++++++++++------------- 1 files changed, 21 insertions(+), 13 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..90264dc 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py @@ -79,6 +79,8 @@ __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, 0) # 重置领奖记录 __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord, 0) + #重置额外获得修行点数 + __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint, 0) #重新计算奖励阶段 __CalcAwardStage(curPlayer) #重置可领取修行点,未领取的发邮件 @@ -232,30 +234,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 +273,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 @@ -363,9 +369,11 @@ # return # 由GameServer决定 - if not GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % dailyID): - GameWorld.DebugLog("日常活动未开启!dailyID=%s" % dailyID) - return + # 目前跨服PK暂不需要判断,因为跨服PK次数结算在本服,玩家可能上次未结算离线,等非匹配期间上线,也需要加上,所以暂不判断 + if dailyID not in [ShareDefine.DailyActionID_CrossReamPK]: + if not GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % dailyID): + GameWorld.DebugLog("日常活动未开启!dailyID=%s" % dailyID) + return dayTimesLimit = GetMaxDayTimes(ipyData)#ipyData.GetDayTimes() weekTimesLimit = ipyData.GetWeekTimes() -- Gitblit v1.8.0