From 9ba17f30e36a856861f1774567f6bd2a5114b9f0 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 04 十二月 2018 14:33:45 +0800 Subject: [PATCH] 4860 【后端】【1.3.100】新增退出仙盟,需要12小时才能再退出仙盟 --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py index f93b284..2a94c9b 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py @@ -1492,6 +1492,20 @@ if GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss): PlayerControl.NotifyCode(curPlayer, "FairyGrabBossExitError") return + #判断退出时间间隔 + curTime = int(time.time()) + lastLeaveFamilyTime = PlayerControl.GetLeaveFamilyTime(curPlayer) + if lastLeaveFamilyTime > 100: + remainTime = IpyGameDataPY.GetFuncCfg('ExitFairyTime', 2) - (curTime - lastLeaveFamilyTime) + if remainTime > 0: + PlayerControl.NotifyCode(curPlayer, "ExitFairyTime", [remainTime*1000]) + return + updTime = 1 if IpyGameDataPY.GetFuncCfg('ExitFairyTime') > 1 else curTime + elif lastLeaveFamilyTime >= IpyGameDataPY.GetFuncCfg('ExitFairyTime')-1: + updTime = curTime + else: + updTime = lastLeaveFamilyTime+1 + PlayerControl.SetLeaveFamilyTime(curPlayer, updTime) #XW_JZ_LeaveFamily <n color="0,190,255">{%S1%}</n><n color="255,255,0">退出了家族!</n> 25 - - NotifyAllFamilyMemberMsg(curFamily, curPlayer, "XW_JZ_LeaveFamily", [curPlayer.GetName()]) @@ -1507,7 +1521,7 @@ __DoPlayerLeaveFamilyByID(curFamily, curPlayerID) DataRecordPack.DR_PlayerLeaveFamily(curPlayer, curFamily.GetID(), curFamily.GetName(), curFamily.GetCount(), - familyLV, curPlayer.GetPlayerID(), curPlayer.GetName(), familyLV) + familyLV, curPlayer.GetPlayerID(), curPlayer.GetName(), familyLV, updTime) if curFamily.GetCount() == 0: #玩家离开后, 家族没有人了 , 删除这个家族 -- Gitblit v1.8.0