From 369e6b891612b94efc19918476fcdf6ec5de74ea Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 05 十一月 2018 14:54:05 +0800 Subject: [PATCH] 4562 【后端】【1.2.0】仙界盛典新增时间配置支持(支持活动5点开启,0点关闭) - 新增活动重置类型2 --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py index 24f82af..e94851e 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py +++ b/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() @@ -279,4 +281,20 @@ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) NetPackCommon.SendFakePack(curPlayer, answerPack) return - \ No newline at end of file + +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 + -- Gitblit v1.8.0