| | |
| | | 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
|
| | |
| | | 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
|
| | |
| | | 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现身"/>
|