| | |
| | | GameWorld.DebugLog(' 加点功能开启处理 beforeFreePoint=%s,curLV=%s, setFreePoint=%s'%(beforeFreePoint, curLV, setFreePoint), curPlayer.GetID())
|
| | | return
|
| | |
|
| | | def FixOldAddPoint(curPlayer):
|
| | | ##老号加点处理 重置已加点数,
|
| | | if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_AddPoint):
|
| | | return
|
| | | GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_AddPoint, 1)
|
| | | baseSTR, basePNE, basePHY, baseCON = GetPlayerBasePoint(curPlayer.GetJob())
|
| | | addPoint = curPlayer.GetFreePoint()
|
| | | attrInfoDict = {'BaseSTR':baseSTR,'BasePNE':basePNE,'BasePHY':basePHY,'BaseCON':baseCON}
|
| | | for attrKey, basePoint in attrInfoDict.items():
|
| | | addPoint += (getattr(curPlayer, 'Get%s'%attrKey)() - basePoint)
|
| | | fixFreePoint = GetAllPointByLV(curPlayer)
|
| | | if addPoint != fixFreePoint:
|
| | | for attrKey, basePoint in attrInfoDict.items():
|
| | | getattr(curPlayer, 'Set%s'%attrKey)(basePoint)
|
| | | curPlayer.SetFreePoint(fixFreePoint)
|
| | | #重置天赋
|
| | | PlayerGreatMaster.DoResetMasterSkillPoint(curPlayer)
|
| | | #邮件补偿
|
| | | SendMailByKey('PointCompensation', [curPlayer.GetID()], [], goldPaper=200)
|
| | | |
| | | addDataDict = {'beforeTotalPoint':addPoint}
|
| | | DataRecordPack.DR_Freepoint(curPlayer, "FixOldAddPoint", fixFreePoint, addDataDict)
|
| | | GameWorld.Log('老号加点处理 重置已加点数 addPoint=%s, fixFreePoint=%s' % (addPoint, fixFreePoint))
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
|