From ac98391b1102b1c07aa71dbab56f232db74273ec Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 18 九月 2025 11:51:20 +0800 Subject: [PATCH] 121 【武将】武将系统-服务端(计算主公官职属性;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py index 2f18a62..f639650 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py @@ -23,6 +23,7 @@ import PlayerControl import IpyGameDataPY import FormulaControl +import PlayerPrestigeSys import PlayerHero import GameWorld import ChConfig @@ -410,6 +411,7 @@ CalcRoleBase(curPlayer) ChEquip.CalcRoleEquipAttr(curPlayer) PlayerHero.CalcHeroAddAttr(curPlayer) + PlayerPrestigeSys.CalcOfficialRankAttr(curPlayer) return def doRefreshLineupAttr(curPlayer, olPlayer, lineup): @@ -631,6 +633,7 @@ lvAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_LV) equipAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_MainEquip) bookAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_HeroBook) + realmAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_Realm) GameWorld.DebugLog(" 国家武将统计=%s" % countryHeroInfo, playerID) GameWorld.DebugLog(" 羁绊武将统计=%s" % fetterHeroInfo, playerID) @@ -645,6 +648,7 @@ GameWorld.DebugLog(" 主公等级属性=%s" % lvAttrDict, playerID) GameWorld.DebugLog(" 主公装备属性=%s" % equipAttrDict, playerID) GameWorld.DebugLog(" 主公图鉴属性=%s" % bookAttrDict, playerID) + GameWorld.DebugLog(" 主公官职属性=%s" % realmAttrDict, playerID) PlayerLV = curPlayer.GetLV() OfficialLV = curPlayer.GetOfficialRank() @@ -676,6 +680,9 @@ bookValue = bookAttrDict.get(attrID, 0) bookPer = bookAttrDict.get(attrPerID, 0) / 10000.0 if attrPerID else 0 + realmValue = realmAttrDict.get(attrID, 0) + realmPer = realmAttrDict.get(attrPerID, 0) / 10000.0 if attrPerID else 0 + lineupInitAddPer, lineupLVAddPer, lineupBreakLVAddPer, lineupStarAddPer = 0, 0, 0, 0 if attrID in ChConfig.BaseAttrIDList: lineupInitAddPer, lineupLVAddPer, lineupBreakLVAddPer, lineupStarAddPer = InitAddPer, LVAddPer, BreakLVAddPer, StarAddPer @@ -701,7 +708,7 @@ awakeTalentPer = awakeTalentAttrDict.get(attrPerID, 0) / 10000.0 # 计算 - attrParamDict = {"lvValue":lvValue, "equipValue":equipValue, "bookValue":bookValue, "bookPer":bookPer, + attrParamDict = {"lvValue":lvValue, "equipValue":equipValue, "bookValue":bookValue, "bookPer":bookPer, "realmValue":realmValue, "realmPer":realmPer, "lineupInitAddPer":lineupInitAddPer, "lineupLVAddPer":lineupLVAddPer, "lineupBreakLVAddPer":lineupBreakLVAddPer, "lineupStarAddPer":lineupStarAddPer, "heroSelfValue":heroSelfValue, "heroSelfPer":heroSelfPer, "inheritPer":inheritPer, "lineupHaloValue":lineupHaloValue, "lineupHaloPer":lineupHaloPer, "fetterValue":fetterValue, "fetterPer":fetterPer, -- Gitblit v1.8.0