From 59f7d8df0f2fe1b60342826b5e76203f732fda72 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 01 三月 2021 10:47:41 +0800
Subject: [PATCH] 4906 【主干】【BT】【BT2】【BTZF】【gt_1.100.4】跨服地图报错查看(防范通知buff报错,调整通知顺序,验证对象属性);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_30.py | 51 ++++++++++++++++++++++++---------------------------
1 files changed, 24 insertions(+), 27 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..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,30 +30,36 @@
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
- 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)
+ if not curSkill.GetEffect(0).GetEffectValue(2):
+ findBuff, buffManager, buffType, buffSkill = SkillCommon.FindBuffByID(defender, theSkillID)
else:
- findBuff = SkillCommon.FindBuffByOwner(defender, theSkillID, attacker.GetID(), attacker.GetGameObjType())
+ 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
- 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 +71,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 +95,7 @@
skillTypeList = [skillType]
delSuccess = False
- buffSkill = None
- buffType = 0
+
for skillType in skillTypeList:
buffType = ChConfig.Def_SkillBuffList.get(skillType)
@@ -123,5 +120,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