| | |
| | | expPoint = curMission.GetProperty(Def_Run_Around_Reward_ExpPoint)
|
| | | exp = expPoint * ChConfig.Def_PerPointValue + exp
|
| | | money = curMission.GetProperty(Def_Run_Around_Reward_Money)
|
| | | |
| | | moneyDict = {}
|
| | | if exp != 0:
|
| | | playerControl.AddExp(exp)
|
| | | #PlayerControl.NotifyCode(curPlayer, 'GeRen_lhs_0', [exp])
|
| | | |
| | | addDataDict = {ChConfig.Def_Give_Reason_SonKey:"Run"}
|
| | | PlayerControl.GiveMoney(curPlayer, runAroundReward.MoneyType, money, ChConfig.Def_GiveMoney_Mission, addDataDict, False)
|
| | | |
| | | if money:
|
| | | addDataDict = {ChConfig.Def_Give_Reason_SonKey:"Run"}
|
| | | PlayerControl.GiveMoney(curPlayer, runAroundReward.MoneyType, money, ChConfig.Def_GiveMoney_Mission, addDataDict, False)
|
| | | moneyDict[runAroundReward.MoneyType] = money
|
| | | familyHornor = curMission.GetProperty(Def_Run_Around_Reward_FamilyHornor)
|
| | | if familyHornor:
|
| | | PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, familyHornor, True, ShareDefine.Def_AddFAVReason_DoFamilyMisson, True)
|
| | |
|
| | | moneyDict[ShareDefine.TYPE_Price_Family_Contribution] = familyHornor
|
| | | item_id = curMission.GetProperty(Def_Day_Event_Reward_Item_Id)
|
| | | item_count = curMission.GetProperty(Def_Day_Event_Reward_Item_Count)
|
| | |
|
| | |
| | | GameWorld.DebugLog("任务:%d 获得经验:%d,钱=%s,物品ID=%s,物品数量=%s"
|
| | | % (curMission.GetMissionID(), exp, money, item_id, item_count))
|
| | |
|
| | | FBLogic.DoFB_OnFinishRunAroundTask(curPlayer, curMissionID, exp, {runAroundReward.MoneyType:money}, itemInfo)
|
| | | FBLogic.DoFB_OnFinishRunAroundTask(curPlayer, curMissionID, exp, moneyDict, itemInfo)
|
| | |
|
| | | #触发OSS记录
|
| | | if GameWorld.IsMissonDR(curPlayer):
|
| | |
| | | realmlv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return curPlayer.GetOfficialRank() >= realmlv
|
| | |
|
| | | ##灵根品级是否达到X级
|
| | | # @param None
|
| | | # @return None <Linggenqualitylv attrid="灵根ID" value="期望等级"/>
|
| | | def ConditionType_Linggenqualitylv(curPlayer, curMission, curActionNode):
|
| | | attrID = GameWorld.ToIntDef(curActionNode.GetAttribute("attrid"), 0)
|
| | | qualityLV = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | funcDict = {ShareDefine.Def_Effect_Metal:lambda curObj:PlayerControl.GetMetalQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Wood:lambda curObj:PlayerControl.GetWoodQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Water:lambda curObj:PlayerControl.GetWaterQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Fire:lambda curObj:PlayerControl.GetFireQualityLV(curObj),
|
| | | ShareDefine.Def_Effect_Earth:lambda curObj:PlayerControl.GetEarthQualityLV(curObj),
|
| | | }
|
| | | curQualityLV = 0
|
| | | if attrID in funcDict:
|
| | | curQualityLV = funcDict[attrID](curPlayer)
|
| | | return curQualityLV >= qualityLV
|
| | |
|
| | | ##X级通关X层娲皇遗迹
|
| | | # @param None
|
| | |
| | |
|
| | | ##某主技能对应专精技能达到激活X等级的数量是否达到
|
| | | # @param None
|
| | | # @return None <Elementskillcnt value="cnt" mainskill="[]" activelv=""/>
|
| | | # @return None <Elementskillcnt value="cnt" mainskill="[]" activelv="" elementtype="专精类型"/>
|
| | | def ConditionType_Elementskillcnt(curPlayer, curMission, curActionNode):
|
| | | cnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | mainskill = curActionNode.GetAttribute("mainskill")
|
| | | mainSkillIDList = eval(mainskill) if mainskill else []
|
| | | activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
|
| | | return SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV) >= cnt
|
| | | elementType = GameWorld.ToIntDef(curActionNode.GetAttribute("elementtype"), 0)
|
| | | return SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType) >= cnt
|
| | |
|
| | | ##设置已选择的专精技能数量
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Elementskillcnt key="" mainskill="[]" activelv=""/>
|
| | | # @remarks <Set_Elementskillcnt key="" mainskill="[]" activelv="" elementtype="专精类型"/>
|
| | | def DoType_Set_Elementskillcnt(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | |
| | | activeLV = GameWorld.ToIntDef(curActionNode.GetAttribute("activelv"), 1)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV))
|
| | | elementType = GameWorld.ToIntDef(curActionNode.GetAttribute("elementtype"), 0)
|
| | | curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer, mainSkillIDList, activeLV, elementType))
|
| | | return
|
| | |
|
| | | ##设置符合条件的已穿基础装备数量
|
| | |
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, haveCnt)
|
| | | return
|
| | | def __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList):
|
| | | def __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList, needCnt=0):
|
| | | #classLV 为0代表任意阶
|
| | | haveCnt = 0
|
| | | equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
|
| | |
| | | if suiteIDList and curEquip.GetSuiteID() not in suiteIDList:
|
| | | continue
|
| | | haveCnt += 1
|
| | | if needCnt and haveCnt >= needCnt:
|
| | | break
|
| | | return haveCnt
|
| | |
|
| | | ##判断符合条件的已穿基础装备数量
|
| | |
| | | color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
|
| | | suite = curActionNode.GetAttribute("suite")
|
| | | suiteIDList = eval(suite) if suite else []
|
| | | haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList)
|
| | | haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList, totalcnt)
|
| | | return haveCnt >= totalcnt
|
| | |
|
| | | ##法宝激活个数
|
| | |
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerMagicWeapon.GetMWActiveCntTotal(curPlayer) >= totalcnt
|
| | |
|
| | | ##总强化进化等级
|
| | | # @param None
|
| | | # @return None <Totalplusevolvelv value="cnt"/>
|
| | | def ConditionType_Totalplusevolvelv(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return ChEquip.GetTotalPlusEvolveLV(curPlayer) >= totalcnt
|
| | | ##总强化等级
|
| | | # @param None
|
| | | # @return None <Totalpluslv value="cnt"/>
|
| | |
| | |
|
| | |
|
| | | def DoType_Setfairydomain(curPlayer, curMission, curActionNode):
|
| | | GameWorld.DebugLog("DoType_Setfairydomain", curPlayer.GetID())
|
| | | ## 任务开启缥缈仙域 (做标记可寻访) <Setfairydomain/>
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainState):
|
| | | #若已在寻访中则先结束寻访
|