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/GameWorldLogic/FBProcess/GameLogic_TrialTower.py | 78 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 76 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py index 2a292a0..aaeb8ce 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_TrialTower.py @@ -355,7 +355,7 @@ ## 给过关奖励 -def __GiveFBPassPrize(curPlayer, fbLevel): +def __GiveFBPassPrize(curPlayer, fbLevel, moneyDictTotal=None, itemListTotal=None): ipyData = GetTowerIpyData(fbLevel) if not ipyData: return {} @@ -406,6 +406,11 @@ moneyDict = {ShareDefine.TYPE_Price_Rune:addJH, ShareDefine.TYPE_Price_Ysog:RuneMagicEssence} prizeDict = {FBCommon.Over_money:FBCommon.GetJsonMoneyList(moneyDict), FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(prizeItemList)} + if isinstance(moneyDictTotal, dict): + for moneyType, addValue in moneyDict.items(): + moneyDictTotal[moneyType] = moneyDictTotal.get(moneyType, 0) + addValue + if isinstance(itemListTotal, list): + itemListTotal += prizeItemList # for _ in xrange(challengeCnt): # EventReport.WriteEvent_custom_mission_log(curPlayer, ChConfig.CME_FB_TrialTower, ChConfig.CME_Log_End, 1, cmeInfoEx=bossName) return prizeDict @@ -659,4 +664,73 @@ #BOSS复活活动 PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_TowerSweep, 1) PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_TowerSweep, 1) - return True \ No newline at end of file + return True + +def OnPlayerFBQuickPass(curPlayer, mapID, lineID): + '''副本快速过关验证 + @param mapID: 数据地图ID + @param lineID: 目标关卡线路ID,可一次性跳多关,由前端发包决定 + @return: (bossID, quickCnt) 或 None + @note: bossID 目标NPCID - 目标关卡所需要挑战的主NPCID,一般是boss,用于验证战力是否满足快速过关 + @note: quickCnt 本次总共跳过几关 - 默认1 + ''' + + ipyData = GetTowerIpyData(lineID) + if not ipyData: + return + curLineID = __GetTrialLevelCurPassLV(curPlayer) + if lineID <= curLineID: + GameWorld.DebugLog("符印塔本关已过关, 无法挑战! lineID=%s" % lineID, curPlayer.GetPlayerID()) + return + bossID = ipyData.GetNPCID() + quickCnt = 0 #lineID - curLineID + + fromLineID = curLineID + 1 + for passLineID in range(fromLineID, lineID + 1): + # 符印塔lineID可能会跳,这里遍历不输出找不到的lineID + ipyData = IpyGameDataPY.GetIpyGameDataNotLog('RuneTower', passLineID) + if not ipyData: + continue + quickCnt += 1 + + return bossID, quickCnt + +def OnPlayerFBQuickPassResult(curPlayer, mapID, lineID): + '''副本快速过关结果 + ''' + + playerID = curPlayer.GetPlayerID() + curLineID = __GetTrialLevelCurPassLV(curPlayer) + fromLineID = curLineID + 1 + GameWorld.DebugLog("处理快速过关结算: mapID=%s,fromLineID=%s to %s" % (mapID, fromLineID, lineID), playerID) + + moneyDictTotal = {} + itemListTotal = [] + for passLineID in range(fromLineID, lineID + 1): + ipyData = IpyGameDataPY.GetIpyGameDataNotLog('RuneTower', passLineID) + if not ipyData: + continue + + if ipyData.GetIsNotify(): + IPY_Data = IpyGameDataPY.IPY_Data() + maxLevel = IPY_Data.GetRuneTowerByIndex(IPY_Data.GetRuneTowerCount()-1).GetID() + sysMark = 'RuneTowerInfo_1' if passLineID == maxLevel else 'GeRen_liubo_471172' + PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetPlayerName(), passLineID / 100]) + + #更新关卡 + SetTrialLevelCurPassLV(curPlayer, passLineID) + # 给过关奖励 + __GiveFBPassPrize(curPlayer, passLineID, moneyDictTotal, itemListTotal) + + #任务 + EventShell.EventRespons_TrialTowerCnt(curPlayer, passLineID) + #每日任务 + PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_Tower) + + prizeItemList = GameWorld.MergeItemList(itemListTotal) + quickPassDict = {FBCommon.Over_money:FBCommon.GetJsonMoneyList(moneyDictTotal), + FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(prizeItemList), + "quickPass":1} + __SendTrialTowerOverInfo(curPlayer, passLineID, True, quickPassDict) + SyncTrialLevelInfo(curPlayer) # 同步最新关卡信息 + return -- Gitblit v1.8.0