From 20a1055eb4352a9ea75d52a472f724557deb8d4a Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 26 九月 2018 14:09:54 +0800
Subject: [PATCH] 1889 采集宝箱上限提示

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py
index 297b2e9..f39b17a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_DuJie.py
@@ -123,7 +123,10 @@
 #  @param lineID 线路id
 # @return None
 def __CheckEnter(curPlayer, mapID, lineID):
-    if lineID == 0 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
+    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
+        GameWorld.DebugLog("爵位境界功能未开启, 无法开启渡劫!curLV=%s" % curPlayer.GetLV())
+        return False
+    if lineID == 0 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader or (lineID == 1 and curPlayer.GetTeamID() == 0):
         curRealmLV = curPlayer.GetOfficialRank()
         realmIpyData = PlayerPrestigeSys.GetRealmIpyData(curRealmLV)
         if not realmIpyData:
@@ -139,9 +142,7 @@
 #        if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen) != 1:
 #            return False
    
-    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
-        GameWorld.DebugLog("爵位境界功能未开启, 无法开启渡劫!curLV=%s" % curPlayer.GetLV())
-        return False
+    
     return True
 
 
@@ -172,13 +173,19 @@
 # @return 无意义
 # @remarks 玩家进入副本
 def DoEnterFB(curPlayer, tick):
+    gameFB = GameWorld.GetGameFB()
+    fbStep = gameFB.GetFBStep()
+    if fbStep == FB_Step_LeaveTime:
+        PlayerControl.PlayerLeaveFB(curPlayer)
+        return
+    
     lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
     if not FBCommon.GetHadSetFBPropertyMark():
         FBCommon.SetFBPropertyMark(lineID)
         FBCommon.SetFBStep(FB_Step_MapPrepare, tick)
     
-    gameFB = GameWorld.GetGameFB()
     
+    fbPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt)
     DuJieFBCfg = GetRealmFBTimeCfg()
     if not gameFB.GetGameFBDictByKey(DuJieFB_LeaderPlayerID):
         #重置属性加成
@@ -187,11 +194,12 @@
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBAttrAdd % attrID, 0)
         
         GameWorld.DebugLog('玩家进入副本')
-        if lineID == 0 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
+        
+        if fbPlayerCnt == 1 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
             __SetFBLeaderPlayer(curPlayer)
             if gameFB.GetFBStep() == FB_Step_Fighting:
                 __OnDuJieFBStart(tick)
-    isHelpFight = lineID == 1 and curPlayer.GetTeamLV() != IPY_GameWorld.tmlLeader
+    isHelpFight = lineID == 1 and curPlayer.GetTeamLV() != IPY_GameWorld.tmlLeader and fbPlayerCnt > 1
     joinType = FBCommon.GetFBJoinType(curPlayer, isHelpFight)
     EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, ChConfig.CME_Log_Start, joinType)
     
@@ -368,11 +376,12 @@
 
     curStar = gameFB.GetGameFBDictByKey(DuJieFB_Star)
     realmLV = gameFB.GetGameFBDictByKey(DuJieFB_RealmLV)
-    
+    realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
     lineID = FBCommon.GetFBPropertyMark()
     leaveTick = invadeCfg[Def_Time_Leave] * 1000
     overDict = {FBCommon.Over_costTime:costTime,FBCommon.Over_grade:curStar, FBCommon.Over_leaderID:leaderPlayerID}
-    for i in xrange(copyMapPlayerManager.GetPlayerCount()):
+    playerCnt = copyMapPlayerManager.GetPlayerCount()
+    for i in xrange(playerCnt):
         
         curPlayer = copyMapPlayerManager.GetPlayerByIndex(i)
         
@@ -393,20 +402,20 @@
                 FBCommon.SyncFBEnterTick(curPlayer)
             else:
                 #帮忙打的给奖励
-                __GiveTeamAward(curPlayer, leaderPlayer, realmLV, curStar)
+                __GiveTeamAward(curPlayer, leaderPlayer, realmIpyData, curStar)
                 EventShell.EventRespons_DujieFBHelpPass(curPlayer)
-                
-            realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
+                FBCommon.AddFBHelpPoint(curPlayer, ChConfig.Def_FBMapID_DuJie, 1)
+            
             if realmIpyData and realmIpyData.GetIsBigRealm():
                 #成就
                 PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DujieFBHelpPass, 1)
-        
+            if playerCnt > 1: #多人组队渡劫
+                EventShell.EventRespons_FBEvent(curPlayer, 'teamdujie')
     
     return
 
-def __GiveTeamAward(curPlayer, leaderPlayer, realmLV, curStar):
+def __GiveTeamAward(curPlayer, leaderPlayer, realmIpyData, curStar):
     #帮忙打的给奖励
-    realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
     if not realmIpyData:
         return
     teamAwardDict = realmIpyData.GetTeamAward()

--
Gitblit v1.8.0