From 7aea6ad0d560ee2533024c910b956fdfcdb59583 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 24 五月 2019 15:40:36 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(优化前端本状态逻辑,召唤木桩增加可指定血量,增加可设置玩家血量)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
index bbcdc76..a7c3f1d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
@@ -493,6 +493,7 @@
         if PlayerControl.CheckMoveToFB(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData, tick) != ShareDefine.EntFBAskRet_OK:
             resultPack.Result = 0
             NetPackCommon.SendFakePack(curPlayer, resultPack)
+            PlayerControl.SetCustomMap(curPlayer, 0, 0)
             return
     
     curPlayer.SetCanAttack(False)
@@ -503,8 +504,7 @@
         curPet.SetVisible(False)
         
     curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomScene, 1) # 由于前端不一定有发mapID,所以这里额外记录这个状态,不能直接用mapID判断
-    curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomSceneMapID, mapID)
-    curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomSceneLineID, lineID)
+    PlayerControl.SetCustomMap(curPlayer, mapID, lineID)
     GameWorld.Log("玩家开始自定义场景!mapID=%s,lineID=%s" % (mapID, lineID), curPlayer.GetPlayerID())
     if mapID:
         FBLogic.OnEnterCustomScene(curPlayer, mapID, lineID)
@@ -525,13 +525,12 @@
     curPet = curPlayer.GetPetMgr().GetFightPet()
     if curPet:
         curPet.SetVisible(True)
-    mapID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneMapID)
-    lineID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneLineID)
+    mapID = PlayerControl.GetCustomMapID(curPlayer)
+    lineID = PlayerControl.GetCustomLineID(curPlayer)
     curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomScene, 0)
-    curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomSceneMapID, 0)
-    curPlayer.SetDict(ChConfig.Def_PlayerKey_ClientCustomSceneLineID, 0)
-    if mapID and curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_CustomSceneStartTime % (mapID, lineID)) == ChConfig.CustomSceneState_Over:
-        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_CustomSceneStartTime % (mapID, lineID), ChConfig.CustomSceneState_None)
+    PlayerControl.SetCustomMap(curPlayer, 0, 0)
+    if mapID and FBCommon.GetCustomMapStep(curPlayer, mapID, lineID) != ChConfig.CustomMapStep_Over:
+        FBCommon.SetCustomMapStep(curPlayer, mapID, lineID, ChConfig.CustomMapStep_Over)
     NPCCommon.ClearPriWoodPile(curPlayer)
     GameWorld.Log("玩家退出自定义场景!", curPlayer.GetPlayerID())
     return

--
Gitblit v1.8.0