From 5be8f0f08671591fcc9adff29a307cdbb0d3d22a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 29 九月 2018 00:35:18 +0800
Subject: [PATCH] 3428 子 【开发】神兽技能 / 【后端】神兽技能 -- 优化可叠加的同技能配置,高级技能叠加问题
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py | 12 ++++++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py | 21 +++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 3 ++-
4 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index e05a9b9..825f0f3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -1227,7 +1227,7 @@
) = range( 0, Def_AutoAtkSkillType )
#技能类型
-Def_SkillType_Count = 23
+Def_SkillType_Count = 24
(
Def_SkillType_Special , #特殊技能 0
Def_SkillType_Atk , #攻击类 1
@@ -1252,6 +1252,7 @@
Def_SkillType_AttrSkill, # 属性类技能 20
Def_SkillType_PassiveLstPlsBuff, #被动触发持续增益类buff 21
Def_SkillType_PassiveLstDepBuff, #被动触发持续减益类buff 22
+ Def_SkillType_AttrSkillNoLearn, # 可叠加的同类型ID属性类技能 不可学习 算属性直接取表 目前用于神兽技能 23
) = range( 0, Def_SkillType_Count )
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
index 102814b..cd9df55 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDogz.py
@@ -564,6 +564,7 @@
PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_DogzBattleSkill, skillAttrList)
return
+
# 助战神兽技能属性,必须在 SetDogzIsHelpFight后调用
def CalcDogzBattleSkillAttr(curPlayer):
skillAttrList = [{} for _ in range(4)]
@@ -585,6 +586,26 @@
curEffect = curSkill.GetEffect(effectIndex)
SkillShell.CalcBuffEffAttr(curPlayer, curEffect, skillAttrList)
+ # Def_SkillType_AttrSkillNoLearn 非学习属性技能 叠加属性计算
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for i in xrange(ipyDataMgr.GetDogzCount()):
+ ipyData = ipyDataMgr.GetDogzByIndex(i)
+ if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_DogzFightState, i):
+ #未助战
+ continue
+
+ for skillID in ipyData.GetHelpBattleSkills():
+
+ skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not skillData:
+ continue
+ # 同技能类型ID可多个叠加的属性时直接取表
+ if skillData.GetSkillType() != ChConfig.Def_SkillType_AttrSkillNoLearn:
+ continue
+
+ for effectIndex in xrange(skillData.GetEffectCount()):
+ curEffect = skillData.GetEffect(effectIndex)
+ SkillShell.CalcBuffEffAttr(curPlayer, curEffect, skillAttrList)
#GameWorld.DebugLog("神兽技能属性: skillFPEx=%s, %s" % ( skillFPEx, skillAttrList))
return skillAttrList
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
index 80f0873..4ba8b52 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
@@ -922,7 +922,7 @@
# 此时由服务端重新找一次挂机NPC
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_TJGNPC, npcID)
- GameWorld.DebugLog("弥补脱机----npcid %s-%s-%s"%(
+ GameWorld.DebugLog("弥补脱机----playerID:%s ,npcid %s-%s-%s"%(curPlayer.GetID(),
curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_TJGNPC), times,
curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
index 3955c86..4099682 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -1135,21 +1135,25 @@
if curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_Dogz:
continue
skillID = curSkill.GetSkillID()
- if skillID in dogzSkills:
- dogzSkills.remove(skillID)
- continue
delDogzSkills.append(skillID)
GameWorld.DebugLog("PlayerDogzSkill:%s - 删除%s"%(dogzSkills, delDogzSkills))
- # 删除非助战技能
+ # 删除神兽技能
for skillID in delDogzSkills:
skillManager.DeleteSkillBySkillID(skillID, False)
# 添加助战技能,同类技能取最高
dogzSkills.sort()
for skillID in dogzSkills:
+ skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+ if not skillData:
+ continue
+ if skillData.GetSkillType() == ChConfig.Def_SkillType_AttrSkillNoLearn:
+ # 同技能可多个叠加的技能不能学,算属性时直接取表
+ continue
+
skillManager.LearnSkillByID(skillID, False)
# 刷被动效果
--
Gitblit v1.8.0