From 4b4e5f3f7ea1e59f70d53fd11efe1ecb366cd3f8 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 19 四月 2019 17:16:00 +0800
Subject: [PATCH] 6457 【后端】【2.0】缥缈仙域开发单(宝藏流程调整)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
index aaee95e..55f1568 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
@@ -34,6 +34,7 @@
 
 
 FBPlayerDict_CurStep = 'FBPlayerDict_CurStep'   # 当前阶段
+FBPlayerDict_StepState = 'FBPlayerDict_StepState'   # 阶段状态
 # 副本通用配置
 (
 Def_PrepareTime, # 准备时间,秒
@@ -41,7 +42,8 @@
 Def_LeaveTime, # 退出时间, 秒
 Def_CollectTime, # 采集时间, 秒
 Def_RefreshBossMark, # 刷怪标识点
-) = range(5)
+Def_RefreshBossMark1, # 刷怪标识点
+) = range(6)
 
 
 #当前副本地图的状态
@@ -119,7 +121,10 @@
 
     if fbStep < FB_Step_Prepare:
         FBCommon.SetFBStep(FB_Step_Prepare, tick)
-        
+        boxIDList = FBCommon.GetFBLineRefreshNPC(mapID, lineID)[1:]
+        npcCnt = len(boxIDList)
+        NPCCustomRefresh.SetNPCRefresh(__GetFBTimeCfg()[Def_RefreshBossMark1], boxIDList, npcCnt, npcCnt)
+        FBCommon.SyncDynamicBarrierState(IpyGameDataPY.GetFuncEvalCfg('HazyTreasure'), 1, curPlayer) # 准备期间有动态障碍点
     if fbStep <= FB_Step_Prepare:
         notify_tick = __GetFBTimeCfg(lineID)[Def_PrepareTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
         curPlayer.Sync_TimeTick(IPY_GameWorld.tttWaitStart, 0, max(notify_tick, 0), True)
@@ -168,7 +173,7 @@
     gameFB = GameWorld.GetGameFB()
     
     curStep = gameFB.GetGameFBDictByKey(FBPlayerDict_CurStep) + 1
-    helpDict = {FBCommon.Help_step:curStep}
+    helpDict = {FBCommon.Help_step:curStep, FBCommon.Help_npcTotal:gameFB.GetGameFBDictByKey(FBPlayerDict_StepState)}
     GameWorld.DebugLog("DoFBHelp %s" % str(helpDict))
     FBCommon.Notify_FBHelp(curPlayer, helpDict)
     return
@@ -263,14 +268,19 @@
 def DoFB_Player_KillNPC(curPlayer, curNPC, tick):
     mapID = GameWorld.GetMap().GetMapID()
     lineID = FBCommon.GetFBPropertyMark()
-    bossID, boxID = FBCommon.GetFBLineRefreshNPC(mapID, lineID)
+    bossID = FBCommon.GetFBLineRefreshNPC(mapID, lineID)[0]
     if bossID != curNPC.GetNPCID():
         return
     #刷宝箱进入采集阶段
     GameWorld.GetGameFB().SetGameFBDict(FBPlayerDict_CurStep, 1)
+    
     DoFBHelp(curPlayer, tick)
+    FBCommon.SyncDynamicBarrierState(IpyGameDataPY.GetFuncEvalCfg('HazyTreasure'), 0, curPlayer)
+    #特效NPC消失
+    FBCommon.ClearFBNPCEx(FBCommon.GetFBLineRefreshNPC(mapID, lineID)[2:])
+    
     #FBCommon.SetFBStep(FB_Step_Collect, tick)
-    NPCCustomRefresh.SetNPCRefresh(__GetFBTimeCfg()[Def_RefreshBossMark], [boxID])
+    #NPCCustomRefresh.SetNPCRefresh(__GetFBTimeCfg()[Def_RefreshBossMark], [boxID])
     return
 
 ## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定
@@ -291,7 +301,9 @@
 # @return 无意义
 # @remarks
 def OnCanCollect(curPlayer, curNPC, tick):
-    return True
+    gameFB = GameWorld.GetGameFB()
+    curStep = gameFB.GetGameFBDictByKey(FBPlayerDict_CurStep)
+    return curStep == 1
 
 
 ##副本中,采集物需要Loading时间.
@@ -323,8 +335,8 @@
     
     ChNPC.OnCollectEnd(curPlayer, curNPC)
     GameWorld.DebugLog('    采集成功!', playerID)
-    
-    #DoFBHelp(curPlayer, 0)
+    GameWorld.GetGameFB().SetGameFBDict(FBPlayerDict_StepState, 1)
+    DoFBHelp(curPlayer, 0)
     #掉落给奖励
     DoFairyTreasureOver(curPlayer, tick, dropPosX, dropPosY)
     

--
Gitblit v1.8.0