| | |
| | | GameWorld.DebugLog("增加炼丹经验: alchemyLV=%s,addExp=%s,alchemyExp=%s" % (alchemyLV, addExp, alchemyExp), curPlayer.GetPlayerID())
|
| | |
|
| | | isLVUp = False
|
| | | stoveIpyData = IpyGameDataPY.GetIpyGameData("RefineStove", alchemyLV)
|
| | | stoveIpyData = IpyGameDataPY.GetIpyGameDataNotLog("RefineStove", alchemyLV)
|
| | | while stoveIpyData and stoveIpyData.GetUpNeedExp() and alchemyExp >= stoveIpyData.GetUpNeedExp():
|
| | | alchemyExp -= stoveIpyData.GetUpNeedExp()
|
| | | needExp = stoveIpyData.GetUpNeedExp()
|
| | | nextLV = alchemyLV + 1
|
| | | stoveIpyData = IpyGameDataPY.GetIpyGameDataNotLog("RefineStove", nextLV)
|
| | | if not stoveIpyData:
|
| | | GameWorld.DebugLog("没有下一级数据了,已满级!不可升级!", curPlayer.GetPlayerID())
|
| | | break
|
| | | |
| | | alchemyExp -= needExp
|
| | | alchemyLV += 1
|
| | | GameWorld.DebugLog(" 炼丹升级: alchemyLV=%s,alchemyExp=%s" % (alchemyLV, alchemyExp), curPlayer.GetPlayerID())
|
| | | stoveIpyData = IpyGameDataPY.GetIpyGameDataNotLog("RefineStove", alchemyLV)
|
| | | isLVUp = True
|
| | | EventShell.EventRespons_RefineStoveUp(curPlayer, alchemyLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyExp, alchemyExp)
|
| | | if not isLVUp:
|
| | | return False
|
| | |
|
| | | GameWorld.DebugLog("升级后剩余经验: %s" % alchemyExp, curPlayer.GetPlayerID())
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyLV, alchemyLV)
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_AlchemyLV, alchemyLV)
|
| | |
|