| | |
| | | import Operate_EquipStone
|
| | | import PlayerWeekParty
|
| | | import PlayerFairyDomain
|
| | | import GameFuncComm
|
| | | import PlayerActLogin
|
| | | import PlayerHorse
|
| | | import FBCommon
|
| | |
| | | QuestCommon.SetPlayerMissionState(curPlayer, curMission, -1)
|
| | | curMission.SetDescriptionIndex(len(curMissionData.QuestDescriptionList) - 1)
|
| | | EventShell.NotifyOneMission(curPlayer, curMission, isNotifyAll=False)
|
| | | |
| | | # 完成任务事件 (配合前端,在通知任务状态后再触发)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer, [missionID])
|
| | | #删除这个任务
|
| | | #第一个任务决定是否要触发OnEnter事件, 所以不能删除
|
| | | if missionID != 1 and diff_event == 0:
|
| | |
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_DailyRunMission, addCnt)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_TaskCRun, addCnt)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TaskCRun, addCnt)
|
| | | PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_RunTask, addCnt)
|
| | | PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_RunTask, addCnt)
|
| | | PlayerNewFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_RunTask, addCnt)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_RunTask, addCnt)
|
| | | PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_RunTask, 1)
|
| | | elif missionType == QuestCommon.Def_Mission_Type_RunFamily:
|
| | | PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_RunTask, addCnt)
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyRunMission, addCnt)
|
| | | PlayerFamily.AddFamilyActivity(curPlayer, ShareDefine.FamilyActive_Task, addCnt)
|
| | | else:
|
| | |
| | | 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
|
| | |
|
| | | ##设置符合条件的已穿基础装备数量
|
| | |
| | | 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):
|
| | | #若已在寻访中则先结束寻访
|
| | |
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 2)
|
| | | PlayerFairyDomain.NotifyVisitFairyDomainInfo(curPlayer)
|
| | | return |
| | | return
|
| | |
|
| | | ##神兵等级判断
|
| | | # @param None
|
| | | # @return None <Godweaponlv value="lv" weapontype=""/>
|
| | | def ConditionType_Godweaponlv(curPlayer, curMission, curActionNode):
|
| | | lv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | weapontype = GameWorld.ToIntDef(curActionNode.GetAttribute("weapontype"), 0)
|
| | | return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % weapontype) >= lv |