From 787c076b2fdc73a11b9b76e2ea928f3da1f5873e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 19 十二月 2019 16:35:02 +0800
Subject: [PATCH] 8359 【主干】活跃兑换

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py |   44 +++++++++++++++++++++++++++-----------------
 1 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
index 1a40f3a..4fb0820 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
@@ -75,33 +75,32 @@
 def OnChangeMapAsk(ask, tick):
     return IPY_GameWorld.cmeAccept
 
-
 ## 进副本
 #  @param curPlayer
 #  @param tick
 #  @return None
 def DoEnterFB(curPlayer, tick):
     playerID = curPlayer.GetPlayerID()
+    if curPlayer.GetHP() == 0:
+        PlayerControl.PlayerLeaveFB(curPlayer)
+        return
 
-    # 设置副本公共属性的单独处理,防止队员进入后被修改
-    if not FBCommon.GetHadSetFBPropertyMark():
-        lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
-        FBCommon.SetFBPropertyMark(lineID)
-        
-    GameWorld.DebugLog("DoEnterFB...lineID=%s" % FBCommon.GetFBPropertyMark(), playerID)
+    lineID = PlayerControl.GetFBFuncLineID(curPlayer) 
+    GameWorld.DebugLog("DoEnterFB...lineID=%s" % lineID, playerID)
     hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
     if not hadDelTicket:
+        GameWorld.DebugLog('扣门票!')
         FBCommon.SetHadDelTicket(curPlayer)
         canEnterLine = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_BossHome)
-        lineID = FBCommon.GetFBPropertyMark()
-        if lineID+1 > canEnterLine:
+        if lineID+1 > canEnterLine and not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFBFree):
             costGold = __GetEnterCostMoney(lineID)
             costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, ShareDefine.TYPE_Price_Gold_Paper_Money, costGold)
             mapID = GameWorld.GetMap().GetMapID()
             infoDict = {"MapID":mapID,"LineID":lineID}
             for moneyType, moneyNum in costMoneyList:
                 if not PlayerControl.PayMoney(curPlayer, moneyType, moneyNum, ChConfig.Def_Cost_EnterFB, infoDict):
-                    GameWorld.DebugLog("仙玉不足!costGold=%s" % costGold)
+                    GameWorld.Log("仙玉不足!costGold=%s" % costGold)
+                    PlayerControl.PlayerLeaveFB(curPlayer)
                     return
         EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_BossHome, lineID, ChConfig.CME_Log_Start)
     
@@ -114,7 +113,7 @@
 # @param tick 时间戳
 # @return 无意义
 def DoExitFB(curPlayer, tick):
- 
+    
     return
 
 ##玩家主动离开副本.
@@ -134,7 +133,17 @@
 #  @param None
 #  @return 是否副本复活
 def OnPlayerReborn():
-    return False
+    return True
+
+## 重置副本复活玩家坐标点
+# @param None
+# @return 无意义
+def OnResetFBRebornPlacePos(curPlayer, rebornPlace, tick):
+    lineID = PlayerControl.GetFBFuncLineID(curPlayer)
+    ipyEnterPosInfo = FBCommon.GetFBLineEnterPosInfo(ChConfig.Def_FBMapID_BossHome, lineID)
+    posX, posY = ipyEnterPosInfo[:2]
+    curPlayer.ResetPos(posX, posY)
+    return
 
 ## 询问玩家是否切换同个功能地图的不同场景地图
 def CanChangeSameDataMapFB(curPlayer, mapID, lineID):
@@ -172,8 +181,9 @@
 # @return 返回值无意义
 # @remarks 玩家主动离开副本.
 def DoPlayerDead(curPlayer):
-    FBCommon.Notify_FB_Over(curPlayer, {FBCommon.Over_isPass:0})
-    lineID = FBCommon.GetFBPropertyMark()
-    leaveTime = int(FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_BossHome, lineID))
-    curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTime*1000, True)
-    return
\ No newline at end of file
+    #FBCommon.Notify_FB_Over(curPlayer, {FBCommon.Over_isPass:0})
+    #lineID = PlayerControl.GetFBFuncLineID(curPlayer) 
+    #leaveTime = int(FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_BossHome, lineID))
+    #curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTime*1000, True)
+    return
+

--
Gitblit v1.8.0