| | |
| | | if conds[0] != taskConds[0]:
|
| | | return
|
| | |
|
| | | # 挑战主线关
|
| | | elif taskType == ChConfig.TaskType_MainLevelChallenge:
|
| | | taskConds = ipyData.GetTaskConds()
|
| | | if not conds or len(conds) != len(taskConds):
|
| | | return
|
| | | if conds[0] < taskConds[0]:
|
| | | #GameWorld.DebugLog("挑战小于的不算完成: %s < TaskCond:%s" % (conds[0], taskConds[0]))
|
| | | return
|
| | | #GameWorld.DebugLog("挑战大于等于都算完整: %s >= TaskCond:%s" % (conds[0], taskConds[0]))
|
| | | |
| | | return True
|
| | |
|
| | | def SetTaskValue(curPlayer, taskIpyData, value=0, isNotify=True):
|
| | |
| | | if curState != ChConfig.TaskState_CanGet:
|
| | | GameWorld.DebugLog("任务未完成无法领奖: taskID=%s,curValue=%s/%s,curState=%s" % (taskID, curValue, needValue, curState), playerID)
|
| | | return
|
| | | #if not ItemControler.CheckPackSpaceEnough(curPlayer, awardItemList):
|
| | | # return
|
| | | if not ItemControler.CheckPackSpaceEnough(curPlayer, awardItemList):
|
| | | return
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskIDLast % taskGroup, taskID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskID % taskGroup, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue % taskGroup, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, 0)
|
| | |
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, awardItemList, event=["Task", False, {}])
|
| | | # 支持定制属性物品
|
| | | isAuctionItem = 0
|
| | | notifyAwardList = []
|
| | | appointInfo = {}
|
| | | for itemID, itemCount, appointID in awardItemList:
|
| | | setAttrDict = {ShareDefine.Def_CItemKey_AppointID:appointID} if appointID else {}
|
| | | if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, event=["Task", False, {}], setAttrDict=setAttrDict):
|
| | | continue
|
| | | notifyAwardList.append([itemID, itemCount, isAuctionItem])
|
| | | appointInfo[itemID] = appointID
|
| | | ItemControler.NotifyGiveAwardInfo(curPlayer, notifyAwardList, "Task", dataEx={"appointInfo":appointInfo})
|
| | |
|
| | | if not __giveNewTask(curPlayer, taskGroup):
|
| | | SyncTaskInfo(curPlayer, [taskGroup])
|
| | |
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer, [taskID])
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | return
|
| | |
|
| | | def SyncTaskInfo(curPlayer, taskGroupList=None):
|