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 |   48 ++++++++++++++++++++++++++++++------------------
 1 files changed, 30 insertions(+), 18 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 0fe4931..d5d041e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -126,9 +126,11 @@
     
     #技能攻击最大数量
     hurtCount = SkillCommon.GetSkillArea_Atk_Count(curPlayer, curSkill)
-    if len(hurtList) > hurtCount:
-        # 客户端目标过多
-        return False
+    #===========================================================================
+    # if len(hurtList) > hurtCount:
+    #    # 客户端目标过多
+    #    return False
+    #===========================================================================
     
 #    mapType = GameWorld.GetMap().GetMapFBType()
     # 野外小怪或者其他指定的怪为了更及时的打击感,由客户端计算
@@ -2069,6 +2071,7 @@
 #{
 #    tagHead        Head;
 #    DWORD    SkillTypeID;    // 专精技能ID
+#    BYTE    DoType;    // 0-激活升级 1-使用
 #};
 def OnSelectSkillElement(index, clientData, tick):
     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
@@ -2086,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]:
@@ -2113,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