From 1c96b414fcd15749131c8eeb1857de82cfbe981e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 18 九月 2018 20:04:58 +0800
Subject: [PATCH] 3647 【后端】思璞游戏SDK接入 同步脱机挂封包

---
 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