| | |
| | | import ReadChConfig
|
| | | import PlayerFamily
|
| | | import IPY_GameServer
|
| | | import PlayerFBHelpBattle
|
| | | import IpyGameDataPY
|
| | | import ShareDefine
|
| | | import ChConfig
|
| | |
|
| | |
| | | curCache.SetPlusDataNoSave(PlusData,len(PlusData))
|
| | | curCache.SetNeedSaveDB(isSaveDB) #设置需要保存到数据库
|
| | |
|
| | | # 同步更新助战信息
|
| | | if PlayerFBHelpBattle.IsInHelpBattleCheckInList(PlayerID):
|
| | | PropDataDict = eval(PropData)
|
| | | fightPower = PropDataDict.get("FightPower", 0)
|
| | | familyID = PropDataDict.get("FamilyID", 0)
|
| | | playerName = PropDataDict.get("Name", "")
|
| | | PlayerFBHelpBattle.UpdateCheckInPlayerInfo(PlayerID, fightPower, familyID, playerName)
|
| | | |
| | | #暂时关闭
|
| | | #===========================================================================
|
| | | # FamilyIDKey = "FamilyID"
|
| | |
| | | # @param PlayerID, PlayerLV
|
| | | # @return None
|
| | | def IsNeedSaveLogoutPlayer(PlayerID, PlayerLV):
|
| | | SaveDBLimitLV, NeedCheckBillBoardType, HighLadderLimitOrder = ReadChConfig.GetEvalChConfig("CacheSaveLimit")
|
| | | if PlayerFBHelpBattle.IsInHelpBattleCheckInList(PlayerID):
|
| | | return True
|
| | | |
| | | SaveDBLimitLV = IpyGameDataPY.GetFuncCfg("PlayerViewCache", 1)
|
| | | #校验玩家等级
|
| | | if PlayerLV < SaveDBLimitLV:
|
| | | return False
|
| | |
| | |
|
| | | # 上榜用户
|
| | | def IsNeedSaveViewCacheAllInfo(PlayerID):
|
| | | SaveDBLimitLV, NeedCheckBillBoardType, HighLadderLimitOrder = ReadChConfig.GetEvalChConfig("CacheSaveLimit")
|
| | | if PlayerFBHelpBattle.IsInHelpBattleCheckInList(PlayerID):
|
| | | return True
|
| | | NeedCheckBillBoardType = IpyGameDataPY.GetFuncEvalCfg("PlayerViewCache", 2)
|
| | | #校验玩家是否上排行榜
|
| | | billboardMgr = GameWorld.GetBillboard()
|
| | | for BillBoardType in NeedCheckBillBoardType:
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, answerPack)
|
| | | return
|
| | |
|
| | | def OnPlayerLeaveFamily(playerID):
|
| | | GameWorld.DebugLog("ViewCache->OnPlayerLeaveFamily", playerID)
|
| | | def OnPlayerFamilyChange(playerID, familyID, familyName):
|
| | | GameWorld.DebugLog("ViewCache->OnPlayerFamilyChange", playerID)
|
| | | curCache = ViewCacheMgr.FindCache(playerID)
|
| | | if not curCache:
|
| | | return
|
| | | PropData = eval(curCache.GetPropData())
|
| | | PropData["FamilyID"] = 0
|
| | | PropData["FamilyName"] = ""
|
| | | PropData["FamilyID"] = familyID
|
| | | PropData["FamilyName"] = familyName
|
| | | playerLV = PropData["LV"]
|
| | |
|
| | | PropData = json.dumps(PropData, ensure_ascii=False)
|