From ac36bdcfa7db1557790a5b912c3248b22625841f Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 26 十一月 2025 18:49:17 +0800
Subject: [PATCH] Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_ServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 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 a2775f6..72f47e8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
@@ -24,6 +24,7 @@
 import IpyGameDataPY
 import FormulaControl
 import PlayerPrestigeSys
+import PlayerBeauty
 import PlayerFamily
 import PlayerHorse
 import PlayerGubao
@@ -422,6 +423,7 @@
     PlayerGubao.CalcGubaoAttr(curPlayer)
     PlayerHJG.CalcHJGAttr(curPlayer)
     PlayerHorse.CalcHorseAttr(curPlayer)
+    PlayerBeauty.CalcBeautyAttr(curPlayer)
     return
 
 def doRefreshLineupAttr(curPlayer, olPlayer, lineup):
@@ -451,6 +453,7 @@
     countryHeroInfo = {} # 国家武将统计 {country:[heroID, ...], ...}
     fetterHeroInfo = {} # 阵容羁绊武将统计信息 {fetterID:[heroID, ...], ...}
     heroSelfAttrInfo = {} # 武将自身属性 {heroID:{attrID:value, ...}, ...}
+    heroLVAttrInfo = {} # 武将等级属性 {heroID:{attrID:value, ...}, ...}
     heroStarTalentInfo = {} # 武将星级天赋属性 {heroID:{attrID:value, ...}, ...}
     heroBreakAttrInfo = {} # 武将突破潜能属性 {heroID:{attrID:value, ...}, ...}
     heroAwakeTalentInfo = {} # 武将觉醒天赋属性 {heroID:{attrID:value, ...}, ...}
@@ -517,6 +520,18 @@
         for k, v in heroIpyData.GetBatAttrDict().items():
             selfAttrDict[int(k)] = v
         heroSelfAttrInfo[heroID] = selfAttrDict
+        
+        # 等级属性
+        heroLVAttrDict = {}
+        heroLVIpyData = IpyGameDataPY.GetIpyGameData("HeroQualityLV", quality, heroLV)
+        if heroLVIpyData:
+            attrIDList = heroLVIpyData.GetAttrIDList()
+            attrValueList = heroLVIpyData.GetAttrValueList()
+            for aIndex in range(min(len(attrIDList), len(attrValueList))):
+                attrID = attrIDList[aIndex]
+                attrValue = attrValueList[aIndex]
+                heroLVAttrDict[attrID] = heroLVAttrDict.get(attrID, 0) + attrValue
+        heroLVAttrInfo[heroID] = heroLVAttrDict
         
         # 突破潜能
         breakAttrDict = {}
@@ -647,10 +662,12 @@
     gubaoAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_Gubao)
     hjgAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_HJG)
     horseAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_Horse)
+    beautyAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_Beauty)
     
     GameWorld.DebugLog("    国家武将统计=%s" % countryHeroInfo, playerID)
     GameWorld.DebugLog("    羁绊武将统计=%s" % fetterHeroInfo, playerID)
     GameWorld.DebugLog("    武将自身属性=%s" % heroSelfAttrInfo, playerID)
+    GameWorld.DebugLog("    武将等级属性=%s" % heroLVAttrInfo, playerID)
     GameWorld.DebugLog("    武将吞噬属性=%s" % heroStarTalentInfo, playerID)
     GameWorld.DebugLog("    武将突破潜能=%s" % heroBreakAttrInfo, playerID)
     GameWorld.DebugLog("    武将觉醒天赋=%s" % heroAwakeTalentInfo, playerID)
@@ -665,6 +682,7 @@
     GameWorld.DebugLog("    主公古宝属性=%s" % gubaoAttrDict, playerID)
     GameWorld.DebugLog("    主幻境阁属性=%s" % hjgAttrDict, playerID)
     GameWorld.DebugLog("    主公坐骑属性=%s" % horseAttrDict, playerID)
+    GameWorld.DebugLog("    主公红颜属性=%s" % beautyAttrDict, playerID)
     
     PlayerLV = curPlayer.GetLV()
     OfficialLV = curPlayer.GetOfficialRank()
@@ -681,6 +699,7 @@
         lineupHero.heroBatAttrDict = {}
         lineupHero.fightPower = 0
         
+        heroLVAttrDict = heroLVAttrInfo.get(heroID, {})
         starTalentAttrDict = heroStarTalentInfo.get(heroID, {})
         breakAttrDict = heroBreakAttrInfo.get(heroID, {})
         awakeTalentAttrDict = heroAwakeTalentInfo.get(heroID, {})
@@ -708,6 +727,9 @@
             horseValue = horseAttrDict.get(attrID, 0)
             horsePer = horseAttrDict.get(attrPerID, 0) / 10000.0 if attrPerID else 0
             
+            beautyValue = beautyAttrDict.get(attrID, 0)
+            beautyPer = beautyAttrDict.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
@@ -721,6 +743,7 @@
                 
             lineupHaloValue, lineupHaloPer = lineupHaloAttrInfo.get(attrID, 0), 0
             fetterValue, fetterPer = fetterAttrDict.get(attrID, 0), 0
+            heroLVValue, heroLVPer = heroLVAttrDict.get(attrID, 0), 0
             starTalentValue, starTalentPer = starTalentAttrDict.get(attrID, 0), 0
             breakLVValue, breakLVPer = breakAttrDict.get(attrID, 0), 0
             awakeTalentValue, awakeTalentPer = awakeTalentAttrDict.get(attrID, 0), 0
@@ -728,15 +751,17 @@
                 heroSelfPer = selfAttrDict.get(attrPerID, 0) / 10000.0
                 lineupHaloPer = lineupHaloAttrInfo.get(attrPerID, 0) / 10000.0
                 fetterPer = fetterAttrDict.get(attrPerID, 0) / 10000.0
+                heroLVPer = heroLVAttrDict.get(attrPerID, 0) / 10000.0
                 starTalentPer = starTalentAttrDict.get(attrPerID, 0) / 10000.0
                 breakLVPer = breakAttrDict.get(attrPerID, 0) / 10000.0
                 awakeTalentPer = awakeTalentAttrDict.get(attrPerID, 0) / 10000.0
                 
             # 计算
             attrParamDict = {"lvValue":lvValue, "equipValue":equipValue, "bookValue":bookValue, "bookPer":bookPer, "realmValue":realmValue, "realmPer":realmPer, 
-                             "gubaoValue":gubaoValue, "gubaoPer":gubaoPer, "hjgValue":hjgValue, "hjgPer":hjgPer, "horseValue":horseValue, "horsePer":horsePer,
+                             "gubaoValue":gubaoValue, "gubaoPer":gubaoPer, "hjgValue":hjgValue, "hjgPer":hjgPer, "horseValue":horseValue, "horsePer":horsePer, 
+                             "beautyValue":beautyValue, "beautyPer":beautyPer,
                              "lineupInitAddPer":lineupInitAddPer, "lineupLVAddPer":lineupLVAddPer, "lineupBreakLVAddPer":lineupBreakLVAddPer, "lineupStarAddPer":lineupStarAddPer,
-                             "heroSelfValue":heroSelfValue, "heroSelfPer":heroSelfPer, "inheritPer":inheritPer,
+                             "heroSelfValue":heroSelfValue, "heroSelfPer":heroSelfPer, "inheritPer":inheritPer, "heroLVValue":heroLVValue, "heroLVPer":heroLVPer,
                              "lineupHaloValue":lineupHaloValue, "lineupHaloPer":lineupHaloPer, "fetterValue":fetterValue, "fetterPer":fetterPer,
                              "starTalentValue":starTalentValue, "starTalentPer":starTalentPer, "breakLVValue":breakLVValue, "breakLVPer":breakLVPer,
                              "awakeTalentValue":awakeTalentValue, "awakeTalentPer":awakeTalentPer,

--
Gitblit v1.8.0