From ecc0fff10c9e6a5d510e1f97370a5fa29233746e Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期四, 13 九月 2018 23:10:06 +0800 Subject: [PATCH] 1 buff减层导致buff消失时 添加刷NPC属性 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py index 818c75f..44d5afe 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py @@ -815,12 +815,24 @@ # 当层级为0的时候删除此buff -def SetBuffLayer(curPlayer, buff, layer, delBuff=True, skillTypeID=0, disappearTrigger=True): +def SetBuffLayer(gameObj, buff, layer, delBuff=True, skillTypeID=0, disappearTrigger=True): buff.SetLayer(layer) if layer == 0 and delBuff: tick = GameWorld.GetGameWorld().GetTick() - DelBuffBySkillTypeID(curPlayer, skillTypeID, tick, disappearTrigger) - PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrByBuff() + DelBuffBySkillTypeID(gameObj, skillTypeID, tick, disappearTrigger) + + curObjType = gameObj.GetGameObjType() + #玩家 + if curObjType == IPY_GameWorld.gotPlayer: + #刷新玩家属性 + playerControl = PlayerControl.PlayerControl(gameObj) + #playerControl.CalcPassiveBuffAttr() + playerControl.RefreshPlayerAttrByBuff() + #NPC + elif curObjType == IPY_GameWorld.gotNPC: + npcControl = NPCCommon.NPCControl(gameObj) + npcControl.RefreshNPCAttrState() + return -- Gitblit v1.8.0