From 6336a6fd2305873b99412bcaa9ebc857a4773aac Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期二, 21 五月 2019 17:37:34 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 状态判定排除0 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py index 1632d1b..72b5966 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py @@ -63,6 +63,8 @@ # @param isTrue 是否设置该状态 # @return None def SetPyPlayerState(gameObj, pyState, isAdd): + if pyState == 0: + return if pyState not in ChConfig.Def_PlayerStateList: return @@ -94,6 +96,9 @@ # # 故该状态标记仅为一个非精确的标记,应用中请注意!!!(当且仅当多个buff有同一个效果时会提前结束该状态) #=============================================================================== def GetPyPlayerState(gameObj, pyState, ownerID = 0, ownerType = 0): + if pyState == 0: + # 0不需要判断 + return True curState = gameObj.GetDictByKey(ChConfig.Def_PlayerKey_CurState) state = curState & pow(2, pyState) -- Gitblit v1.8.0