From 7ce7a4931b65c4e05ea755b238f85dbc25e36266 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 01 六月 2019 21:00:19 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 -- 清除负面buff

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py |   36 ++++++++++++++----------------------
 1 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
index 18b1bbb..4a45d87 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py
@@ -36,11 +36,11 @@
         return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
     
     delSuccess = False
-    buffSkill = None
-    buffType = 0
     
     # 优先清理指定技能
-    theSkillID = curSkill.GetEffect(0).GetEffectValue(1)
+    mark = curSkill.GetEffect(0).GetEffectValue(1)
+    theSkillID = mark if mark > 10 else 0
+    cleanCnt = mark if 0< mark <= 10 else 1
     if theSkillID:
         if curSkill.GetEffect(0).GetEffectValue(1):
             findBuff = SkillCommon.FindBuffByID(defender, theSkillID)
@@ -48,12 +48,13 @@
             findBuff = SkillCommon.FindBuffByOwner(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
         if findBuff:
             delSuccess = True
-            buffSkill = findBuff.GetSkill()
-            buffType = ChConfig.Def_SkillBuffList.get(buffSkill.GetSkillType())
     else:
         # 某类技能中的一个
-        delSuccess, buffSkill, buffType = ClearBySkillType(curSkill, defender, tick)
-    
+        for _ in range(cleanCnt):
+            delResult = ClearBySkillType(curSkill, defender, tick)
+            if delResult:
+                delSuccess = True
+
     if not delSuccess:
         # 没有可清除BUFF也进入CD
         return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
@@ -65,22 +66,14 @@
         #刷新玩家属性
         playerControl = PlayerControl.PlayerControl(defender)
         
-        if buffType == IPY_GameWorld.bfActionBuff:
-            playerControl.RefreshPlayerActionState()
-            if BuffSkill.CheckBuffRefresh(buffSkill, False):
-                playerControl.RefreshPlayerAttrByBuff()
-        else:
-            playerControl.RefreshPlayerAttrByBuff()
+        playerControl.RefreshPlayerActionState()
+        playerControl.RefreshPlayerAttrByBuff()
     #NPC
     elif curObjType == IPY_GameWorld.gotNPC:
         npcControl = NPCCommon.NPCControl(defender)
         
-        if buffType == IPY_GameWorld.bfActionBuff:
-            npcControl.RefreshNPCActionState()
-            if BuffSkill.CheckBuffRefresh(buffSkill, False):
-                npcControl.RefreshNPCAttrState()
-        else:
-            npcControl.RefreshNPCAttrState()
+        npcControl.RefreshNPCActionState()
+        npcControl.RefreshNPCAttrState()
         
     return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
 
@@ -97,8 +90,7 @@
         skillTypeList = [skillType]
     
     delSuccess = False
-    buffSkill = None
-    buffType = 0
+    
     for skillType in skillTypeList:
         
         buffType = ChConfig.Def_SkillBuffList.get(skillType)
@@ -123,5 +115,5 @@
         SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
         delSuccess = True
         break
-    return delSuccess, buffSkill, buffType
+    return delSuccess
     
\ No newline at end of file

--
Gitblit v1.8.0