hxp
2018-08-16 55a578c93248a0a88a63e8f96daf0f0fc8c525dd
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
@@ -27,8 +27,10 @@
import PlayerFamily
import IPY_GameServer
import ShareDefine
import time
import ChConfig
import time
import json
ViewCacheMgr = GameWorld.GameWorldData.GetPlayerViewCacheMgr()
@@ -280,3 +282,19 @@
    NetPackCommon.SendFakePack(curPlayer, answerPack)
    return
    
def OnPlayerLeaveFamily(playerID):
    GameWorld.DebugLog("ViewCache->OnPlayerLeaveFamily", playerID)
    curCache = ViewCacheMgr.FindCache(playerID)
    if not curCache:
        return
    PropData = eval(curCache.GetPropData())
    PropData["FamilyID"] = 0
    PropData["FamilyName"] = ""
    playerLV = PropData["LV"]
    PropData = json.dumps(PropData, ensure_ascii=False)
    ItemData = curCache.GetItemData()
    PlusData = curCache.GetPlusData()
    UpdatePlayerCache(playerID, PropData, ItemData, PlusData, True if playerLV > 150 else False)
    return