From 8dabd16a2b668b73b6139b0d4d443b896d7d312f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 19 九月 2018 13:54:32 +0800
Subject: [PATCH] fix:3623 子 任务修改 / 【后端】增加洗练至X级时触发的接口
---
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