From 71a26587b4adb83f1ce0810a1b67b1a48c525a8b Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 17 十二月 2024 14:19:17 +0800 Subject: [PATCH] 10337 【越南】【英文】【BT】【砍树】爬塔通关类的支持一键过关 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py index 029f675..8213c7e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py @@ -626,3 +626,53 @@ packData.Cnt = len(packData.InfoList) NetPackCommon.SendFakePack(curPlayer, packData) return + +#// B1 08 快速一键过关副本 #tagCMFBQuickPass +# +#struct tagCMFBQuickPass +#{ +# tagHead Head; +# DWORD MapID; +# WORD LineID; +#}; +def OnFBQuickPass(playerIndex, clientData, tick): + curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex) + playerID = curPlayer.GetPlayerID() + mapID = clientData.MapID + lineID = clientData.LineID + GameWorld.DebugLog("玩家请求快速一键过关副本: mapID=%s,lineID=%s" % (mapID, lineID), playerID) + + fbIpyData = FBCommon.GetFBIpyData(mapID) + fbLineIpyData = FBCommon.GetFBLineIpyData(mapID, lineID) + if FBCommon.CheckCanEnterFBComm(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData) != ShareDefine.EntFBAskRet_OK: + return + + reqRet = FBLogic.OnPlayerFBQuickPass(curPlayer, mapID, lineID) + if not reqRet or len(reqRet) != 2: + GameWorld.DebugLog("无法一键过关副本: mapID=%s,lineID=%s" % (mapID, lineID), playerID) + return + bossID, quickCnt = reqRet + if bossID: + npcData = GameWorld.GetGameData().FindNPCDataByID(bossID) + if not npcData: + return + npcFightPower = NPCCommon.GetSuppressFightPower(npcData) + quickNeedRatio = IpyGameDataPY.GetFuncCfg("FBQuickPass", 1) + quickNeedFightPower = int(npcFightPower * quickNeedRatio) + curFightPower = PlayerControl.GetFightPower(curPlayer) + if quickNeedFightPower and curFightPower < quickNeedFightPower: + GameWorld.DebugLog("无法一键过关副本! 战力限制: mapID=%s,lineID=%s,bossID=%s,npcFightPower=%s,quickNeedFightPower=%s > %s" + % (mapID, lineID, bossID, npcFightPower, quickNeedFightPower, curFightPower), playerID) + return + + #增加副本进入次数 + if fbIpyData and fbIpyData.GetDayTimes() and quickCnt: + # 跳关超过1关的要重新验证下 + if quickCnt > 1 and FBCommon.CheckCanEnterFBComm(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData, quickCnt) != ShareDefine.EntFBAskRet_OK: + return + FBCommon.AddEnterFBCount(curPlayer, mapID, quickCnt) + + #扫荡结果给奖励等 + FBLogic.OnPlayerFBQuickPassResult(curPlayer, mapID, lineID) + return + -- Gitblit v1.8.0