From 48d8e9100a05380c41935a265b393690b09b29a4 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期六, 11 一月 2020 17:38:32 +0800 Subject: [PATCH] 8346 【恺英】【后端】协助系统(封魔坛boss血量少于百分x无法进入开出配置,协助方不受此限制) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py index b59703e..fb0caad 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py @@ -60,6 +60,7 @@ tagMapID = packCMDList[0] # 目标地图id tagMapLineID = packCMDList[1] # 目标地图线路属性,从0开始 resultLineID = -1 # 结果lineID + hpPer = -1 notifyMark = 'GeRen_chenxin_500807' #不能进的提示 if tagMapID in ChConfig.Def_MapID_LineIDToPropertyID: GameWorld.Log(" DoLogic() tagMapID in ChConfig.Def_MapID_LineIDToPropertyID") @@ -186,17 +187,10 @@ # 如果不是同一线路属性的,则跳过 if propertyID == tagMapPropertyID: if tagMapID == ChConfig.Def_FBMapID_SealDemon: - if GameLogic_SealDemon.GetBossRemainHPPer(index, tagMapLineID, tick) < 15: - findGameWord = None - findPlayerManager = None - notifyMark = "DemonJar_Text4" - break + hpPer = GameLogic_SealDemon.GetBossRemainHPPer(index, tagMapLineID, tick) + elif tagMapID == ChConfig.Def_FBMapID_ZhuXianBoss: - if GameLogic_ZhuXianBoss.GetBossRemainHPPer(index, tagMapLineID, tick) < IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg', 4): - findGameWord = None - findPlayerManager = None - notifyMark = "DemonJar_Text4" - break + hpPer = GameLogic_ZhuXianBoss.GetBossRemainHPPer(index, tagMapLineID, tick) findGameWord = gameWorld findPlayerManager = playerManager @@ -221,7 +215,7 @@ #resultLineID = tagMapLineID resultLineID = 0 - return ['%s' % packCMDList, '%d' % resultLineID, notifyMark] + return ['%s' % packCMDList, '%d' % resultLineID, notifyMark, hpPer] #--------------------------------------------------------------------- @@ -244,9 +238,10 @@ tagMapInfo = eval(funResult[0]) backFBID = int(funResult[1]) # 返回的切图线路id(0~N) notifyMark = funResult[2] + hpPer = funResult[3] mapID = tagMapInfo[0] # 请求的切图id funcLineID = tagMapInfo[1] # 请求的场次线路id(0~6) - GameWorld.Log("GY_Query_EnterFB DoResult() mapID=%s,funcLineID=%s,backFBID=%s" % (mapID, funcLineID, backFBID), curPlayer.GetPlayerID()) + GameWorld.Log("GY_Query_EnterFB DoResult() mapID=%s,funcLineID=%s,backFBID=%s,hpPer=%s" % (mapID, funcLineID, backFBID, hpPer), curPlayer.GetPlayerID()) if backFBID == -1: # 未找到可进入的分线,则返回,提示人数已满 PlayerControl.NotifyCode(curPlayer, notifyMark) @@ -256,6 +251,18 @@ #已在该地图就不让进了 return + # 非协助玩家进入需要判断boss剩余血量是否允许进入 + if hpPer >= 0 and not PlayerControl.GetAssistTagPlayerID(curPlayer): + minHPPer = 15 + if mapID == ChConfig.Def_FBMapID_SealDemon: + minHPPer = IpyGameDataPY.GetFuncCfg('SealDemonFirstPos', 2) + elif mapID == ChConfig.Def_FBMapID_ZhuXianBoss: + minHPPer = IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg', 4) + if hpPer < minHPPer: + GameWorld.DebugLog("boss血量少于可进入的最低血量百分比,无法进入!hpPer=%s,minHPPer=%s" % (hpPer, minHPPer)) + PlayerControl.NotifyCode(curPlayer, "DemonJar_Text4") + return + # 请求进入FB点 ipyEnterPosInfo = FBCommon.GetFBLineEnterPosInfo(mapID, funcLineID) retPos = FBLogic.OnGetFBEnterPos(curPlayer, mapID, funcLineID, ipyEnterPosInfo, tick) -- Gitblit v1.8.0