From 65a4c2029af3f70ce484a2eec167c50f227d7a5c Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 27 五月 2019 14:08:22 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(封魔坛前期本)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py |   32 +++++++++-----------------------
 1 files changed, 9 insertions(+), 23 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..751177c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
@@ -493,18 +493,13 @@
         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)
-    curPlayer.SetVisible(False)
-    curPlayer.SetSight(0)
-    curPet = curPlayer.GetPetMgr().GetFightPet()
-    if curPet:
-        curPet.SetVisible(False)
+    PlayerControl.SetPlayerSightLevel(curPlayer, curPlayer.GetID())
         
     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)
@@ -516,22 +511,13 @@
 
 def DoExitCustomScene(curPlayer):
     ## 退出自定义场景状态
-    curPlayer.SetCanAttack(True)
-    curPlayer.SetVisible(True)
-    curPlayer.SetSight(0)
-    curPlayer.RefreshView()
-    curPlayer.SetSight(ChConfig.Def_PlayerSight_Default)
-    curPlayer.RefreshView()
-    curPet = curPlayer.GetPetMgr().GetFightPet()
-    if curPet:
-        curPet.SetVisible(True)
-    mapID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneMapID)
-    lineID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneLineID)
+    PlayerControl.SetPlayerSightLevel(curPlayer, 0)
+    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