hxp
2024-10-15 f6a81cd4102012a3d8425d42ef1acab76c71147e
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
@@ -205,22 +205,23 @@
                     "LV":cacheDict["LV"], 
                     "RealmLV":cacheDict["RealmLV"], 
                     }
    if "PlayerID" in exAttrs:
        shotCacheDict["PlayerID"] = playerID
    if "FightPower" in exAttrs:
        shotCacheDict["FightPower"] = cacheDict["FightPower"]
    if "ServerID" in exAttrs:
        shotCacheDict["ServerID"] = GameWorld.GetAccIDServerID(cacheDict["AccID"])
    if "OfflineValue" in exAttrs:
        olMgr = ChPlayer.GetOnlinePlayerMgr()
        shotCacheDict["OfflineValue"] = olMgr.GetOfflineValue(playerID, viewCache)
    # 附带外观模型展示相关
    if "Model" in exAttrs:
        shotCacheDict.update({
                              "TitleID":cacheDict.get("TitleID", 0),
                              "EquipShowSwitch":cacheDict.get("EquipShowSwitch", 0),
                              "EquipShowID":cacheDict.get("EquipShowID", []),
                              })
    for attrName in exAttrs:
        if attrName == "PlayerID":
            shotCacheDict["PlayerID"] = playerID
        elif attrName == "ServerID":
            shotCacheDict["ServerID"] = GameWorld.GetAccIDServerID(cacheDict["AccID"])
        elif attrName == "OfflineValue":
            olMgr = ChPlayer.GetOnlinePlayerMgr()
            shotCacheDict["OfflineValue"] = olMgr.GetOfflineValue(playerID, viewCache)
        # 附带外观模型展示相关
        elif attrName == "Model":
            shotCacheDict.update({
                                  "TitleID":cacheDict.get("TitleID", 0),
                                  "EquipShowSwitch":cacheDict.get("EquipShowSwitch", 0),
                                  "EquipShowID":cacheDict.get("EquipShowID", []),
                                  })
        elif attrName in cacheDict:
            shotCacheDict[attrName] = cacheDict[attrName]
    return shotCacheDict
def GetSyncCrossCacheBase(curPlayer):
@@ -234,6 +235,8 @@
                 "Job":curPlayer.GetJob(),
                 "VIPLV":curPlayer.GetVIPLv(),
                 "Name":CrossRealmPlayer.GetCrossPlayerName(curPlayer),
                 "Face":curPlayer.GetFace(),
                 "FacePic":curPlayer.GetFacePic(),
                 "FamilyID":curPlayer.GetFamilyID(),
                 "FamilyName":cacheDict.get("FamilyName", ""),
                 "TitleID":cacheDict.get("TitleID", 0),
@@ -429,6 +432,7 @@
            answerPack.OnlineType = ChConfig.Def_Offline
            answerPack.ServerGroupID = 0
            answerPack.Face = 0
            answerPack.FacePic = 0
        else:
            cacheDict = GetCachePropDataDict(curCache)
            answerPack.PlayerID = clientPack.PlayerID
@@ -438,6 +442,7 @@
            answerPack.RealmLV = cacheDict["RealmLV"]
            answerPack.OnlineType = ChConfig.Def_Offline
            answerPack.Face = cacheDict.get("Face", 0)
            answerPack.FacePic = cacheDict.get("FacePic", 0)
            
            if GameWorld.IsCrossServer():
                answerPack.ServerGroupID = cacheDict.get("ServerGroupID", 0)
@@ -453,6 +458,7 @@
        answerPack.IsInTeam = tagPlayer.GetTeamID() > 0
        answerPack.ServerGroupID = PlayerControl.GetPlayerServerGroupID(tagPlayer)
        answerPack.Face = tagPlayer.GetFace()
        answerPack.FacePic = tagPlayer.GetFacePic()
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    NetPackCommon.SendFakePack(curPlayer, answerPack)