| | |
| | | import NetPackCommon
|
| | | import PlayerControl
|
| | | import PlayerOnline
|
| | | import PlayerTask
|
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | |
| | | PlayerOnline.GetOnlinePlayer(curPlayer).OnHeroItemUpate([itemIndex])
|
| | |
|
| | | PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_HeroLVUP, 1)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_HeroLVUP)
|
| | | return
|
| | |
|
| | | def GetHeroLVMax(heroItem):
|
| | |
| | | if addStar > 0:
|
| | | __DoHeroStarTalentUp(item, addStar)
|
| | | PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_HeroStarUP, addStar)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_HeroStarUP, addStar)
|
| | | |
| | | if isSync:
|
| | | heroItem.Sync_Item()
|
| | |
|
| | |
| | | __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):
|