From 39880fd93db2a34b4553d7c3ac5bc2dae7e92925 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 29 六月 2019 18:51:54 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 修复无法清除buff问题

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 59ffe87..512409f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1797,7 +1797,34 @@
         return curBuff
     
     return None
+
+def FindBuffByOwnerEx(gameObj, skillTypeID, ownerID, ownerType):
+    findSkill = GameWorld.GetGameData().GetSkillBySkillID(skillTypeID)
+    buffType = GetBuffType(findSkill)
+    buffTuple = GetBuffManagerByBuffType(gameObj, buffType)
+    if buffTuple == ():
+        return None, None, None, None
     
+    buffManager = buffTuple[0]
+    for i in range(0, buffManager.GetBuffCount()):
+        curBuff = buffManager.GetBuff(i)
+        if not curBuff:
+            continue
+        
+        #判断是否拥有同一类型的技能
+        if curBuff.GetSkill().GetSkillTypeID() != skillTypeID:
+            continue
+        
+        #判断是否拥有同一类型的技能
+        if curBuff.GetOwnerID() != ownerID:
+            continue
+        
+        if curBuff.GetOwnerType() != ownerType:
+            continue
+    
+        return curBuff, buffManager, buffType, findSkill
+    
+    return None, None, None, None
 #---------------------------------------------------------------------
 ## 执行清空命令 参数:玩家, 保留技能类型列表
 #  @param curPlayer 玩家

--
Gitblit v1.8.0