From 2a41f04515a5cc91e285cf00e9330dc035e26765 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 16 四月 2019 16:09:14 +0800
Subject: [PATCH] 3287 【2.0】娲皇遗迹S通关异常自动退出副本

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
index bdf641a..780e9b1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
@@ -503,11 +503,19 @@
     needSyncFBData = False
     overDict = {}
     if isPass:
+        curGrade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [dataMapID])
+        if curGrade < grade:
+            GameWorld.DebugLog("    更新过关评级: dataMapID=%s,lineID=%s,curGrade=%s,rewardGrade=%s" 
+                               % (dataMapID, lineID, curGrade, grade), curPlayer.GetPlayerID())
+            GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, grade, False, [dataMapID])
+            needSyncFBData = True
+    
+        
         overDict = {FBCommon.Over_costTime:costTime, FBCommon.Over_grade:grade}
         if not nextLineID:#没有下一层则给奖励!!
             rewardRet = __GivePlayerQueenRelicsReward(curPlayer, dataMapID, rewardLine - 1, lineID, grade, maxGrade, rewardRateList)
             if rewardRet:
-                needSyncFBData, startRewardLineID, totalSP, rewardItemList = rewardRet
+                startRewardLineID, totalSP, rewardItemList = rewardRet
                 overDict.update({FBCommon.Over_sp:totalSP, FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(rewardItemList), 
                                  "startRewardLineID":startRewardLineID})
         if lineID+1 > curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBHistoryMaxLine % dataMapID):
@@ -528,7 +536,7 @@
         isInFBOnDay = gameFB.GetPlayerGameFBDictByKey(playerID, FBPKey_IsInFBOnDay)
         if not isInFBOnDay:
             GameWorld.DebugLog("首次结算奖励,增加挑战次数!", playerID)
-            needSyncFBData = True
+            needSyncFBData = False
             FBCommon.AddEnterFBCount(curPlayer, dataMapID)
             addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, mapID, lineID)
             overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
@@ -562,18 +570,12 @@
         return
     
     startRewardLineID = rewardLineID + 1
-    needSyncFBData = False
+
     # 统计奖励,本关卡之前的都给最高级奖励, 当前层以本次评级为准
     for giveLineID in xrange(startRewardLineID, curLineID + 1):
         
         rewardGrade = maxGrade if giveLineID < curLineID else passGrade
-        curGrade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, giveLineID, False, [dataMapID])
-        if curGrade < rewardGrade:
-            GameWorld.DebugLog("    更新过关评级: dataMapID=%s,giveLineID=%s,curGrade=%s,rewardGrade=%s" 
-                               % (dataMapID, giveLineID, curGrade, rewardGrade), curPlayer.GetPlayerID())
-            GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, giveLineID, rewardGrade, False, [dataMapID])
-            needSyncFBData = True
-            
+                    
         lineReward = FBCommon.GetFBLineReward(dataMapID, giveLineID)
         rewardSP = lineReward[0]
         rewardItemList = lineReward[1:]
@@ -617,7 +619,7 @@
             ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem], event=["QueenRelics", False, {}])
             
     GameWorld.DebugLog("    总奖励:totalSP=%s,rewardItemList=%s" % (totalSP, rewardItemList), curPlayer.GetPlayerID())
-    return needSyncFBData, startRewardLineID, totalSP, rewardItemList
+    return startRewardLineID, totalSP, rewardItemList
 
 
 ## 副本行为

--
Gitblit v1.8.0