From bc915a9b717eccef3c8d825f9af79a7596394ac7 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期四, 09 五月 2019 11:34:27 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 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 bc90b1e..2fb69b6 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 @@ -1747,6 +1747,35 @@ return returnInfo + +def FindBuffByOwner(gameObj, skillTypeID, ownerID, ownerType): + findSkill = GameWorld.GetGameData().GetSkillBySkillID(skillTypeID) + buffType = GetBuffType(findSkill) + buffTuple = GetBuffManagerByBuffType(gameObj, buffType) + if buffTuple == (): + return 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 + + return None + #--------------------------------------------------------------------- ## 执行清空命令 参数:玩家, 保留技能类型列表 # @param curPlayer 玩家 -- Gitblit v1.8.0