From 1b25d47f1fa7ec2e93e16593eb045ebc8be6a6fd Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 03 一月 2024 15:18:55 +0800 Subject: [PATCH] 10084 【主干】【港台】【越南】【BT0.1】【BT0.1-1元】100%聚灵丹(仙界秘境)与50%聚灵丹(仙界秘境)效果修改 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py | 40 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py index 4a3d852..eb57f2d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py @@ -38,6 +38,7 @@ import BuffSkill import EventShell import PyGameData +import SkillCommon #---副本配置对应key值--- @@ -65,6 +66,10 @@ FBPlayerDict_TotalExp = 'FBPlayerDict_TotalExp' # 获得的总经验 FBPlayerDict_TotalExpPoint = 'FBPlayerDict_TotalExpPoint' # 获得的总经验点 FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV' # 鼓舞等级 + +def OnFBPlayerOnLogin(curPlayer): + ReduceExpBuffOnLogin(curPlayer) + return ## 是否能够通过活动查询进入 def OnEnterFBEvent(curPlayer, mapID, lineID, tick): @@ -116,6 +121,7 @@ EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_BZZD, 0, ChConfig.CME_Log_Start, logType) historyEnterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BZZD_HistoryEnterCnt) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_HistoryEnterCnt, min(historyEnterCnt + 1, 999)) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_NeedReduceExpBuff, 1) # 进入的时候标记需要扣除 __GiveFirstEnterPrize(curPlayer, historyEnterCnt + 1) # 初始化所需击杀NPC @@ -228,6 +234,9 @@ ## 玩家主动离开副本 def DoPlayerLeaveFB(curPlayer, tick): + if GameWorld.GetGameFB().GetFBStep() <= FB_Step_Fighting: + GameWorld.DebugLog("经验副本进行中,玩家主动退出,直接扣除经验层级buff!", curPlayer.GetPlayerID()) + DoReduceExpBuff(curPlayer) return ## 玩家升级 @@ -452,6 +461,8 @@ continue playerID = curPlayer.GetPlayerID() + DoReduceExpBuff(curPlayer) + # 记录最高总经验 exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp) expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint) @@ -513,7 +524,15 @@ playerID = curPlayer.GetPlayerID() enterLV = curPlayer.GetLV() - GameWorld.DebugLog("仙界秘境扫荡: mapID=%s,lineID=%s,sweepCnt=%s" % (mapID, lineID, sweepCnt), playerID) + expRateEx = 0 + expRateLayerBuff = SkillCommon.FindBuffByID(curPlayer, ChConfig.Def_SkillID_BZZDBuff)[0] + if expRateLayerBuff: + hasEffect = SkillCommon.GetSkillEffectByEffectID(expRateLayerBuff.GetSkill(), ChConfig.TYPE_Calc_AttrFightExpRate) + if hasEffect: + expRateEx = hasEffect.GetEffectValue(0) # 能叠加的最大上限 + DoReduceExpBuff(curPlayer, expRateLayerBuff) + + GameWorld.DebugLog("仙界秘境扫荡: mapID=%s,lineID=%s,sweepCnt=%s,expRateEx=%s" % (mapID, lineID, sweepCnt, expRateEx), playerID) totalExp = 0 fairylandNPCList = IpyGameDataPY.GetFuncEvalCfg('FairylandNPC', 1) @@ -527,7 +546,7 @@ addExp = eval(IpyGameDataPY.GetFuncCompileCfg("XjmjMonsterExp", 1)) addExpT = addExp * npcCount playerControl = PlayerControl.PlayerControl(curPlayer) - finalAddExp = playerControl.AddExp(addExpT, ShareDefine.Def_ViewExpType_KillNPC) + finalAddExp = playerControl.AddExp(addExpT, ShareDefine.Def_ViewExpType_KillNPC, expRateEx=expRateEx) totalExp += finalAddExp GameWorld.DebugLog(" reExp=%s,npcID=%s,baseExp=%s,expMulti=%s,addExp=%s,npcCount=%s,addExpT=%s,finalAddExp=%s,totalExp=%s" % (reExp, npcID, baseExp, expMulti, addExp, npcCount, addExpT, finalAddExp, totalExp), playerID) @@ -569,6 +588,23 @@ __SendBZZDOverInfo(curPlayer, overDict) return +def DoReduceExpBuff(curPlayer, buff=None): + BuffSkill.ReduceBuffLayer(curPlayer, buff, ChConfig.Def_SkillID_BZZDBuff, 1) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_NeedReduceExpBuff, 0) + return + +def ReduceExpBuffOnLogin(curPlayer): + if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BZZD_NeedReduceExpBuff): + return + + mapID = GameWorld.GetMap().GetMapID() + if mapID == ChConfig.Def_FBMapID_BZZD and GameWorld.GetGameFB().GetFBStep() <= FB_Step_Fighting: + GameWorld.DebugLog("经验副本进行中,还不需要扣除经验层级buff!", curPlayer.GetPlayerID()) + return + + DoReduceExpBuff(curPlayer) + return + ## 副本行为 def DoFBAction(curPlayer, actionType, actionInfo, tick): if actionType == 0: -- Gitblit v1.8.0