| | |
| | | import CrossRealmPlayer
|
| | | import CrossPlayerData
|
| | | import ChNetSendPack
|
| | | #import EquipZhuXian
|
| | | import PlayerCoat
|
| | | import PlayerState
|
| | | import QuestCommon
|
| | |
| | | CrossPlayerData.ClearCrossSyncDataCache(curPlayer)
|
| | | PyGameData.g_fbBuyBuffTimeDict.pop(playerID, None)
|
| | | #清除地图玩家缓存
|
| | | PyGameData.g_zhuXianSkillAddPerDict.pop(playerID, None)
|
| | | PyGameData.g_zhuXianSkillReducePerDict.pop(playerID, None)
|
| | | PyGameData.g_playerFuncAttrDict.pop(playerID, None)
|
| | | PyGameData.g_playerEquipPartAttrDict.pop(playerID, None)
|
| | | PyGameData.g_equipChangeClassLVInfo.pop(playerID, None)
|
| | |
| | | if addPoint == None:
|
| | | raise Exception('玩家获得升级属性点异常, curLV = %s PlayerID = %s' % (curLV, curPlayerID))
|
| | | return
|
| | | multiple = GetLVAddPointMultiple(curPlayer)
|
| | | return int(addPoint+ GetFabaoAddPoint(curPlayer)) * multiple
|
| | | return int(addPoint+ GetFabaoAddPoint(curPlayer) + GetTitleAddExtraPoint(curPlayer))
|
| | |
|
| | | def GetAllPointByLV(curPlayer):
|
| | | ##获取当前等级可得到属性点数
|
| | |
| | | # 初始点+(升级点+法宝效果)*称号效果倍数+境界点
|
| | | setFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
|
| | | fabaoAddPoint = GetFabaoAddPoint(curPlayer)
|
| | | multiple = GetLVAddPointMultiple(curPlayer)
|
| | | titleAddPoint = GetTitleAddExtraPoint(curPlayer)
|
| | | addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
|
| | | for rangLVs, point in addPointDict.items():
|
| | | if curLV < rangLVs[0]:
|
| | | continue
|
| | | setFreePoint += (point + fabaoAddPoint) * multiple * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | | setFreePoint += (point + fabaoAddPoint + titleAddPoint) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
|
| | |
|
| | | #境界提升点数
|
| | | setFreePoint += curPlayer.GetOfficialRank() * IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
|
| | | return setFreePoint
|
| | |
|
| | | def GetLVAddPointMultiple(curPlayer):
|
| | | # 获取等级加点的倍数
|
| | | multiple = 1
|
| | | def GetTitleAddExtraPoint(curPlayer):
|
| | | # 称号额外增加玩家每级获得的灵根点
|
| | | titleID = IpyGameDataPY.GetFuncCfg("TitleAddPoint")
|
| | | if titleID and curPlayer.GetDienstgradManager().GetDienstgrad(titleID):
|
| | | multiple = IpyGameDataPY.GetFuncCfg("TitleAddPoint", 2) or 1
|
| | | return multiple
|
| | | return IpyGameDataPY.GetFuncCfg("TitleAddPoint", 2)
|
| | | return 0
|
| | |
|
| | | def GetFabaoAddPoint(curPlayer):
|
| | | #法宝额外增加玩家每级获得的灵根点
|
| | |
| | | if expViewType == ShareDefine.Def_ViewExpType_KillNPC:
|
| | | exp_rate = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TotalExpRate)
|
| | | superRate = PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(curPlayer, None, None, ChConfig.TriggerType_AddExpRate)
|
| | | if superRate:
|
| | | # 龙凤镯 经验
|
| | | expViewType = ShareDefine.Def_ViewExpType_KillNPCSuper
|
| | | if addSkillID == ChConfig.Def_SkillID_LXHY_AddExpRate:
|
| | | addSkill = GameWorld.GetGameData().GetSkillBySkillID(addSkillID)
|
| | | hasEffect = SkillCommon.GetSkillEffectByEffectID(addSkill, ChConfig.Def_Skill_Effect_AddExpRate)
|
| | | if hasEffect:
|
| | | #烈焰战神 经验
|
| | | superRate += hasEffect.GetEffectValue(0)
|
| | | expViewType = ShareDefine.Def_ViewExpType_LYZS
|
| | | exp_rate += superRate
|
| | | if superRate:
|
| | | expViewType = ShareDefine.Def_ViewExpType_KillNPCSuper
|
| | |
|
| | | elif expViewType in [ShareDefine.Def_ViewExpType_GameEvent, ShareDefine.Def_ViewExpType_Sit]:
|
| | | exp_rate = curPlayer.GetGameEventExpRate()
|
| | |
| | | if aftLV > befLV:
|
| | | curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
|
| | | PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
|
| | | PlayerActivity.DoAddActivity(curPlayer, (aftLV - befLV)*IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint',3))
|
| | | PlayerActivity.DoAddActivityByLV(curPlayer, befLV, aftLV)
|
| | | |
| | | if aftFreePoint > befFreePoint:
|
| | | curPlayer.SetFreePoint(aftFreePoint)
|
| | | #NotifyCode(curPlayer, "ObtainAttributeDot", [aftFreePoint - befFreePoint])
|
| | |
| | | PlayerFamilyTech.CalcFamilyTechAttr(curPlayer)
|
| | | PlayerEquipDecompose.RefreshEDAttr(curPlayer)
|
| | | PlayerDogz.RefreshDogzAttr(curPlayer)
|
| | | #EquipZhuXian.CalcZhuXianAttr(curPlayer)
|
| | | PlayerGatherSoul.RefreshGatherSoulAttr(curPlayer)
|
| | | PlayerCoat.CalcClothesCoatSkinAttr(curPlayer)
|
| | | self.RefreshAllState(isForce=True)
|