hch
2018-09-13 ecc0fff10c9e6a5d510e1f97370a5fa29233746e
1 buff减层导致buff消失时 添加刷NPC属性
1个文件已修改
18 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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