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/PlayerYinji.py |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerYinji.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerYinji.py
index 384c6ab..85d9dbe 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerYinji.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerYinji.py
@@ -23,7 +23,6 @@
 
 Def_LastYinji_Tick = "lastyjtick"   # 上一次印记消失时间
 
-#CDBPlayerRefresh_XP
 def AddYinji(curPlayer, cnt):
     beforeCnt = PlayerControl.GetYinjiCnt(curPlayer)
     #上限    X个
@@ -36,7 +35,7 @@
     return
 
 def SubYinji(curPlayer, cnt):
-    PlayerControl.SetYinjiCnt(curPlayer, max(curPlayer.GetXP() - cnt, 0))
+    PlayerControl.SetYinjiCnt(curPlayer, max(PlayerControl.GetYinjiCnt(curPlayer) - cnt, 0))
     return
 
 
@@ -51,6 +50,7 @@
     
     StartYinjiTick(curPlayer)
     
+    
     SubYinji(curPlayer, 1)
     
     
@@ -58,4 +58,30 @@
     curPlayer.SetDict(Def_LastYinji_Tick, GameWorld.GetGameWorld().GetTick())
     pack = ChPyNetSendPack.tagMCYinjiStartTime()
 
-    NetPackCommon.SendFakePack(curPlayer, pack)
\ No newline at end of file
+    NetPackCommon.SendFakePack(curPlayer, pack)
+    
+    
+def OnLoadMap(curPlayer):
+    PlayerControl.SetYinjiCnt(curPlayer, 0)
+    return
+    
+#===============================================================================
+# // B4 0D 战斗印记 #tagCMYinji
+# 
+# struct    tagCMYinji
+# {
+#    tagHead        Head;
+#    BYTE        Count;
+#    BYTE        Type;    // 0 加,1减
+# };
+#===============================================================================
+def OnYinji(index, clientData, tick):
+    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    if curPlayer.GetSightLevel() == 0:
+        return
+    if clientData.Type == 0:
+        AddYinji(curPlayer, clientData.Count)
+    elif clientData.Type == 1:
+        SubYinji(curPlayer, clientData.Count)
+    return
+

--
Gitblit v1.8.0