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/PlayerPrestigeSys.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
index 136bccd..45e2df9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
@@ -30,6 +30,7 @@
 import PlayerTongTianLing
 import PlayerGubao
 import PlayerTask
+import PlayerOnline
 
 #------------------------------------------------------------------------------
 
@@ -85,17 +86,18 @@
    
     addAttrIDList, addAttrValueList = realmIpyData.GetAddAttrType(), realmIpyData.GetAddAttrNum()
     
-    allAttrList = [{} for i in range(4)]
+    playerID = curPlayer.GetPlayerID()
+    attrDict = {}
     for i, attrID in enumerate(addAttrIDList):
-        PlayerControl.CalcAttrDict_Type(attrID, addAttrValueList[i], allAttrList)
+        attrDict[attrID] = attrDict.get(attrID, 0) + addAttrValueList[i]
         
-    # 保存计算值
-    PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Prestige, allAttrList)
+    GameWorld.DebugLog("官职属性: %s" % attrDict, playerID)
+    PlayerOnline.GetOnlinePlayer(curPlayer).SetCalcAttr(ChConfig.Def_CalcAttr_Realm, attrDict)
     return
 
 def RefreshOfficialAttr(curPlayer):
     CalcOfficialRankAttr(curPlayer)
-    PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
+    PlayerOnline.GetOnlinePlayer(curPlayer).RefreshRoleAttr()
     return
 
 def AddRealmTaskValue(curPlayer, taskType, addValue):

--
Gitblit v1.8.0