From 5f507dd6b2d8a41922e45751e217cfe835b78203 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 30 八月 2018 16:25:13 +0800
Subject: [PATCH] Fix: 修复封魔坛刷怪报错;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

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 62699e6..efcba16 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 玩家实例
@@ -1935,12 +1951,12 @@
     itemID = GameWorld.ToIntDef(curConditionNode.GetAttribute("itemID"), 0)
     if maxItemCnt and itemID: #未收集的道具个数乘以单价
         haveCnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemID)
-        conditionValue = max(0, maxItemCnt-haveCnt)*value
+        conditionValue = max(0, maxItemCnt-haveCnt)*conditionValue
         
     conditionType = curConditionNode.GetAttribute("type")
     moneyType = int(curConditionNode.GetAttribute("moneytype"))
     
-    
+    #GameWorld.Log('    conditionValue=%s,maxItemCnt=%s,itemID=%s'%(conditionValue,maxItemCnt,itemID))
     
     goldValue = curPlayer.GetGold()
     goldPaperValue = curPlayer.GetGoldPaper()
@@ -6043,7 +6059,7 @@
 # @remarks <Set_Horsetotallv key="" />
 def DoType_Set_Horsetotallv(curPlayer, curMission, curActionNode):
     key = curActionNode.GetAttribute("key")
-    questID = GameWorld.ToIntDef(curMission.GetProperty("id"), 0)
+    questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
     if questID != 0:
         curMission = curPlayer.FindMission(questID)
     curMission.SetProperty(key, PlayerHorse.GetHorseSumLV(curPlayer))
@@ -7142,14 +7158,14 @@
     soulID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
     return bool(PlayerMagicWeapon.GetIsActiveMWSoul(curPlayer, soulID))
 
-##S级通关X层娲皇遗迹
+##X级通关X层娲皇遗迹
 # @param None
-# @return None <Passqueenrelecs value="lineID"/>
+# @return None <Passqueenrelecs value="lineID" grade="grade"/>
 def ConditionType_Passqueenrelecs(curPlayer, curMission, curActionNode):
     lineID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
     grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [ChConfig.Def_FBMapID_QueenRelics])
-    maxGrade = len(FBCommon.GetFBLineGrade(ChConfig.Def_FBMapID_QueenRelics, lineID))
-    return grade >=maxGrade
+    needGrade = GameWorld.ToIntDef(curActionNode.GetAttribute("grade"), 0)
+    return grade >=needGrade
 
 ##坐骑总等级
 # @param None
@@ -7170,7 +7186,7 @@
         for i in equipIndexList:
             suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
             for suiteType, lv in suiteInfo.items():
-                if lv >= 2 and groupType == 1 and suiteType == 2:
+                if lv >= 2 and int(groupType) == 1 and suiteType == 2:
                     groupCnt +=1
     return groupCnt >= needCnt
 

--
Gitblit v1.8.0