From b965081066ea579c45c73f08cd9cd61bc157ac9f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 09 五月 2019 11:15:45 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(防范跨服妖王关闭线路时导致的报错)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
index 61e27f2..fcc507e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
@@ -15,6 +15,7 @@
import ShareDefine
import ChConfig
import IPY_GameWorld
+import IpyGameDataPY
# 关于血量的函数这里只包装最简单的超DWORD处理
@@ -47,9 +48,11 @@
if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
gameObj.SetHP(value, isNotify)
else:
- if gameObj.GetType() == ChConfig.ntMonsterTime and not isByTime and value not in [GetMaxHP(gameObj), 0]:
- #GameWorld.DebugLog("不能设置按时间掉血的怪物血量! id=%s,npciD=%s,value=%s,isByTime=%s" % (gameObj.GetID(), gameObj.GetNPCID(), value, isByTime))
- return
+ if gameObj.GetGameObjType() == IPY_GameWorld.gotNPC:
+ npcID = gameObj.GetNPCID()
+ if IpyGameDataPY.GetIpyGameDataNotLog("NPCTimeLostHP", npcID) and not isByTime and value not in [GetMaxHP(gameObj), 0]:
+ #GameWorld.DebugLog("不能设置按时间掉血的怪物血量! id=%s,npciD=%s,value=%s,isByTime=%s" % (gameObj.GetID(), gameObj.GetNPCID(), value, isByTime))
+ return
gameObj.SetHPEx(value/ShareDefine.Def_PerPointValue)
gameObj.SetHP(value%ShareDefine.Def_PerPointValue)
--
Gitblit v1.8.0