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/Player/PlayerBillboard.py | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py index 860f197..401b8a3 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py @@ -124,20 +124,25 @@ def UpdatePlayerFPTotalBillboard(curPlayer, isForceUpdate=False, isCheckRule=True): ##更新玩家总战斗力 - playerFightPower = curPlayer.GetFightPower() - if not __CheckFightPowerCanUpdate(curPlayer, ChConfig.Def_PDict_FightPower_Total, playerFightPower, isForceUpdate, isCheckRule): + playerFightPower = PlayerControl.GetFightPower(curPlayer) + if not __CheckFightPowerCanUpdate(curPlayer, ChConfig.Def_PDict_FightPower_Total, playerFightPower, + isForceUpdate, isCheckRule, ChConfig.Def_PDict_FightPower_TotalEx): return - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_Total, playerFightPower, + fightPower = playerFightPower % ChConfig.Def_PerPointValue + fightPowerEx = playerFightPower / ChConfig.Def_PerPointValue + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_Total, fightPower, + ChConfig.Def_PDictType_FightPower) + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_TotalEx, fightPowerEx, ChConfig.Def_PDictType_FightPower) familyID = curPlayer.GetFamilyID() GameWorld.DebugLog("更新总战斗力:playerFightPower=%s" % (playerFightPower), curPlayer.GetPlayerID()) - UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_FightPower, playerFightPower, exInfo=[familyID]) + UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_FightPower, fightPowerEx, fightPower, exInfo=[familyID]) EventReport.WriteEvent_FightPower(curPlayer) return -def __CheckFightPowerCanUpdate(curPlayer, key, fightPower, isForceUpdate=False, isCheckRule=True): +def __CheckFightPowerCanUpdate(curPlayer, key, fightPower, isForceUpdate=False, isCheckRule=True, key2=None): ''' 检查玩家可否更新战斗力 @param curPlayer 玩家实例 @param key 战斗力类型对应key @@ -150,7 +155,9 @@ return False historyFightPower = curPlayer.NomalDictGetProperty(key, 0, ChConfig.Def_PDictType_FightPower) - + if key2 != None: + historyFightPower += curPlayer.NomalDictGetProperty(key2, 0, ChConfig.Def_PDictType_FightPower) * ChConfig.Def_PerPointValue + if not __CanPlayerBillboardComm(curPlayer): return False -- Gitblit v1.8.0