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_SkyTower.py |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
index e3212f3..a8d0845 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
@@ -570,4 +570,73 @@
         
     return
 
+def OnPlayerFBQuickPass(curPlayer, mapID, lineID):
+    '''副本快速过关验证
+    @param mapID: 数据地图ID
+    @param lineID: 目标关卡线路ID,可一次性跳多关,由前端发包决定
+    @return: (bossID, quickCnt) 或  None
+    @note: bossID 目标NPCID - 目标关卡所需要挑战的主NPCID,一般是boss,用于验证战力是否满足快速过关
+    @note: quickCnt 本次总共跳过几关 - 默认1
+    '''
+    
+    if not __CheckCanChallenge(curPlayer, lineID):
+        return
+    curLineID = __GetSkyTowerCurFloor(curPlayer)
+    bossID = __GetSkyTowerBossID(lineID)
+    quickCnt = lineID - curLineID
+    
+    return bossID, quickCnt
 
+def OnPlayerFBQuickPassResult(curPlayer, mapID, lineID):
+    '''副本快速过关结果
+    '''
+    
+    playerID = curPlayer.GetPlayerID()
+    curLineID = __GetSkyTowerCurFloor(curPlayer)
+    fromLineID = curLineID + 1
+    GameWorld.DebugLog("处理快速过关结算: mapID=%s,fromLineID=%s to %s" % (mapID, fromLineID, lineID), playerID)
+    
+    itemListTotal = []
+    for floorID in range(fromLineID, lineID + 1):
+        ipyData = GetTowerIpyData(floorID)
+        if not ipyData:
+            continue
+        
+        if ipyData.GetIsNotify():
+            sysMark = 'KillGodTowerInfo_1'# if floorID == maxLevel else 'GeRen_liubo_471172'
+            PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetPlayerName(), floorID])
+            
+        #更新关卡
+        SetSkyTowerCurfloorID(curPlayer, floorID)
+        
+        #过关奖励
+        giveItemDict = ipyData.GetReward()
+        giveItemList = [[itemID, itemCnt, 0] for itemID, itemCnt in giveItemDict.items()]
+        itemListTotal += giveItemList
+        
+        PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_SkyTower)
+        
+        # 全服目标
+        ipyDataServer = IpyGameDataPY.GetIpyGameDataNotLog("SkyTowerServerChallenge", floorID)
+        if ipyDataServer:
+            maxNeedPassCount = 0
+            rankRewardInfo = ipyDataServer.GetPassRankRewardInfo()
+            for rank in rankRewardInfo.keys():
+                maxNeedPassCount = max(maxNeedPassCount, int(rank))
+            for needPlayerCount in ipyDataServer.GetServerRewardInfo().keys():
+                maxNeedPassCount = max(maxNeedPassCount, int(needPlayerCount))
+            playerID = curPlayer.GetPlayerID()
+            msgInfo = str(["ServerChallengePass", [floorID, maxNeedPassCount, rankRewardInfo]])
+            GameWorld.DebugLog("全服过关信息同步GameServer: %s" % msgInfo, playerID)
+            GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(playerID, 0, 0, "SkyTower", msgInfo, len(msgInfo))
+            
+    prizeItemList = GameWorld.MergeItemList(itemListTotal)
+    ItemControler.GivePlayerItemOrMail(curPlayer, prizeItemList, None, ["SKYTower", False, {}])
+    
+    quickPassDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(prizeItemList), "quickPass":1}
+    __SendSkyTowerOverInfo(curPlayer, floorID, True, quickPassDict)
+    SyncSkyTowerInfo(curPlayer, 0) # 同步最新关卡信息
+    if floorID >= 10:
+        PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_SkyTower, floorID)
+        
+    return

--
Gitblit v1.8.0