From 2e677ecbfa2408d951e25bcadb22123e0375233c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 三月 2021 14:53:55 +0800
Subject: [PATCH] 8848 【主干】【BT2】【后端】所有活动中,不能配置活动开启等级的,补充该配置(每日礼包AA25、充值返利AA27、累计充值返利仙玉AA29、成长必买AA31、节日登录AA42、节日祝福AA43、节日游历AA46);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py | 82 +++++++++++++++++++++++++----------------
1 files changed, 50 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 165c6f0..cfce1bf 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
@@ -30,11 +30,59 @@
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
if not defender:
return
-
if not GameWorld.CanHappen(curSkill.GetHappenRate(), ChConfig.Def_MaxRateValue):
#清除失败也触发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 not curSkill.GetEffect(0).GetEffectValue(2):
+ findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByID(defender, theSkillID)
+ else:
+ findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByOwnerEx(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
+ if findBuff:
+ ownerID, ownerType = findBuff.GetOwnerID(), findBuff.GetOwnerType()
+
+ #删除Buff
+ BuffSkill.DoBuffDisApperEx(defender, findBuff, tick)
+ skillID = buffSkill.GetSkillID()
+ buffManager.DeleteBuffByTypeID(buffSkill.GetSkillTypeID())
+ SkillShell.ClearBuffEffectBySkillID(defender, skillID, ownerID, ownerType)
+ 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个
@@ -72,35 +120,5 @@
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