92 【主界面】主线任务-服务端(增加任务类型21 - 武将图鉴激活x个)
| | |
| | | TaskType_ReqOrJoinFamily, # 创建或者申请加入公会 18
|
| | | TaskType_FBTianzi, # 挑战天子的考验x次 19
|
| | | TaskType_Rename, # 改名 20
|
| | | ) = range(1, 1 + 20)
|
| | | TaskType_HeroBook, # 武将图鉴激活x个 21
|
| | | ) = range(1, 1 + 21)
|
| | |
|
| | | # 任务分组
|
| | | TaskGroupList = (
|
| | |
| | |
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskValue % taskGroup)
|
| | | GameWorld.DebugAnswer(curPlayer, "设置任务ID:%s 进度:%s/%s" % (taskID, curValue, needValue))
|
| | | PlayerTask.SyncTaskInfo(curPlayer, [taskGroup])
|
| | | return
|
| | |
|
| | | def __ShowTask(curPlayer):
|
| | |
| | | __doHeroBookAct(curPlayer, heroID)
|
| | | return
|
| | |
|
| | | def GetHeroBookActCnt(curPlayer):
|
| | | ## 获取武将图鉴已激活数量
|
| | | bookCnt = 0
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in range(ipyDataMgr.GetHeroCount()):
|
| | | ipyData = ipyDataMgr.GetHeroByIndex(index)
|
| | | heroID = ipyData.GetHeroID()
|
| | | if not ipyData.GetPlayerCanUse():
|
| | | continue
|
| | | if not GetHeroBookInitState(curPlayer, heroID):
|
| | | continue
|
| | | bookCnt += 1
|
| | | return bookCnt
|
| | |
|
| | | def __doHeroBookAct(curPlayer, heroID):
|
| | | ## 图鉴激活
|
| | | playerID = curPlayer.GetPlayerID()
|
| | |
| | | Sync_HeroInfo(curPlayer, [heroID])
|
| | |
|
| | | RefreshLordAttr(curPlayer)
|
| | | |
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_HeroBook)
|
| | | return
|
| | |
|
| | | def __doHeroBookStarLVUP(curPlayer, heroID):
|
| | |
| | | import IPY_GameWorld
|
| | | import GameFuncComm
|
| | | import ShareDefine
|
| | | import PlayerHero
|
| | | import ChConfig
|
| | | import FBCommon
|
| | |
|
| | |
| | | elif taskType == ChConfig.TaskType_RealmLV:
|
| | | taskValue = curPlayer.GetOfficialRank()
|
| | |
|
| | | elif taskType == ChConfig.TaskType_HeroBook:
|
| | | taskValue = PlayerHero.GetHeroBookActCnt(curPlayer)
|
| | | |
| | | elif taskType == ChConfig.TaskType_EquipColor:
|
| | | if not conds:
|
| | | return 0
|