From 31e71a46a46221bf45144d03e8609241ed807a99 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期六, 25 八月 2018 17:09:41 +0800
Subject: [PATCH] fix:增加装备某非时效部位任务接口

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py |   16 ++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py               |    4 +++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py           |    5 +++++
 3 files changed, 24 insertions(+), 1 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 5c448a1..67c8b4f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1832,6 +1832,11 @@
     #宗门试炼兑换装备
     RunQuestEvent(curPlayer, "trialexange", costItemID, Def_RunQuestType_Normal)
     return
+
+def EventRespons_EquipByPlace(curPlayer, equipplace):
+    #穿戴某部位装备(非时效)
+    RunQuestEvent(curPlayer, "equipbyplace", equipplace, Def_RunQuestType_Normal)
+    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 b5ad849..adf6f77 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
@@ -1362,6 +1362,22 @@
     value = 1
     return QuestRunnerValue.GetEval(conditionType, value, conditionValue)
 
+##判断是否穿戴某部位(非时效)
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curConditionNode 节点信息
+# @return 返回值, 是否判断成功
+# @remarks <have_equip value="装备位"/>
+def ConditionType_Have_Equip(curPlayer, curMission, curConditionNode):
+    equipPlace = int(curConditionNode.GetAttribute("value"))
+    roleEquipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
+    curEquip = roleEquipPack.GetAt(equipPlace)
+    if curEquip.IsEmpty():
+        return False
+    if curEquip.GetEndureReduceType():
+        return False
+    return True
+    
 #---------------------------------------------------------------------
 ##增加家族相关值 
 # @param curPlayer 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index 395e52c..afd47db 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -93,6 +93,7 @@
     changeItemHoleCnt = 0#curItem.GetCanPlaceStoneCount()
     changeItemUseData = curItem.GetUserData()
     itemQuality = curItem.GetItemQuality()
+    endureReduceType = curItem.GetEndureReduceType()
     #changeItemIsHorse = (curItem.GetType() == ChConfig.Def_Item_Type_Horse)
     
     #执行换装动作
@@ -111,7 +112,8 @@
         #通知客户端交换物品
         curPlayer.ChangeEquip(changeItemID, equipPlace, changeItemStarLV, changeItemHoleCnt, changeItemStoneCnt, changeItemUseData)
         
-    
+    if not endureReduceType:
+        EventShell.EventRespons_EquipByPlace(curPlayer, equipPlace)
     #记录橙装、红装
     #===========================================================================
     # if itemQuality in [ChConfig.Def_Quality_Orange, ChConfig.Def_Quality_Red]:

--
Gitblit v1.8.0