| | |
| | | import ChEquip
|
| | | import PlayerActivity
|
| | | import PlayerSuccess
|
| | | import EventReport
|
| | | #import PlayerCostVIP
|
| | | import GameFuncComm
|
| | | import IpyGameDataPY
|
| | | import ShopItemManage
|
| | | import PlayerPet
|
| | | import PlayerArrestTask
|
| | | import PlayerMagicWeapon
|
| | |
| | | import PlayerActLogin
|
| | | import PlayerHorse
|
| | | import FBCommon
|
| | | import PyGameData
|
| | |
|
| | | import math
|
| | | import time
|
| | |
| | | return False
|
| | | return petPack.GetCount() > 0
|
| | | return PlayerPet.GetPetDataItemByNPCID(curPlayer, checkPetID) != None
|
| | |
|
| | | def ConditionType_Is_Buy_Tehuiitem(curPlayer, curMission, curConditionNode):
|
| | | # 判断是否购买过特惠商店物品
|
| | | # <Is_Buy_Tehuiitem shopID="1007" itemShopIndex="0,1,2"/> shopID暂定需指定商店ID, itemShopIndex可指定多个索引, 中间英文逗号隔开
|
| | | shopID = GameWorld.ToIntDef(curConditionNode.GetAttribute("shopID"), 0)
|
| | | if not shopID:
|
| | | return False
|
| | | indexList = []
|
| | | indexInfo = curConditionNode.GetAttribute("itemShopIndex")
|
| | | if indexInfo != '':
|
| | | indexList = eval('[' + indexInfo + ']')
|
| | | if not indexList:
|
| | | shopItemList = ShopItemManage.GetShopItemList(shopID)
|
| | | indexList = range(len(shopItemList))
|
| | | if not indexList:
|
| | | GameWorld.DebugLog("需指定判断的特惠商店物品索引编号!indexInfo=%s" % indexInfo)
|
| | | return False
|
| | | for i in indexList:
|
| | | buyCnt = ShopItemManage.__GetPlayerShopItemBuyCnt(curPlayer, shopID, i)
|
| | | if buyCnt > 0:
|
| | | return True
|
| | | return False
|
| | |
|
| | | ##竞技场是否达到多少名
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode 节点信息
|
| | | # @return 返回值, 是否判断成功
|
| | | # @remarks <Check_Jjcorder type="类型" value="值"/> |
| | | def ConditionType_Check_Jjcorder(curPlayer, curMission, curConditionNode):
|
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | maxOrder = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HighLadder_HistoryMaxOrder, 0,
|
| | | ChConfig.Def_PDictType_Default)
|
| | | |
| | | return QuestRunnerValue.GetEval(conditionType, maxOrder, conditionValue)
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##执行 扣除玩家镖车押金
|
| | |
| | | randStarList = eval(ReadChConfig.GetChConfig('RunAround_Star'))
|
| | | aroundStar = GameWorld.GetResultByRandomList(randStarList, 1)
|
| | |
|
| | | #vipStar = PlayerCostVIP.GetRoundStar(curPlayer)
|
| | | vipStar = 0
|
| | | if vipStar > 0:
|
| | | aroundStar = vipStar
|
| | |
| | | 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 任务实例
|
| | |
| | | mwid = GameWorld.ToIntDef(curConditionNode.GetAttribute("mwid"), 0)
|
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | return PlayerMagicWeapon.GetIsActiveMagicWeapon(curPlayer, mwid, conditionValue)
|
| | |
|
| | | ##判断魔族法宝通关关卡
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curConditionNode节点信息 |
| | | # @return 返回值, 是否通过检查
|
| | | # @remarks <Check_Magicweapon_Passfblv" mwid="法宝ID" value="期望值" /> |
| | | def ConditionType_Check_Magicweapon_Passfblv(curPlayer, curMission, curConditionNode):
|
| | | mwid = GameWorld.ToIntDef(curConditionNode.GetAttribute("mwid"), 0)
|
| | | conditionValue = GameWorld.ToIntDef(curConditionNode.GetAttribute("value"), 0)
|
| | | fbpasslv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % mwid)
|
| | | return fbpasslv >= conditionValue
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##是否拥有足够的竞技点
|
| | |
| | | realmlv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return curPlayer.GetOfficialRank() >= realmlv
|
| | |
|
| | | ##法宝之魂是否激活
|
| | | # @param None
|
| | | # @return None <Mwsoul value="id"/>
|
| | | def ConditionType_Mwsoul(curPlayer, curMission, curActionNode):
|
| | | soulID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return bool(PlayerMagicWeapon.GetIsActiveMWSoul(curPlayer, soulID))
|
| | |
|
| | | ##X级通关X层娲皇遗迹
|
| | | # @param None
|
| | |
| | | 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"/>
|
| | |
| | | def DoType_Active_Magicweapon(curPlayer, curMission, curActionNode):
|
| | | mwID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | PlayerMagicWeapon.DoActiveMW(curPlayer, mwID)
|
| | | PlayerMagicWeapon.NotifyMagicWeapon(curPlayer)
|
| | | |
| | | return
|
| | |
|
| | | ## 人物隐身 <Visible id="0隐身1现身"/>
|