| | |
| | | Def_Run_Around_Reward_Exp = "run_around_exp" #跑环任务的奖励
|
| | | Def_Run_Around_Reward_ExpPoint = "run_around_exp_point" #跑环任务的奖励
|
| | | Def_Run_Around_Reward_Money = "run_around_money" #跑环任务的给钱
|
| | |
|
| | | Def_Run_Around_Reward_FamilyHornor = "run_around_familyhornor" #跑环任务的仙盟贡献奖励
|
| | | Def_Run_Around_Reward_Multiple = "run_around_multiple" #跑环任务的奖励翻倍数
|
| | |
|
| | | Def_Task_Reward_Per = "reward_per" #领取任务奖励倍数百分比; 150代表1.5倍
|
| | |
| | | def __RunAnswerAction(curPlayer, curMission, answersNode):
|
| | | actionsNode = __FindAnswerActionNode(curPlayer, curMission, answersNode)
|
| | | if actionsNode == None or actionsNode.IsEmpty():
|
| | | GameWorld.Log('__RunAnswerAction找不到回答节点')
|
| | | GameWorld.DebugLog('__RunAnswerAction找不到回答节点--%s'%curMission.GetMissionID())
|
| | | return
|
| | |
|
| | | __DoAnswerActionNode(curPlayer, curMission, actionsNode)
|
| | |
| | | packList=[IPY_GameWorld.rptItem], isSuite=False,
|
| | | addAttrLV=0, isLucky=False, skillBoostEff=[], holeCount=0,
|
| | | equipIndex= -1, isGreat=0, baseAttrRate=ShareDefine.Def_MaxRateValue, greatAttrList=[]):
|
| | | if PlayerFamily.DoAddFamilyBossFoodEx(curPlayer, itemID, itemCount, ShareDefine.Def_AddFAVReason_DoFamilyMisson):
|
| | | #仙盟兽粮自动使用
|
| | | return
|
| | | # if PlayerFamily.DoAddFamilyBossFoodEx(curPlayer, itemID, itemCount, ShareDefine.Def_AddFAVReason_DoFamilyMisson):
|
| | | # #仙盟兽粮自动使用
|
| | | # return
|
| | |
|
| | | #任务给予物品应该只能放入万能背包和背包
|
| | | itemControl = ItemControler.PlayerItemControler(curPlayer)
|
| | |
| | |
|
| | | mission_1.SetProperty(Def_Around_AllCount, allCount)
|
| | | EventShell.EventRespons_RunTaskAllCnt(curPlayer, curMissionData.Type, allCount)
|
| | | GameWorld.DebugLog("删除任务allCount %s, RUNCOUNT=%s" % (allCount, RUNCOUNT))
|
| | | GameWorld.Log("删除任务allCount %s, RUNCOUNT=%s" % (allCount, RUNCOUNT))
|
| | |
|
| | |
|
| | | if allCount < RUNCOUNT:
|
| | |
| | | # @return 无
|
| | | # @remarks 跑环任务结束处理,删除或者随机下一个
|
| | | def __RunAroundMission(curPlayer, missionID, curMissionData, curActionNode):
|
| | | GameWorld.Log("__RunAroundMission----%s"%missionID)
|
| | | #任务完成,触发随机跑环
|
| | | run_event = GameWorld.ToIntDef(curActionNode.GetAttribute("run_around"), 0)
|
| | | firstMissionID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | |
| | |
|
| | |
|
| | | #总跑环次数已满,不可再做
|
| | | if run_event == Def_Run_Around_Over_1 and allCount >= RUNCOUNT:
|
| | | return
|
| | | if run_event == Def_Run_Around_Over_1:
|
| | | if allCount >= RUNCOUNT or aroundCount >= AROUNDCOUNT:
|
| | | return
|
| | |
|
| | | nextMissionID = 0
|
| | | nextMission = None
|
| | |
| | |
|
| | | if curMissionData.Type == QuestCommon.Def_Mission_Type_RunFamily:
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TaskFRun, 1)
|
| | | if allCount < RUNCOUNT:
|
| | | nextMissionID = __OverRandRunAround(curPlayer, curMissionData)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RunTaskNextMissionID % curMissionData.Type, nextMissionID)
|
| | | # if allCount < RUNCOUNT:
|
| | | # nextMissionID = __OverRandRunAround(curPlayer, curMissionData)
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RunTaskNextMissionID % curMissionData.Type, nextMissionID)
|
| | |
|
| | |
|
| | |
|
| | |
| | | # @return 返回值无意义
|
| | | # @remarks 设置跑环任务奖励 <set_run_around_reward multiple="指定倍数" id_name="任务ID存储key" />
|
| | | def DoType_Set_Run_Around_Reward(curPlayer, curMission, curActionNode):
|
| | | curMissionID = curMission.GetMissionID()
|
| | | GameWorld.Log("DoType_Set_Run_Around_Reward---%s"%curMissionID)
|
| | | idNameStr = curActionNode.GetAttribute("id_name")
|
| | | if curMission and idNameStr != "":
|
| | | questID = GameWorld.ToIntDef(curMission.GetProperty(idNameStr), 0)
|
| | |
| | | if curMission == None:
|
| | | curMission = QuestCommon.AddNewMission(curPlayer, questID)
|
| | |
|
| | | curMissionID = curMission.GetMissionID()
|
| | | curMissionData = FindQuestFunc(curMissionID)
|
| | | if not curMissionData:
|
| | | return
|
| | |
|
| | | rewardList = __GetRunAroundReward(curPlayer, curMission)
|
| | | if rewardList:
|
| | | curExp, curMoney, itemID, itemCount = rewardList
|
| | | curExp, curMoney, curFamilyHornor, itemID, itemCount = rewardList
|
| | | else:
|
| | | curExp, curMoney, itemID, itemCount = 0, 0, 0, 0
|
| | | curExp, curMoney, curFamilyHornor, itemID, itemCount = 0, 0, 0, 0
|
| | |
|
| | | curMission.SetProperty(Def_Run_Around_Reward_Exp, curExp % ChConfig.Def_PerPointValue)
|
| | | curMission.SetProperty(Def_Run_Around_Reward_ExpPoint, curExp / ChConfig.Def_PerPointValue)
|
| | |
| | |
|
| | | curMission.SetProperty(Def_Day_Event_Reward_Item_Id, itemID)
|
| | | curMission.SetProperty(Def_Day_Event_Reward_Item_Count, itemCount)
|
| | | curMission.SetProperty(Def_Run_Around_Reward_FamilyHornor, curFamilyHornor)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | |
| | | curExp = eval(IpyGameDataPY.GetFuncCfg('RunTaskExp'))
|
| | | curExp += curLVRunAroundReward.AddExp
|
| | | curMoney = baseMoney
|
| | | |
| | | curFamilyHornor = curLVRunAroundReward.PlayerFamilyHornor
|
| | | itemInfo = curLVRunAroundReward.Item
|
| | | if itemInfo:
|
| | | itemID, itemCount = eval(itemInfo)
|
| | | else:
|
| | | itemID, itemCount = 0, 0
|
| | |
|
| | | return (curExp, curMoney, itemID, itemCount)
|
| | | return (curExp, curMoney, curFamilyHornor, itemID, itemCount)
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##给予跑环奖励
|
| | |
| | | addDataDict = {ChConfig.Def_Give_Reason_SonKey:"Run"}
|
| | | PlayerControl.GiveMoney(curPlayer, runAroundReward.MoneyType, money, ChConfig.Def_GiveMoney_Mission, addDataDict, False)
|
| | |
|
| | | familyHornor = curMission.GetProperty(Def_Run_Around_Reward_FamilyHornor)
|
| | | if familyHornor: |
| | | PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, familyHornor, True, ShareDefine.Def_AddFAVReason_DoFamilyMisson, True)
|
| | |
|
| | | item_id = curMission.GetProperty(Def_Day_Event_Reward_Item_Id)
|
| | | item_count = curMission.GetProperty(Def_Day_Event_Reward_Item_Count)
|
| | |
|
| | | #给物品奖励
|
| | | itemInfo = []
|
| | | if item_id and item_count:
|
| | | AddEventItem(curPlayer, curMission, item_id, item_count, bind=True)
|
| | | itemInfo = [[item_id, item_count, True]]
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, 1)
|
| | | if 1 > packSpace:
|
| | | PlayerControl.NotifyCode(curPlayer, "UnionTask_Reward")
|
| | | PlayerControl.SendMailByKey("UnionTaskReward", [curPlayer.GetID()], itemInfo)
|
| | | else:
|
| | | AddEventItem(curPlayer, curMission, item_id, item_count, bind=True)
|
| | | |
| | | GameWorld.DebugLog("任务:%d 获得经验:%d,钱=%s,物品ID=%s,物品数量=%s"
|
| | | % (curMission.GetMissionID(), exp, money, item_id, item_count))
|
| | |
|
| | |
| | | #记录副本对应的任务ID
|
| | | if FBCommon.GetRecordMapID(mapID) in [ChConfig.Def_FBMapID_ClearDevil, ChConfig.Def_FBMapID_MagicWeapon]:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionID, curMission.GetMissionID())
|
| | | missionID = curMission.GetMissionID()
|
| | | curMissionData = FindQuestFunc(missionID)
|
| | | if curMissionData:
|
| | | missionType = curMissionData.Type
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionType, missionType)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, PlayerHorse.GetHorseSumLV(curPlayer))
|
| | | return
|
| | |
|
| | | ##设置强化总等级
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Totalpluslv key="" />
|
| | | def DoType_Set_Totalpluslv(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, ChEquip.GetTotalPlusLV(curPlayer, False))
|
| | | return
|
| | |
|
| | | ##设置装备总星级
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curMission 任务实例
|
| | | # @param curActionNode节点信息
|
| | | # @return 返回值无意义
|
| | | # @remarks <Set_Equiptotalstar key="" />
|
| | | def DoType_Set_Equiptotalstar(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, ChEquip.GetTotalEquipStars(curPlayer))
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | | ##DoType_调度器
|
| | |
| | | groupCnt +=1
|
| | | return groupCnt >= needCnt
|
| | |
|
| | | ##法宝激活个数
|
| | | # @param None
|
| | | # @return None <Mwcnt value="cnt"/>
|
| | | def ConditionType_Mwcnt(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return PlayerMagicWeapon.GetMWActiveCntTotal(curPlayer) >= totalcnt
|
| | |
|
| | | ##总强化等级
|
| | | # @param None
|
| | | # @return None <Totalpluslv value="cnt"/>
|
| | | def ConditionType_Totalpluslv(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return ChEquip.GetTotalPlusLV(curPlayer, False) >= totalcnt
|
| | |
|
| | | ##装备总星级
|
| | | # @param None
|
| | | # @return None <Equiptotalstar value="cnt"/>
|
| | | def ConditionType_Equiptotalstar(curPlayer, curMission, curActionNode):
|
| | | totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
|
| | |
|
| | | ##激活法宝,确认与成就逻辑后使用
|
| | | # @param None
|