From c460ba101b333af9ea4d694fa1fa5f6489a99c9c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 06 十二月 2024 14:56:56 +0800 Subject: [PATCH] 1111 【越南】【英文】【bt】【砍树】物品类型65支持通过使用转为对应货币 --- ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py | 63 ++++++++++--------------------- 1 files changed, 21 insertions(+), 42 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py index 658a5c8..bed0a52 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/SetMixServer.py @@ -16,14 +16,12 @@ # 详细描述: 设置合服 # #-------------------------------------------------------------------- -"""Version = 2014-12-03 18:30""" - +#"""Version = 2014-12-03 18:30""" +#-------------------------------------------------------------------- import GameWorld import PlayerDBGSEvent import PlayerEventCounter -import GameWorldActionTeHui -import GameWorldMixServerCampaign -import PlayerBillboard +import GameWorldProcess import ShareDefine import GMCommon #--------------------------------------------------------------------- @@ -36,60 +34,41 @@ 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: - #(清世界等级) - PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv, 0) - #通知地图服务器当前世界等级 - GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_WorldAverageLv, 0) + openDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + if openDay <= 14: + openDay = 15 + openDay += 1 + PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay, openDay) # 为了变更合服时的开服天标记,这里每次默认加1 + GameWorldProcess.__DoMixServerInit() - #设置合服(默认设置开服天为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) 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) - PlayerEventCounter.Sync_OpenServerDay(curPlayer) - - GameWorldMixServerCampaign.UpdateMixServerCampaignState(True) - - # 清除合服活动相关排行榜 - for copyType in GameWorldMixServerCampaign.Def_MixAward_Billboard_Copy_Dict.values(): - PlayerBillboard.ClearBillboardByIndex(copyType) - for billboardCampaignType in ShareDefine.Def_MixCampaign_Billboard_Dict.values(): - PlayerBillboard.ClearBillboardByIndex(billboardCampaignType) - - # 重置数据记录及领奖状态 - for campaignType in ShareDefine.Def_Campaign_Type_List: - GameWorld.GetGameWorld().SetDict(ShareDefine.Def_Notify_WorldKey_MixServerCampaignSaveData % campaignType, 0) - GameWorld.GetGameWorld().SetDict(ShareDefine.Def_Notify_WorldKey_MixServerCampaignGetAward % campaignType, 0) - - # 清除特惠活动数据 - GameWorldActionTeHui.OnGMClearTeHui() - # 刷新一次活动 tick = GameWorld.GetGameWorld().GetTick() GMCommon.ActionControlRefresh(tick) + PlayerEventCounter.Sync_OpenServerDay(curPlayer) GameWorld.DebugAnswer(curPlayer, '设置合服状态成功!当前开服天数:%s, 是否合服:%s, 当前合服天数:%s' - % (openDay, isMixServer, mixServerDay)) + % (PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1, + PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer), + PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay) + 1)) return -- Gitblit v1.8.0