From 29df5dafc63890a23a9a24d4b461fa3c707ccfcc Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期三, 23 一月 2019 09:57:03 +0800 Subject: [PATCH] 5924 【后端】【1.5.100】诛仙Boss功能(个推) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py index db39caa..8f3468d 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py @@ -37,6 +37,7 @@ #非VIP权限 Def_GeTui_FMT = -2 # 封魔坛 +Def_GeTui_ZhuXianBoss = -3 # 诛仙BOSS # 新玩家还没有脱机时间 有利于挽回流失玩家 g_NewGuyNoTJGTime = {} # {playerID:[playername,getuiid, tick]} @@ -99,7 +100,7 @@ return True return False - if geTuiType == Def_GeTui_FMT: + if geTuiType in [Def_GeTui_FMT, Def_GeTui_ZhuXianBoss]: # 封魔坛受VIP的关注BOSS开关影响 geTuiType = Def_Onoff_Boss @@ -235,8 +236,21 @@ return False g_FMTGeTuiLimit[playerID][bossID] = int(time.time()) - - + elif geTuiType == Def_GeTui_ZhuXianBoss: + if not cacheDict.get("CntMark_%s"%ChConfig.Def_FBMapID_ZhuXianBoss, 0): + return False + + # 比较频繁默认1小时通知一次 + if playerID not in g_FMTGeTuiLimit: + g_FMTGeTuiLimit[playerID] = {} + + lastTime = g_FMTGeTuiLimit[playerID].get(bossID, 0) + if lastTime != 0 and time.time() - lastTime < 3600: + # 离上次通知还没超过1小时 + return False + + g_FMTGeTuiLimit[playerID][bossID] = int(time.time()) + elif geTuiType == Def_Onoff_Boss: #重生boss killBossCntLimitDict = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 1, {}) @@ -253,6 +267,9 @@ if bossData.GetMapID() == ChConfig.Def_FBMapID_SealDemon: # 非VIP玩家 封魔坛个推 geTuiType = Def_GeTui_FMT + elif bossData.GetMapID() == ChConfig.Def_FBMapID_ZhuXianBoss: + # 非VIP玩家 诛仙BOSS个推 + geTuiType = Def_GeTui_ZhuXianBoss else: geTuiType = Def_Onoff_Boss @@ -296,6 +313,8 @@ if geTuiType == Def_GeTui_FMT: showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 1)%(npcName, npcLV)) # 文字信息 + elif geTuiType == Def_GeTui_ZhuXianBoss: + showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 5)%(npcName, npcLV)) # 文字信息 elif geTuiType == Def_Onoff_Boss: showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 2)%(bossData.GetSourceName(), npcName, npcLV)) # 文字信息 -- Gitblit v1.8.0