ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
@@ -27,6 +27,7 @@
import FormulaControl
import PlayerPrestigeSys
import GameLogic_Dingjunge
import OpenServerActivity
import PlayerMingge
import PlayerBeauty
import PlayerHorse
@@ -34,7 +35,6 @@
import PlayerHero
import PlayerHJG
import GameWorld
import ChPlayer
import ChConfig
import ChEquip
@@ -94,6 +94,7 @@
        self._effectiveCardDict[heroID] = [cardAddPer, itemIndex, inThis]
        return
        
    def GetEffectiveCardDict(self): return self._effectiveCardDict
    def SetEffectiveCardDict(self, effectiveCardDict): self._effectiveCardDict = effectiveCardDict
    def GetEffCardAddPer(self):
        effCardAddPer = 0
@@ -234,6 +235,11 @@
    def GetCalcSpecInfo(self, calcIndex, presetID=0):
        calcKey = (calcIndex, presetID) if presetID else calcIndex
        return self._calcSpecEffDict.get(calcKey, {})
    def SetCalcSpecInfo(self, calcKey, specEffInfo, presetID=0):
        # @param calcKey: 与calcIndex公用,只是使用其他自定义key,一般用于同个属性功能点,但是又需要区分不同的子功能点时可用
        calcKey = (calcKey, presetID) if presetID else calcKey
        self._calcSpecEffDict[calcKey] = specEffInfo
        return
    def GetCalcAttr(self, calcIndex, presetID=0):
        calcKey = (calcIndex, presetID) if presetID else calcIndex
        return self._calcAttrDict.get(calcKey, {})
@@ -619,6 +625,7 @@
    for syncItem in syncItemDict.values():
        syncItem.Sync_Item()
        
    OpenServerActivity.UpdOSA_HeroTrainBillboard(curPlayer) # 重载生效卡
    return
def getHeroCardAddPer(heroItem):
@@ -636,7 +643,7 @@
    star = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroStar)
    breakLV = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroBreakLV)
    
    starMax = PlayerHero.GetHeroStarMax(heroItem)
    starMax = PlayerHero.GetHeroStarMax(heroID, heroItem)
    addPer = qualityIpyData.GetInitAddPer()
    addPer += qualityIpyData.GetLVAddPer() * max(0, heroLV - 1)
    addPer += qualityIpyData.GetBreakLVAddPer() * breakLV
@@ -750,6 +757,7 @@
    countryHeroInfo = {} # 国家武将统计 {country:[heroID, ...], ...}
    fetterHeroInfo = {} # 阵容羁绊武将统计信息 {fetterID:[heroID, ...], ...}
    heroSelfAttrInfo = {} # 武将自身属性 {heroID:{attrID:value, ...}, ...}
    heroSkinAttrInfo = {} # 武将时装属性 {heroID:{attrID:value, ...}, ...}
    heroLVAttrInfo = {} # 武将等级属性 {heroID:{attrID:value, ...}, ...}
    heroStarTalentInfo = {} # 武将星级天赋属性 {heroID:{attrID:value, ...}, ...}
    heroBreakAttrInfo = {} # 武将突破潜能属性 {heroID:{attrID:value, ...}, ...}
@@ -808,6 +816,27 @@
        for k, v in heroIpyData.GetBatAttrDict().items():
            selfAttrDict[int(k)] = v
        heroSelfAttrInfo[heroID] = selfAttrDict
        # 时装属性
        attrSkinID = 0
        attrSkinIndex = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroSkinAttr)
        if attrSkinIndex < 0 or attrSkinIndex >= len(skinIDList):
            attrSkinID = skinIDList[0]
        elif skinIDList:
            attrSkinID = skinIDList[attrSkinIndex]
        heroSkinAttrDict = {}
        skinIpyData = IpyGameDataPY.GetIpyGameDataNotLog("HeroSkinAttr", attrSkinID)
        if skinIpyData:
            skinStar = PlayerHero.GetHeroSkinStar(curPlayer, attrSkinID)
            wearAttrIDList = skinIpyData.GetWearAttrIDList()
            wearAttrValueList = skinIpyData.GetWearAttrValueList()
            wearAttrPerStarAddList = skinIpyData.GetWearAttrPerStarAddList()
            for i in range(min(len(wearAttrIDList), len(wearAttrValueList))):
                attrID = wearAttrIDList[i]
                attrValuePerStar = wearAttrPerStarAddList[i] if len(wearAttrPerStarAddList) > i else 0
                attrValue = wearAttrValueList[i] + attrValuePerStar * skinStar
                heroSkinAttrDict[attrID] = heroSkinAttrDict.get(attrID, 0) + attrValue
        heroSkinAttrInfo[heroID] = heroSkinAttrDict
        
        # 等级属性
        heroLVAttrDict = {}
@@ -950,6 +979,7 @@
    lvAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_LV)
    equipAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_MainEquip)
    fatesAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_HeroFates)
    skinAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_HeroSkin)
    realmAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_Realm)
    gubaoAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_Gubao)
    hjgAttrDict = olPlayer.GetCalcAttr(ChConfig.Def_CalcAttr_HJG)
@@ -962,6 +992,7 @@
    GameWorld.DebugLog("    国家武将统计=%s" % countryHeroInfo, playerID)
    GameWorld.DebugLog("    羁绊武将统计=%s" % fetterHeroInfo, playerID)
    GameWorld.DebugLog("    武将自身属性=%s" % heroSelfAttrInfo, playerID)
    GameWorld.DebugLog("    穿戴时装属性=%s" % heroSkinAttrInfo, playerID)
    GameWorld.DebugLog("    武将等级属性=%s" % heroLVAttrInfo, playerID)
    GameWorld.DebugLog("    武将吞噬属性=%s" % heroStarTalentInfo, playerID)
    GameWorld.DebugLog("    武将突破潜能=%s" % heroBreakAttrInfo, playerID)
@@ -972,6 +1003,7 @@
    GameWorld.DebugLog("    主公等级属性=%s" % lvAttrDict, playerID)
    GameWorld.DebugLog("    主公装备属性=%s" % equipAttrDict, playerID)
    GameWorld.DebugLog("    主公宿缘属性=%s" % fatesAttrDict, playerID)
    GameWorld.DebugLog("    主公全体时装=%s" % skinAttrDict, playerID)
    GameWorld.DebugLog("    主公官职属性=%s" % realmAttrDict, playerID)
    GameWorld.DebugLog("    主公古宝属性=%s" % gubaoAttrDict, playerID)
    GameWorld.DebugLog("    主幻境阁属性=%s" % hjgAttrDict, playerID)
@@ -1011,6 +1043,7 @@
        lineupHero.heroBatAttrDict = {}
        lineupHero.fightPower = 0
        
        heroSkinAttrDict = heroSkinAttrInfo.get(heroID, {})
        heroLVAttrDict = heroLVAttrInfo.get(heroID, {})
        starTalentAttrDict = heroStarTalentInfo.get(heroID, {})
        breakAttrDict = heroBreakAttrInfo.get(heroID, {})
@@ -1031,6 +1064,9 @@
                
            fatesValue = fatesAttrDict.get(attrID, 0)
            fatesPer = fatesAttrDict.get(attrPerID, 0) / 10000.0 if attrPerID else 0
            skinValue = skinAttrDict.get(attrID, 0)
            skinPer = skinAttrDict.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
@@ -1062,6 +1098,7 @@
                
            lineupHaloValue, lineupHaloPer = lineupHaloAttrInfo.get(attrID, 0), 0
            fetterValue, fetterPer = fetterAttrDict.get(attrID, 0), 0
            heroSkinValue, heroSkinPer = heroSkinAttrDict.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
@@ -1070,6 +1107,7 @@
                heroSelfPer = selfAttrDict.get(attrPerID, 0) / 10000.0
                lineupHaloPer = lineupHaloAttrInfo.get(attrPerID, 0) / 10000.0
                fetterPer = fetterAttrDict.get(attrPerID, 0) / 10000.0
                heroSkinPer = heroSkinAttrDict.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
@@ -1078,9 +1116,10 @@
            # 计算
            attrParamDict = {"lvValue":lvValue, "equipValue":equipValue, "realmValue":realmValue, "realmPer":realmPer, "cardPer":cardPer,
                             "gubaoValue":gubaoValue, "gubaoPer":gubaoPer, "hjgValue":hjgValue, "hjgPer":hjgPer, "horseValue":horseValue, "horsePer":horsePer,
                             "beautyValue":beautyValue, "beautyPer":beautyPer, "fatesValue":fatesValue, "fatesPer":fatesPer,
                             "beautyValue":beautyValue, "beautyPer":beautyPer, "fatesValue":fatesValue, "fatesPer":fatesPer, "skinValue":skinValue, "skinPer":skinPer,
                             "dingjungeValue":dingjungeValue, "dingjungePer":dingjungePer, "minggeValue":minggeValue, "minggePer":minggePer,
                             "heroSelfValue":heroSelfValue, "heroSelfPer":heroSelfPer, "inheritPer":inheritPer, "heroLVValue":heroLVValue, "heroLVPer":heroLVPer,
                             "heroSelfValue":heroSelfValue, "heroSelfPer":heroSelfPer, "inheritPer":inheritPer, "heroLVValue":heroLVValue, "heroLVPer":heroLVPer,
                             "heroSkinValue":heroSkinValue, "heroSkinPer":heroSkinPer,
                             "lineupHaloValue":lineupHaloValue, "lineupHaloPer":lineupHaloPer, "fetterValue":fetterValue, "fetterPer":fetterPer,
                             "starTalentValue":starTalentValue, "starTalentPer":starTalentPer, "breakLVValue":breakLVValue, "breakLVPer":breakLVPer,
                             "awakeTalentValue":awakeTalentValue, "awakeTalentPer":awakeTalentPer,