From acb8a30b1ced26763bfbb3b910e1a3522622652d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 20 六月 2019 22:43:53 +0800
Subject: [PATCH] 860312 烈焰战神 特殊特效 8 新增 经验飘字

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py |   79 +++++++++++++++++++++++----------------
 1 files changed, 47 insertions(+), 32 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 fde565d..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
@@ -35,6 +35,49 @@
         #清除失败也触发CD
         return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
     
+    delSuccess = False
+    
+    # 优先清理指定技能
+    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)
+        else:
+            findBuff = SkillCommon.FindBuffByOwner(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
+        if findBuff:
+            delSuccess = True
+    else:
+        # 某类技能中的一个
+        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)
+    
+    #刷新属性
+    curObjType = defender.GetGameObjType()
+    #玩家
+    if curObjType == IPY_GameWorld.gotPlayer:
+        #刷新玩家属性
+        playerControl = PlayerControl.PlayerControl(defender)
+        
+        playerControl.RefreshPlayerActionState()
+        playerControl.RefreshPlayerAttrByBuff()
+    #NPC
+    elif curObjType == IPY_GameWorld.gotNPC:
+        npcControl = NPCCommon.NPCControl(defender)
+        
+        npcControl.RefreshNPCActionState()
+        npcControl.RefreshNPCAttrState()
+        
+    return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
+
+def ClearBySkillType(curSkill, defender, tick):
     skillType = curSkill.GetEffect(0).GetEffectValue(0)
     if skillType == 0:
         # 无配置代表清除负面buff任意1个
@@ -63,42 +106,14 @@
         ownerID, ownerType = curBuff.GetOwnerID(), curBuff.GetOwnerType()
         
         #删除Buff
-        BuffSkill.DoBuffDisApper(defender, curBuff, tick)
+        BuffSkill.DoBuffDisApperEx(defender, curBuff, tick)
         buffSkill = curBuff.GetSkill()
+        if not buffSkill:
+            continue
         skillID = buffSkill.GetSkillID()
         buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID())
         SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
         delSuccess = True
         break
-    
-    if not delSuccess:
-        # 没有可清除BUFF也进入CD
-        return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
-    
-    #刷新属性
-    curObjType = defender.GetGameObjType()
-    #玩家
-    if curObjType == IPY_GameWorld.gotPlayer:
-        #刷新玩家属性
-        playerControl = PlayerControl.PlayerControl(defender)
-        
-        if buffType == IPY_GameWorld.bfActionBuff:
-            playerControl.RefreshPlayerActionState()
-            if BuffSkill.CheckBuffRefresh(buffSkill, False):
-                playerControl.RefreshPlayerAttrByBuff()
-        else:
-            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()
-        
-    return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
-
+    return delSuccess
     
\ No newline at end of file

--
Gitblit v1.8.0