| | |
| | | import PassiveBuffEffMng
|
| | | import DataRecordPack
|
| | | import CrossPlayerData
|
| | | import GameFuncComm
|
| | | import ShareDefine
|
| | |
|
| | | import time
|
| | | #-------------------------------------------------------------
|
| | |
| | | __GiveSkill(curPlayer, skillID)
|
| | |
|
| | | CrossPlayerData.OnDienstgradChange(curPlayer, dienstgradID, 1)
|
| | | |
| | | if dienstgradID == IpyGameDataPY.GetFuncCfg("TitleAddPoint"):
|
| | | __DoTitleAddPoint(curPlayer)
|
| | | #重新刷新角色属性
|
| | | if isRefreshAttr:
|
| | | CalcAllDienstgradAttr(curPlayer)
|
| | |
| | | return True
|
| | |
|
| | |
|
| | | # 获得称号加点
|
| | | def __DoTitleAddPoint(curPlayer):
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_AddPoint):
|
| | | # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
|
| | | return
|
| | | addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
|
| | | titleAddPoint = PlayerControl.GetTitleAddExtraPoint(curPlayer)
|
| | | if titleAddPoint <=0:
|
| | | return
|
| | | curLV = curPlayer.GetLV()
|
| | | addFreePoint = 0
|
| | | for rangLVs, point in addPointDict.items():
|
| | | if curLV < rangLVs[0]:
|
| | | continue
|
| | | addFreePoint += titleAddPoint * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | | freePoint = curPlayer.GetFreePoint()
|
| | | updFreePoint = freePoint + addFreePoint
|
| | | curPlayer.SetFreePoint(updFreePoint)
|
| | | GameWorld.DebugLog("获得称号增加自由属性点: freePoint=%s,addFreePoint=%s,curLV=%s,updFreePoint=%s" |
| | | % (freePoint, addFreePoint, curLV, updFreePoint))
|
| | | |
| | | return
|
| | |
|
| | | # 从称号获得技能
|
| | | def __GiveSkill(curPlayer, skillResID):
|
| | |
|