From c75ed6ee971145d2ebab03b6c1c5bb3bfada0400 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 21 五月 2019 11:14:18 +0800 Subject: [PATCH] 6883 【2.0】【后端】灵根激活界面优化 --- ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py index b301cf4..bed0a52 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py @@ -16,11 +16,12 @@ # 详细描述: 设置合服 # #-------------------------------------------------------------------- -"""Version = 2014-12-03 18:30""" - +#"""Version = 2014-12-03 18:30""" +#-------------------------------------------------------------------- import GameWorld import PlayerDBGSEvent import PlayerEventCounter +import GameWorldProcess import ShareDefine import GMCommon #--------------------------------------------------------------------- @@ -33,31 +34,33 @@ def OnExec(curPlayer, cmdList): if len(cmdList) <= 0: - GameWorld.DebugAnswer(curPlayer, 'SetMixServer 合服状态(0-非合服,1-合服) 合服时的开服天(选填默认15)') + GameWorld.DebugAnswer(curPlayer, 'SetMixServer 是否合服') return isMix = cmdList[0] - curDay = cmdList[1] if len(cmdList) > 1 else 15 - + PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer, 1 if isMix else 0) + PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay, 0) + PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServerInitOK, 0) if isMix: - #设置合服(默认设置开服天为15天) - PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer, 1) - PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay, 0) - PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServerInitOK, 0) - else: - #重置开服天,设置非合服 - PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer, 0) - PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay, 0) - PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay, curDay) - + openDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + if openDay <= 14: + openDay = 15 + openDay += 1 + PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay, openDay) # 为了变更合服时的开服天标记,这里每次默认加1 + GameWorldProcess.__DoMixServerInit() + openDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) isMixServer = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer) mixServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay) + lastMixServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_LastMixServerDay) + lastMixServerWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_LastMixServerWorldLV) GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ServerDay, openDay) GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_IsMixServer, isMixServer) GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_MixServerDay, mixServerDay) - + GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_LastMixServerDay, lastMixServerDay) + GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_LastMixServerWorldLV, lastMixServerWorldLV) + # 刷新一次活动 tick = GameWorld.GetGameWorld().GetTick() GMCommon.ActionControlRefresh(tick) -- Gitblit v1.8.0