From 0b52fea0c2dec053c44678d94bd66c10db1b0b91 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 06 四月 2021 17:27:57 +0800 Subject: [PATCH] 8870 【BT2】【后端】战力、伤害、玩家生命的数值调整为大数值(超21亿) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py | 29 ++++++++++++++++++++--------- 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py index 3c72c38..a151b96 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py @@ -215,7 +215,8 @@ GameWorld.ErrLog("设置对象属性失败, Index = %s" % (effIndex)) return - effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord) + if effIndex not in ChConfig.TYPE_BIGVALUE_ATTR: + effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord) return ObjProperty_AttrByIndex[effIndex - 1][1](curObj, effectValue) @@ -237,22 +238,32 @@ def CopyPlayerFuncAttr(curPlayer): for i in xrange(len(ObjProperty_AttrByIndex)): # Get - if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]: + effIndex = i + 1 + if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]: continue value = ObjProperty_AttrByIndex[i][0](curPlayer) - if value == 0 and curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i) == 0: + if value == 0 and GetCopyFuncAttrValue(curPlayer, effIndex) == 0: continue - curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr%i, ObjProperty_AttrByIndex[i][0](curPlayer)) + SetCopyFuncAttrValue(curPlayer, effIndex, value) return # 恢复缓存功能属性的刷新结果,用于BUFF属性单独刷新 def RestorePlayerFuncAttr(curPlayer): for i in xrange(len(ObjProperty_AttrByIndex)): - if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]: + effIndex = i + 1 + if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]: continue - ObjProperty_AttrByIndex[i][1](curPlayer, - curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i)) + ObjProperty_AttrByIndex[i][1](curPlayer, GetCopyFuncAttrValue(curPlayer, effIndex)) return - - + +def GetCopyFuncAttrValue(curPlayer, effIndex): + value = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex) + valueEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex) + return valueEx * ShareDefine.Def_PerPointValue + value + +def SetCopyFuncAttrValue(curPlayer, effIndex, value): + curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex, value % ShareDefine.Def_PerPointValue) + curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex, value / ShareDefine.Def_PerPointValue) + return + \ No newline at end of file -- Gitblit v1.8.0