| | |
| | | #---------------------------------------------------------------------
|
| | |
|
| | | import GameWorld
|
| | | import GameWorship
|
| | | import PlayerControl
|
| | | import NetPackCommon
|
| | | import GameWorldArena
|
| | |
| | | return True
|
| | |
|
| | | if CrossChampionship.IsChampionshipPlayer(playerID):
|
| | | return True
|
| | | |
| | | if GameWorship.IsWorshipPlayer(playerID):
|
| | | return True
|
| | |
|
| | | if GameWorldSkyTower.IsSkyTowerPassPlayer(playerID):
|
| | |
| | |
|
| | | def GetCachePropDataDict(curCache):
|
| | | ## 获取缓存基础属性字典信息
|
| | | if not curCache:
|
| | | return {}
|
| | | if not hasattr(curCache, "PropDataDict"):
|
| | | curCache.PropDataDict = {}
|
| | | if not curCache.PropDataDict and curCache.PropData:
|
| | |
| | | return
|
| | | curCache.LV = curPackData.PlayerLV
|
| | | curCache.OffTime = curPackData.OffTime
|
| | | if isLogout:
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
|
| | | if curPlayer:
|
| | | curCache.GeTuiID = curPlayer.GetGeTuiClientID()
|
| | | curCache.GeTuiIDSize = len(curCache.GeTuiID)
|
| | | |
| | | |
| | | curCache.PropDataDict = {} # 每次更新数据时,重置字典缓存,下次获取时重新eval缓存
|
| | | curCache.PropData = curPackData.PropData
|
| | | curCache.PropDataSize = curPackData.PropDataSize
|
| | |
| | | answerPack.RealmLV = 1
|
| | | answerPack.OnlineType = ChConfig.Def_Offline
|
| | | answerPack.ServerGroupID = 0
|
| | | answerPack.Face = 0
|
| | | else:
|
| | | cacheDict = GetCachePropDataDict(curCache)
|
| | | answerPack.PlayerID = clientPack.PlayerID
|
| | |
| | | answerPack.LV = cacheDict["LV"]
|
| | | answerPack.RealmLV = cacheDict["RealmLV"]
|
| | | answerPack.OnlineType = ChConfig.Def_Offline
|
| | | answerPack.Face = cacheDict.get("Face", 0)
|
| | |
|
| | | if GameWorld.IsCrossServer():
|
| | | answerPack.ServerGroupID = cacheDict.get("ServerGroupID", 0)
|
| | |
| | | answerPack.OnlineType = ChConfig.Def_Online
|
| | | answerPack.IsInTeam = tagPlayer.GetTeamID() > 0
|
| | | answerPack.ServerGroupID = PlayerControl.GetPlayerServerGroupID(tagPlayer)
|
| | | answerPack.Face = tagPlayer.GetFace()
|
| | |
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | NetPackCommon.SendFakePack(curPlayer, answerPack)
|