| | |
| | | curCache.SetFace(curPlayer.GetFace())
|
| | | curCache.SetFacePic(curPlayer.GetFacePic())
|
| | | curCache.SetModelMark(curPlayer.GetModelMark())
|
| | | curCache.SetEquipShowSwitch(curPlayer.GetEquipShowSwitch())
|
| | | curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
|
| | | curCache.SetFamilyID(familyID)
|
| | | curCache.SetFamilyName(family.GetName() if family else "")
|
| | | curCache.SetFamilyEmblemID(family.GetEmblemID() if family else 0)
|
| | | curCache.SetFamilyEmblemWord(family.GetEmblemWord() if family else "")
|
| | | curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
|
| | | curCache.SetFightPowerTotal(PlayerControl.GetFightPower(curPlayer))
|
| | | curCache.SetServerID(GameWorld.GetPlayerServerID(curPlayer))
|
| | | if isOffline:
|
| | |
| | |
|
| | | # 其他
|
| | |
|
| | | plusDict= {"Equip":equipDict, "Lineup":lineupDict}
|
| | | plusDict = {"Equip":equipDict, "Lineup":lineupDict}
|
| | | curCache.SetPlusDict(plusDict)
|
| | |
|
| | | return curCache
|
| | |
| | | curCache.SetFace(dbPlayer.Face)
|
| | | curCache.SetFacePic(dbPlayer.FacePic)
|
| | | curCache.SetModelMark(dbPlayer.ModelMark)
|
| | | curCache.SetEquipShowSwitch(dbPlayer.EquipShowSwitch)
|
| | | curCache.SetTitleID(dbPlayer.ExAttr3)
|
| | | curCache.SetFamilyID(familyID)
|
| | | family = DBDataMgr.GetFamilyMgr().FindFamily(familyID) if familyID else None
|
| | | curCache.SetFamilyName(family.GetName() if family else "")
|
| | | curCache.SetFamilyEmblemID(family.GetEmblemID() if family else 0)
|
| | | curCache.SetFamilyEmblemWord(family.GetEmblemWord() if family else "")
|
| | | #curCache.SetTitleID(PlayerControl.GetTitleID(curPlayer))
|
| | | curCache.SetFightPowerTotal(dbPlayer.FightPowerEx * ChConfig.Def_PerPointValue + dbPlayer.FightPower)
|
| | | curCache.SetServerID(GameWorld.GetAccIDServerID(dbPlayer.AccID))
|
| | | curCache.SetOffTime(GameWorld.ChangeTimeStrToNum(dbPlayer.LogoffTime) if dbPlayer.LogoffTime else 0)
|
| | | return curCache
|
| | |
|
| | | def GetPlayerBaseViewInfo(playerID, curPlayer=None):
|
| | | ## 获取玩家基础查看信息
|
| | | baseInfo = {}
|
| | | if not curPlayer:
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
|
| | | if curPlayer:
|
| | | baseInfo = {
|
| | | "Name":curPlayer.GetPlayerName(),
|
| | | "LV":curPlayer.GetLV(),
|
| | | "Job":curPlayer.GetJob(),
|
| | | "RealmLV":curPlayer.GetOfficialRank(),
|
| | | "Face":curPlayer.GetFace(),
|
| | | "FacePic":curPlayer.GetFacePic(),
|
| | | "TitleID":PlayerControl.GetTitleID(curPlayer),
|
| | | "ServerID":GameWorld.GetPlayerServerID(curPlayer),
|
| | | "FightPower":PlayerControl.GetFightPower(curPlayer),
|
| | | }
|
| | | else:
|
| | | viewCache = FindViewCache(playerID)
|
| | | if viewCache:
|
| | | baseInfo = {
|
| | | "Name":viewCache.GetPlayerName(),
|
| | | "LV":viewCache.GetLV(),
|
| | | "Job":viewCache.GetJob(),
|
| | | "RealmLV":viewCache.GetRealmLV(),
|
| | | "Face":viewCache.GetFace(),
|
| | | "FacePic":viewCache.GetFacePic(),
|
| | | "TitleID":viewCache.GetTitleID(),
|
| | | "ServerID":viewCache.GetServerID(),
|
| | | "FightPower":viewCache.GetFightPowerTotal(),
|
| | | }
|
| | | return baseInfo
|
| | |
|
| | | def GetRobotByViewCache(curCache):
|
| | | ## 根据缓存内容获取机器人数据
|
| | |
| | | "RealmLV" : curCache.GetRealmLV(),
|
| | | "Face" : curCache.GetFace(),
|
| | | "FacePic" : curCache.GetFacePic(),
|
| | | "TitleID" : curCache.GetTitleID(),
|
| | | "ModelMark" : curCache.GetModelMark(),
|
| | | "EquipShowSwitch" : curCache.GetEquipShowSwitch(),
|
| | | "FightPower" : curCache.GetFightPowerTotal(),
|
| | | "PlusData" : curCache.GetPlusDict(),
|
| | | }
|
| | |
| | | curCache.SetRealmLV(robotInfo.get("RealmLV", 0))
|
| | | curCache.SetFace(robotInfo.get("Face", 0))
|
| | | curCache.SetFacePic(robotInfo.get("FacePic", 0))
|
| | | curCache.SetTitleID(robotInfo.get("TitleID", 0))
|
| | | curCache.SetModelMark(robotInfo.get("ModelMark", 0))
|
| | | curCache.SetEquipShowSwitch(robotInfo.get("EquipShowSwitch", 0))
|
| | | #机器人暂定没有仙盟、称号
|
| | | #curCache.SetFamilyID(familyID)
|
| | | #family = DBDataMgr.GetFamilyMgr().FindFamily(familyID)
|
| | |
| | | clientPack.Face = curCache.GetFace()
|
| | | clientPack.FacePic = curCache.GetFacePic()
|
| | | clientPack.ModelMark = curCache.GetModelMark()
|
| | | clientPack.EquipShowSwitch = curCache.GetEquipShowSwitch()
|
| | | clientPack.TitleID = curCache.GetTitleID()
|
| | | clientPack.ServerID = curCache.GetServerID()
|
| | | clientPack.FightPower = curCache.GetFightPower()
|