From 6fcf3513ccde191e067c8dfd8279cccedf95eb77 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 17 五月 2019 19:22:25 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 新版
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 40 +++++++++++++++++++++++++++++++++++++---
1 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
index 76cd193..cd6970a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -25,6 +25,7 @@
import OperControlManager
import GameObj
import CrossPlayerData
+import AttackCommon
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -51,6 +52,8 @@
and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss:
# 释放后 对指定BOSS无效的技能
return True
+
+ buffOwner = AttackCommon.ElfChangeAttacker(buffOwner) # Elf灵为替身攻击,要取玩家的属性
result = AddBuffNoRefreshState(curObj, buffType, curSkill, tick, addBuffValueList, buffOwner, addForce)
@@ -184,7 +187,7 @@
if buffCoexistType == ChConfig.Def_Buff_Coexist and buffOwner:
#可同时存在的buff,判断释放者是否不一样
- if buffSkill.GetOwnerID() != buffOwner.GetID() or buffSkill.GetOwnerType() != buffOwner.GetGameObjType():
+ if curBuff.GetOwnerID() != buffOwner.GetID() or curBuff.GetOwnerType() != buffOwner.GetGameObjType():
continue
#--------------技能类型ID相同
@@ -378,7 +381,7 @@
if triggerType == -1:
continue
passiveEff = PassiveBuffEffMng.GetPassiveEffManager().InitObjPassiveEff(curObj)
- passiveEff.AddBuffInfoByEffect(curEffect, skillID)
+ passiveEff.AddBuffInfoByEffect(curEffect, skillID, onwerID, onwerType)
#添加BUFF后的特殊处理
@@ -408,7 +411,11 @@
#触发被动技能
if buffOwner:
PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddBuffOver, tick)
-
+ # 此处不能传技能curSkill 屏蔽被动触发被动限制
+ # 暂且特殊处理控制类buff才触发
+ if SkillCommon.GetBuffType(curSkill) == IPY_GameWorld.bfActionBuff:
+ PassiveBuffEffMng.OnPassiveBuffTrigger(curObj, buffOwner, None, ChConfig.TriggerType_AddBuffOver, tick)
+
#是否是持续性技能
isLstSkill = curSkill.GetSkillType() in ChConfig.Def_LstBuff_List
@@ -568,6 +575,8 @@
return curBuff, i
return None, 0
+
+
#---------------------------------------------------------------------
## 刷新BUFF的时间
# @param curBuff 当前BUFF
@@ -633,6 +642,9 @@
index = 0
isPlayerTJG = (curObj.GetGameObjType() == IPY_GameWorld.gotPlayer and PlayerTJG.GetIsTJG(curObj))
+
+ skillIDListInDelBuff = [] # buff消失中需要处理添加buff,外层处理避免错乱
+
while index < buffState.GetBuffCount():
curBuff = buffState.GetBuff( index )
if not curBuff:
@@ -681,12 +693,34 @@
buffState.DeleteBuffByIndex( index )
SkillShell.ClearBuffEffectBySkillID(curObj, curSkill.GetSkillID(), ownerID, ownerType)
+ addSkillID = curObj.GetDictByKey(ChConfig.Def_PlayerKey_SkillInDelBuff)
+ if addSkillID:
+ skillInfo = [addSkillID, ownerID, ownerType]
+ if skillInfo not in skillIDListInDelBuff:
+ skillIDListInDelBuff.append(skillInfo)
+
+ OnSkillAfterBuffDisappear(curObj, skillIDListInDelBuff, tick)
+
#执行DoBuffDisApper中,标记的玩家处理要求
__DoBuffDisApperByKey( curObj , tick )
return isRefresh, delResult
+# DoBuffDisApper不能做Buff添加和删除逻辑!!!!!不然指针会错乱, 故在外层处理
+def OnSkillAfterBuffDisappear(curObj, skillIDListInDelBuff, tick):
+ posX, posY = curObj.GetPosX(), curObj.GetPosY()
+ for skillInfo in skillIDListInDelBuff:
+ attacker = GameWorld.GetObj(skillInfo[1], skillInfo[2])
+ if not attacker:
+ attacker = curObj
+ skillData = GameWorld.GetGameData().GetSkillBySkillID(skillInfo[0])
+ if not skillData:
+ continue
+
+ SkillShell.Trigger_UseSkill(attacker, curObj, skillData, tick, posX, posY)
+ return
+
#---------------------------------------------------------------------
## 执行buff消失触发逻辑
# @param curObj 当前OBj
--
Gitblit v1.8.0