From 5a027b7b71bc1b3044942f7d2b98ccbdd7d776bc Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 24 五月 2019 10:46:35 +0800
Subject: [PATCH] 6351 骑宠boss击杀状态修改
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 48 ++++++++++++++++++++++++++++--------------------
1 files changed, 28 insertions(+), 20 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..44493b4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -126,11 +126,9 @@
#技能攻击最大数量
hurtCount = SkillCommon.GetSkillArea_Atk_Count(curPlayer, curSkill)
- #===========================================================================
- # if len(hurtList) > hurtCount:
- # # 客户端目标过多
- # return False
- #===========================================================================
+ if len(hurtList) > hurtCount:
+ # 客户端目标过多
+ return False
# mapType = GameWorld.GetMap().GetMapFBType()
# 野外小怪或者其他指定的怪为了更及时的打击感,由客户端计算
@@ -2071,6 +2069,7 @@
#{
# tagHead Head;
# DWORD SkillTypeID; // 专精技能ID
+# BYTE DoType; // 0-激活升级 1-使用
#};
def OnSelectSkillElement(index, clientData, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
@@ -2088,26 +2087,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 +2124,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