public void StartRaid(string initiator = null) { if (gameManager.Events.TryStart(this)) { gameManager.Music.PlayRaidBossMusic(); if (!notifications.gameObject.activeSelf) { notifications.gameObject.SetActive(true); } nextRaidTimer = -1f; raidStartedTime = Time.time; camera.EnableRaidCamera(); SpawnRaidBoss(); notifications.ShowRaidBossAppeared(); gameManager.Server?.Client?.SendCommand( "", "raid_start", $"A level {Boss.Enemy.Stats.CombatLevel} raid boss has appeared! Help fight him by typing !raid"); return; } else if (!string.IsNullOrEmpty(initiator)) { gameManager.Server?.Announce($"Raid cannot be started right now."); } nextRaidTimer = gameManager.Events.RescheduleTime; }
public void StartRaid(string initiator = null) { if (gameManager.Events.TryStart(this)) { gameManager.Music.PlayRaidBossMusic(); if (!notifications.gameObject.activeSelf) { notifications.gameObject.SetActive(true); } nextRaidTimer = -1f; raidStartedTime = Time.time; camera.EnableRaidCamera(); SpawnRaidBoss(); notifications.ShowRaidBossAppeared(); gameManager.RavenBot?.Announce(Localization.MSG_RAID_START, Boss.Enemy.Stats.CombatLevel.ToString()); var ioc = gameManager.gameObject.GetComponent <IoCContainer>(); var evt = ioc.Resolve <EventTriggerSystem>(); evt.TriggerEvent("raid", TimeSpan.FromSeconds(10)); return; } else if (!string.IsNullOrEmpty(initiator)) { gameManager.RavenBot?.Announce(Localization.MSG_RAID_START_ERROR); } nextRaidTimer = gameManager.Events.RescheduleTime; }
public void StartRaid(string initiator = null) { nextRaidTimer = -1f; raidStartedTime = Time.time; camera.EnableRaidCamera(); SpawnRaidBoss(); notifications.ShowRaidBossAppeared(); gameManager.Server.Client.SendCommand( "", "raid_start", $"A level {this.Boss.Enemy.Stats.CombatLevel} raid boss has appeared! Help fight him by typing !raid"); }
public void StartRaid(string initiator = null) { gameManager.Music.PlayRaidBossMusic(); if (!notifications.gameObject.activeSelf) { notifications.gameObject.SetActive(true); } nextRaidTimer = -1f; raidStartedTime = Time.time; camera.EnableRaidCamera(); SpawnRaidBoss(); notifications.ShowRaidBossAppeared(); gameManager.Server?.Client?.SendCommand( "", "raid_start", $"A level {Boss.Enemy.Stats.CombatLevel} raid boss has appeared! Help fight him by typing !raid"); }