|  |  |  | 
|---|
|  |  |  | import PlayerMagicWeapon | 
|---|
|  |  |  | import PlayerBossReborn | 
|---|
|  |  |  | import PlayerFairyCeremony | 
|---|
|  |  |  | import PlayerWeekParty | 
|---|
|  |  |  | import PlayerHorse | 
|---|
|  |  |  | import FBCommon | 
|---|
|  |  |  | import PyGameData | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | 
|---|
|  |  |  | # @return 无 | 
|---|
|  |  |  | # @remarks 跑环任务结束处理,删除或者随机下一个 | 
|---|
|  |  |  | def __RunAroundMission(curPlayer, missionID, curMissionData, curActionNode): | 
|---|
|  |  |  | GameWorld.Log("__RunAroundMission----%s"%missionID) | 
|---|
|  |  |  | GameWorld.Log("__RunAroundMission----%s"%missionID, curPlayer.GetID()) | 
|---|
|  |  |  | #任务完成,触发随机跑环 | 
|---|
|  |  |  | run_event = GameWorld.ToIntDef(curActionNode.GetAttribute("run_around"), 0) | 
|---|
|  |  |  | firstMissionID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0) | 
|---|
|  |  |  | 
|---|
|  |  |  | def OnAroundMissionFinish(curPlayer, missionType, addCnt=1): | 
|---|
|  |  |  | #跑环任务id列表 | 
|---|
|  |  |  | # 活跃度 | 
|---|
|  |  |  | GameWorld.Log('    跑环完成触发活跃度 missionType=%s'%missionType, curPlayer.GetPlayerID()) | 
|---|
|  |  |  | if missionType == QuestCommon.Def_Mission_Type_RunDaily: | 
|---|
|  |  |  | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_DailyRunMission, addCnt) | 
|---|
|  |  |  | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TaskCRun, addCnt) | 
|---|
|  |  |  | PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_RunTask, addCnt) | 
|---|
|  |  |  | PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_RunTask, addCnt) | 
|---|
|  |  |  | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_RunTask, addCnt) | 
|---|
|  |  |  | elif missionType == QuestCommon.Def_Mission_Type_RunFamily: | 
|---|
|  |  |  | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyRunMission, addCnt) | 
|---|
|  |  |  | PlayerFamily.AddFamilyActivity(curPlayer, ShareDefine.FamilyActive_Task, addCnt) | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | GameWorld.Log('    跑环完成触发活跃度异常 missionType=%s'%missionType, curPlayer.GetPlayerID()) | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | GameWorld.Log("DoType_Set_Run_Around_Reward---%s"%curMissionID, curPlayer.GetID()) | 
|---|
|  |  |  | idNameStr = curActionNode.GetAttribute("id_name") | 
|---|
|  |  |  | if curMission and idNameStr != "": | 
|---|
|  |  |  | questID = GameWorld.ToIntDef(curMission.GetProperty(idNameStr), 0) | 
|---|