| | |
| | | import ShareDefine
|
| | | import CommFunc
|
| | | import ChConfig
|
| | | import time
|
| | |
|
| | | class PlayerViewCache():
|
| | |
|
| | |
| | | def SetFacePic(self, facePic): self.__dbData.FacePic = facePic
|
| | | def GetModelMark(self): return self.__dbData.ModelMark
|
| | | def SetModelMark(self, modelMark): self.__dbData.ModelMark = modelMark
|
| | | def GetEquipShowSwitch(self): return self.__dbData.EquipShowSwitch
|
| | | def SetEquipShowSwitch(self, equipShowSwitch): self.__dbData.EquipShowSwitch = equipShowSwitch
|
| | | def GetFamilyID(self): return self.__dbData.FamilyID
|
| | | def SetFamilyID(self, familyID): self.__dbData.FamilyID = familyID
|
| | | def GetFamilyName(self): return self.__dbData.FamilyName
|
| | |
| | | if playerID in self.__viewCacheDict:
|
| | | return
|
| | | viewCache = PlayerViewCache(dbData)
|
| | | if not viewCache.GetOffTime(): # 无值时默认离线时间为当前,适用于机器人、假人、重启加载数据时修正异常在线状态
|
| | | viewCache.SetOffTime(int(time.time()))
|
| | | self.__viewCacheList.append(viewCache)
|
| | | self.__viewCacheDict[playerID] = viewCache
|
| | | self.__needSort = True
|