From ba9ac7c41060991bf34d8cad6db8f255561b712c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 27 九月 2018 18:45:42 +0800
Subject: [PATCH] 3906 【后端】新增宝箱开启规则次数特定定制产出; 增加GM命令重置宝箱开启次数: SetChestsUseCount
---
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