From 3ea80a39cf950e4dd7f65f44b3487b6787f45f4a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 14 五月 2019 20:46:11 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py |   10 ++++++----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py           |   13 +++++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MissionXML.py     |    4 ++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py           |    6 +++---
 4 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
index a6ed4ea..604f7a8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1914,9 +1914,9 @@
     RunQuestEvent(curPlayer, "thinkfabao", 'thinkfabao', Def_RunQuestType_Normal)
     return
 
-def EventRespons_ElementSkill(curPlayer, mainSkillID, updSelectSkillLV):
-    #激活五行专精 主技能ID_激活等级.xml
-    RunQuestEvent(curPlayer, "elementskill", '%s_%s'%(mainSkillID, updSelectSkillLV), Def_RunQuestType_Normal)
+def EventRespons_ElementSkill(curPlayer, mainSkillID, skillElementType, updSelectSkillLV):
+    #激活五行专精 主技能ID_专精类型_激活等级.xml
+    RunQuestEvent(curPlayer, "elementskill", '%s_%s_%s'%(mainSkillID, skillElementType, updSelectSkillLV), Def_RunQuestType_Normal)
     return
 
 def EventRespons_EquipStarUp(curPlayer):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 947d3a0..62ce360 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -7094,20 +7094,21 @@
 
 ##某主技能对应专精技能达到激活X等级的数量是否达到
 # @param None
-# @return None <Elementskillcnt value="cnt" mainskill="[]" activelv=""/>
+# @return None <Elementskillcnt value="cnt" mainskill="[]" activelv="" elementtype="专精类型"/>
 def ConditionType_Elementskillcnt(curPlayer, curMission, curActionNode):
     cnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
     mainskill = curActionNode.GetAttribute("mainskill")
     mainSkillIDList = eval(mainskill) if mainskill else []
     activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
-    return SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV) >= cnt
+    elementType = GameWorld.ToIntDef(curActionNode.GetAttribute("elementtype"), 0)
+    return SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType) >= cnt
 
 ##设置已选择的专精技能数量
 # @param curPlayer 玩家实例
 # @param curMission 任务实例
 # @param curActionNode节点信息
 # @return 返回值无意义
-# @remarks <Set_Elementskillcnt key="" mainskill="[]" activelv=""/>
+# @remarks <Set_Elementskillcnt key="" mainskill="[]" activelv="" elementtype="专精类型"/>
 def DoType_Set_Elementskillcnt(curPlayer, curMission, curActionNode):
     key = curActionNode.GetAttribute("key")
     questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
@@ -7116,7 +7117,8 @@
     activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
     if questID != 0:
         curMission = curPlayer.FindMission(questID)
-    curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV))
+    elementType = GameWorld.ToIntDef(curActionNode.GetAttribute("elementtype"), 0)
+    curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType))
     return
 
 ##设置符合条件的已穿基础装备数量
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MissionXML.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MissionXML.py
index da55be7..56b200d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MissionXML.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MissionXML.py
@@ -65,9 +65,9 @@
         nodeName = node.GetNodeName().title()
         if nodeName in ["Xml", "Actions", "Light", "Answer_Conditions", "Answer_Actions"]:
             continue
-        GameWorld.DebugLog("DoAction: %s" % node.GetXML())
+        #GameWorld.DebugLog("DoAction: %s" % node.GetXML())
         QuestRunner.DoAction(curPlayer, curMission, node)
-        
+        #QuestRunner.AnswerConditionJudge(curPlayer, curMission, node)
     return
 
     
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 ca70991..1b2f8a6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -2060,6 +2060,8 @@
 
 ## 获取技能升级属性需求 rutrun attrID, attrvalue
 def GetSkillUpNeedAttr(stateSkillLV):return stateSkillLV /100000, stateSkillLV%100000
+## 获取技能专精类型
+def GetSkillElementType(curSkill): return curSkill.GetStateSkillLV() /100000
 
 #// A5 16 选择技能五行专精 #tagCMSelectSkillElement
 #
@@ -2092,10 +2094,11 @@
     if nextSkill:
         if CheckLearnSkillNeedAttr(curPlayer, nextSkill):
             updSelectSkillLV = activeSkillLV + 1
+            skillElementType = GetSkillElementType(nextSkill)
     isChangeSkill = False #是否变更生效的技能
     if updSelectSkillLV != activeSkillLV:
         #可升级则激活升一级
-        EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, updSelectSkillLV)
+        EventShell.EventRespons_ElementSkill(curPlayer, mainSkillID, skillElementType, updSelectSkillLV)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SkillElementLV % selectSkillID, updSelectSkillLV)
         if curElementSkillID == selectSkillID:
             #正在使用的专精技能,则立即生效
@@ -2209,8 +2212,10 @@
     NotifyElementSkillInfo(curPlayer)
     return
 
-def GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV):
+def GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType=0):
     ##获取已选择的专精技能数量
+    # @param elementType: 专精类型,对应灵根ID
+    gameData = GameWorld.GetGameData()
     cnt = 0
     skillManager = curPlayer.GetSkillManager()
     for i in xrange(skillManager.GetSkillCount()):
@@ -2223,6 +2228,10 @@
             continue
         for ipyData in ipyDataList:
             elementSkillID = ipyData.GetElementSkillID()
+            if elementType:
+                elementSkillData = gameData.GetSkillBySkillID(elementSkillID)
+                if GetSkillElementType(elementSkillData) != elementType:
+                    continue
             curActiveLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementLV % elementSkillID)
             if curActiveLV >= activeLV:
                 cnt += 1

--
Gitblit v1.8.0