From ed212e33cd50eca6ff3b7d5f4cac7de975a1e0b7 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 七月 2019 15:20:59 +0800
Subject: [PATCH] 8017 【开发】【主干】玩家退出副本或自定义场景时,如果非死亡状态则血量恢复满血状态

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py      |    5 +++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |    6 ++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 6697720..f6e28e0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -1516,6 +1516,12 @@
         lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromLineID)
         GameWorld.DebugLog("最后一次离开的非中立常规地图不变!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
         
+    # 从副本中切图
+    if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
+        #默认回满血
+        if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and curPlayer.GetHP() < curPlayer.GetMaxHP():
+            curPlayer.SetHP(curPlayer.GetMaxHP())
+            
     #2. 调用切换地图接口
     curPlayer.DoResetWorldPosAndClear()
     
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 7fa19a7..78d47d1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFB.py
@@ -543,6 +543,11 @@
     if mapID and FBCommon.GetCustomMapStep(curPlayer, mapID, lineID) != ChConfig.CustomMapStep_Over:
         FBCommon.SetCustomMapStep(curPlayer, mapID, lineID, ChConfig.CustomMapStep_Over)
     NPCCommon.ClearPriWoodPile(curPlayer)
+    
+    #默认回满血
+    if curPlayer.GetHP() > 0 and curPlayer.GetPlayerAction() != IPY_GameWorld.paDie and curPlayer.GetHP() < curPlayer.GetMaxHP():
+        curPlayer.SetHP(curPlayer.GetMaxHP())
+        
     GameWorld.Log("玩家退出自定义场景!", curPlayer.GetPlayerID())
     return
 

--
Gitblit v1.8.0