From d8a8aa5c0df74e9c2b9a485695543d293cf9eb5a Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 21 五月 2019 11:36:14 +0800
Subject: [PATCH] 6844 【2.0】【后端】缥缈仙域优化(奇遇掉落)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 40 +++++++++++++++++++++++++---------------
1 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index e28c623..d5d041e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -2071,6 +2071,7 @@
#{
# tagHead Head;
# DWORD SkillTypeID; // 专精技能ID
+# BYTE DoType; // 0-激活升级 1-使用
#};
def OnSelectSkillElement(index, clientData, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
@@ -2088,26 +2089,36 @@
if not mainSkill:
GameWorld.DebugLog('主技能未学习,无法选专精mainSkillID=%s'%mainSkillID)
return
+ doType = clientData.DoType
curElementSkillID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementID % mainSkillID)
activeSkillLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementLV % selectSkillID)
- #先判断是否可升级
- updSelectSkillLV = activeSkillLV
- nextSkill = GameWorld.GetGameData().FindSkillByType(selectSkillID, activeSkillLV + 1)
- if nextSkill:
- if CheckLearnSkillNeedAttr(curPlayer, nextSkill):
- updSelectSkillLV = activeSkillLV + 1
- skillElementType = GetSkillElementType(nextSkill)
isChangeSkill = False #是否变更生效的技能
- if updSelectSkillLV != activeSkillLV:
+ updSelectSkillLV = activeSkillLV
+ #先判断是否可升级
+ if doType is 0:
+ nextSkill = GameWorld.GetGameData().FindSkillByType(selectSkillID, activeSkillLV + 1)
+ if not nextSkill:
+ return
+
+ if not CheckLearnSkillNeedAttr(curPlayer, nextSkill):
+ return
+ updSelectSkillLV = activeSkillLV + 1
+ skillElementType = GetSkillElementType(nextSkill)
+
#可升级则激活升一级
EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, skillElementType, updSelectSkillLV)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SkillElementLV % selectSkillID, updSelectSkillLV)
- if curElementSkillID == selectSkillID:
+ if not curElementSkillID or curElementSkillID == selectSkillID:
#正在使用的专精技能,则立即生效
isChangeSkill = True
- elif selectSkillID != curElementSkillID:
+ else: # 使用
+ if not activeSkillLV:
+ #未激活不能使用
+ return
+ if selectSkillID == curElementSkillID:
+ return
isChangeSkill = True
-
+
if isChangeSkill:
#更换专精
if not RefreshElementSkill(curPlayer, selectSkillID)[1]:
@@ -2115,10 +2126,9 @@
return
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SkillElementID % mainSkillID, selectSkillID)
- if curElementSkillID:
- if curElementSkillID != selectSkillID:
- #原技能删除
- skillManager.DeleteSkillBySkillTypeID(curElementSkillID)
+ if curElementSkillID and curElementSkillID != selectSkillID:
+ #原技能删除
+ skillManager.DeleteSkillBySkillTypeID(curElementSkillID)
# 重刷被动技能
--
Gitblit v1.8.0