From ea17d553e94c26615f1032f1ab70e83bb54cdfaf Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 29 四月 2019 21:12:58 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 灼烧
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/BuffProcess_1034.py | 4 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py | 20 ++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1303.py | 26 +++++---------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4533.py | 4 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 2 ++
5 files changed, 31 insertions(+), 25 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index dd01531..411a03e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3030,6 +3030,8 @@
#---SetDict 玩家字典KEY,不存于数据库---
# key的长度不能超过29个字节
+Def_PlayerKey_BurnOwnerID = "burnOwnerID" # 灼烧BUFF特殊处理,部分buff跟随灼烧消失
+Def_PlayerKey_SkillInDelBuff = "SkillInDelBuff" # buff中释放技能添加buff要特殊记录给后续处理,直接删除/添加会导致错乱
Def_PlayerKey_TheFBSkillsCD = "TheFBSkillsCD" # 减少指定技能组CD XX%
Def_PlayerKey_BurnValue = "BurnValue" # 灼烧固定伤害
Def_PlayerKey_BurnTimePer = "BurnTimePer" # 延长灼烧时间百分比
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 9ae4627..88f9e7d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -633,6 +633,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 +684,29 @@
buffState.DeleteBuffByIndex( index )
SkillShell.ClearBuffEffectBySkillID(curObj, curSkill.GetSkillID(), ownerID, ownerType)
+ addSkillID = curObj.GetDictByKey(ChConfig.Def_PlayerKey_SkillInDelBuff)
+ if addSkillID and addSkillID not in skillIDListInDelBuff:
+ skillIDListInDelBuff.append(addSkillID)
+
+ 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 skillID in skillIDListInDelBuff:
+ skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not skillData:
+ continue
+
+ SkillShell.Trigger_UseSkill(curObj, curObj, skillData, tick, posX, posY)
+ return
+
#---------------------------------------------------------------------
## 执行buff消失触发逻辑
# @param curObj 当前OBj
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/BuffProcess_1034.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/BuffProcess_1034.py
index 2f97d82..d8576ba 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/BuffProcess_1034.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/BuffProcess_1034.py
@@ -66,10 +66,10 @@
return
# 在防御者身上同时取消同一个释放者的相关buff
- defender.SetDict("burnOwnerID", curBuff.GetOwnerID())
+ defender.SetDict(ChConfig.Def_PlayerKey_BurnOwnerID, curBuff.GetOwnerID())
PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(defender, None, None, ChConfig.TriggerType_BurnDisappear)
- defender.SetDict("burnOwnerID", 0)
+ defender.SetDict(ChConfig.Def_PlayerKey_BurnOwnerID, 0)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1303.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1303.py
index 5b7939b..ed79ce9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1303.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1303.py
@@ -25,28 +25,12 @@
def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
if tick - curBuff.GetValue() < curSkill.GetLastTime():
+ # 非自然消失
return
if curEffect.GetEffectValue(1):
- if not GameObj.GetPyPlayerState(defender, pyPlayerState):
- return False
-
- boomValue = curBuff.GetValue()
- # 剩余护盾值用于爆炸
- if boomValue == 0:
- return
-
- boomValue = int(boomValue*float(curEffect.GetEffectValue(1))/ChConfig.Def_MaxRateValue)
- #效果值 第三个值为技能ID
- boomID = curEffect.GetEffectValue(2)
- skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)
- if not skillData:
- return
-
- # 存储起来用于伤害
- curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, boomValue)
-
- SkillShell.Trigger_UseSkill(curObj, None, skillData, tick, curObj.GetPosX(), curObj.GetPosY())
- curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)
-
+ if not GameObj.GetPyPlayerState(curObj, curEffect.GetEffectValue(1)):
+ return
+
+ curObj.SetDict(ChConfig.Def_PlayerKey_SkillInDelBuff, curEffect.GetEffectValue(0))
return
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4533.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4533.py
index 75175e5..17c96d1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4533.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4533.py
@@ -14,7 +14,7 @@
#---------------------------------------------------------------------
import GameWorld
import SkillCommon
-
+import ChConfig
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
@@ -31,7 +31,7 @@
buff = buffManager.FindBuff(curSkill.GetSkillTypeID())
if not buff:
return False
- if buff.GetOwnerID() != defender.GetDictByKey("burnOwnerID"):
+ if buff.GetOwnerID() != attacker.GetDictByKey(ChConfig.Def_PlayerKey_BurnOwnerID):
return False
buff.SetRemainTime(1) # 此处必须设置为1 无限时长的buff亦可消失
return True
--
Gitblit v1.8.0