From 8a5a4dc89554504aa6f106744498319b8ce4f2b8 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 20 三月 2019 10:53:39 +0800
Subject: [PATCH] 6381 【后端】【2.0】任务接口开发

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py       |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py                 |    3 ++-
 3 files changed, 50 insertions(+), 2 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 cea286d..bc3551c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1902,9 +1902,10 @@
     RunQuestEvent(curPlayer, "storedonate", "storedonate", Def_RunQuestType_Normal)
     return
 
-def EventRespons_EquipPlus(curPlayer):
+def EventRespons_EquipPlus(curPlayer, classLV, partPlusLV):
     #强化等级变化
     RunQuestEvent(curPlayer, "equipplus", "equipplus", Def_RunQuestType_Normal)
+    RunQuestEvent(curPlayer, "equipplus", '%s_%s'%(classLV, partPlusLV), Def_RunQuestType_Normal)
     return
 
 def EventRespons_EquipStar(curPlayer):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
index d2dfe21..c112a11 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
@@ -105,7 +105,7 @@
         DoLogic_OnEquipPartStarLVChange(curPlayer, packType, ItemCommon.GetItemClassLV(curEquip))
         # 增加强化成就
         PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_EquipPlus, 1)
-        EventShell.EventRespons_EquipPlus(curPlayer)
+        EventShell.EventRespons_EquipPlus(curPlayer, ipyData.GetClassLV(), updPartPlusLV)
     return
 
      
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 26d554e..3e1416d 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
@@ -6097,6 +6097,34 @@
     curMission.SetProperty(key, PlayerHorse.GetHorseSumLV(curPlayer))
     return
 
+##设置某阶达到强化等级的件数
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Pluslvpartcnt key="" id="" classLV="" plusLV=""/>
+def DoType_Set_Pluslvpartcnt(curPlayer, curMission, curActionNode):
+    key = curActionNode.GetAttribute("key")
+    questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+    if questID != 0:
+        curMission = curPlayer.FindMission(questID)
+    classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classLV"), 0)
+    if not classLV:
+        return
+    needPlusLV = GameWorld.ToIntDef(curActionNode.GetAttribute("plusLV"), 0)
+    totalCnt = 0
+    equipPlaceList = ChConfig.Pack_EquipPart_CanPlusStar[IPY_GameWorld.rptEquip]
+    for equipPlace in equipPlaceList:
+        ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
+        if not ipyData:
+            continue
+        partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
+        if partStarLV >= needPlusLV:
+            totalCnt += 1
+        
+    curMission.SetProperty(key, totalCnt)
+    return
+
 ##设置强化总等级
 # @param curPlayer 玩家实例
 # @param curMission 任务实例
@@ -7250,6 +7278,25 @@
     totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
     return ChEquip.GetTotalPlusLV(curPlayer, False) >= totalcnt
 
+##判断某阶强化等级达到X的件数是否达到
+# @param None
+# @return None <Classlvpluslv classLV="" plusLV="" value="cnt"/>
+def ConditionType_Classlvpluslv(curPlayer, curMission, curActionNode):
+    classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classLV"), 0)
+    if not classLV:
+        return
+    needPlusLV = GameWorld.ToIntDef(curActionNode.GetAttribute("plusLV"), 0)
+    totalCnt = 0
+    equipPlaceList = ChConfig.Pack_EquipPart_CanPlusStar[IPY_GameWorld.rptEquip]
+    for equipPlace in equipPlaceList:
+        ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
+        if not ipyData:
+            continue
+        partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
+        if partStarLV >= needPlusLV:
+            totalCnt += 1
+    return totalCnt >= GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+
 ##装备总星级
 # @param None
 # @return None <Equiptotalstar value="cnt"/>

--
Gitblit v1.8.0