public bool GotoWorshipMeeting(params object[] args) { if (!SysConfigManager.GetInstance().CheckSysHasOpened(GameConst.SYS_OPEN_WORSHIP_MEETING, true)) { return(false); } if (!ActivityHelper.IsActivityOpen(GameConst.SYS_OPEN_WORSHIP_MEETING, true)) { return(false); } if (!CheckSysDownloaded(GameConst.SYS_OPEN_WORSHIP_MEETING)) { return(false); } UIManager.GetInstance().ShowSysWindow("UIWorshipMeetingEnterWindow"); return(true); }
public bool GotoArena(params object[] args) { if (!SysConfigManager.GetInstance().CheckSysHasOpened(GameConst.SYS_OPEN_ARENA, true)) { return(false); } if (!CheckSysDownloaded(GameConst.SYS_OPEN_ARENA)) { return(false); } if (!ActivityHelper.IsActivityOpen(GameConst.SYS_OPEN_ARENA, true)) { return(false); } UIManager.GetInstance().ShowSysWindow("UIArenaMainWindow"); return(true); }
/// <summary> /// 响应网络消息 /// </summary> /// <param name="protocol"></param> /// <param name="data"></param> private void HandleServerData(ushort protocol, byte[] data) { switch (protocol) { case NetMsg.MSG_PLAYER_SYS_OPEN_INFO: // 系统开放列表的消息 { var pack = S2CPackBase.DeserializePack <S2CPlayerSysOpenInfo>(data); mRawOpenSysIds = pack.sys_ids; //送审 的时候过滤系统 AuditManager.Instance.FilterSystemWhenAudit(pack.sys_ids); if (mWaitNetMsg[NetMsg.MSG_PLAYER_SYS_OPEN_INFO] == false) { mWaitNetMsg[NetMsg.MSG_PLAYER_SYS_OPEN_INFO] = true; CheckSysOpenCondition(); } } break; case NetMsg.MSG_PLAYER_NOTIFY_SYS_CLOSE: // 系统关闭 { var pack = S2CPackBase.DeserializePack <S2CPlayerNotifySysClose>(data); for (int i = 0; i < pack.sys_ids.Count; i++) { HandleNotifySysClose(pack.sys_ids[i]); } } break; case NetMsg.MSG_PLAYER_NOTIFY_SYS_OPEN: // 系统开启 { var pack = S2CPackBase.DeserializePack <S2CPlayerNotifySysOpen>(data); var db_sys_config = DBManager.GetInstance().GetDB <DBSysConfig>(); //送审 的时候过滤系统 AuditManager.Instance.FilterSystemWhenAudit(pack.sys_ids); bool fire = mWaitingSysList.Count == 0 ?true:false; for (int i = 0; i < pack.sys_ids.Count; i++) { var sys_id = pack.sys_ids[i]; var sys_config = db_sys_config.GetConfigById(sys_id); if (sys_config == null) { continue; } bool is_open = true; if (sys_config.IsActivity) // 活动类型的系统需要检查活动是否开启 { is_open = ActivityHelper.IsActivityOpen(sys_config.Id); } if (is_open) { HandleNotifySysOpen(sys_id); } else // 如果活动未开启,也需要加入到系统开启列表中 { if (!mRawOpenSysIds.Contains(sys_id)) { mRawOpenSysIds.Add(sys_id); } } // 获取需要关闭的系统按钮列表 var sysIdList = db_sys_config.GetRelationSysById(sys_id); if (sysIdList != null) { foreach (var id in sysIdList) { CloseSys(id); } } } mWaitingSysList.Sort(); if (fire && mWaitingSysList.Count > 0) { if (SceneHelp.Instance.IsInWildInstance()) { TargetPathManager.Instance.StopPlayerAndReset(); //有系统开启停止寻路 ClientEventMgr.GetInstance().FireEvent((int)ClientEvent.CE_NEW_WAITING_SYS, new CEventBaseArgs()); } else { ClientEventMgr.GetInstance().PostEvent((int)ClientEvent.CE_NEW_WAITING_SYS, new CEventBaseArgs()); } } } break; } }