From ff711ffd84b255488edbbe26ff6961ccbee83930 Mon Sep 17 00:00:00 2001 From: sudlud Date: Fri, 7 Feb 2025 13:34:42 +0100 Subject: [PATCH] Update mod_cta_switch_script.cpp - fix build for AC pr#21151 --- src/mod_cta_switch_script.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/mod_cta_switch_script.cpp b/src/mod_cta_switch_script.cpp index 514bbfa..7c7fbcf 100644 --- a/src/mod_cta_switch_script.cpp +++ b/src/mod_cta_switch_script.cpp @@ -23,18 +23,14 @@ class cta_switch_event_script : public GameEventScript void OnStart(uint16 eventId) override { if (!sConfigMgr->GetOption("ModCTASwitch.Enable", 0)) - { return; - } switch (eventId) { case EVENT_CTA_WARSONG_GULCH: if (!sConfigMgr->GetOption("ModCTASwitch.SwitchWsg", EVENT_CTA_WARSONG_GULCH)) - { return; - } if (sConfigMgr->GetOption("ModCTASwitch.SwitchWsg", EVENT_CTA_WARSONG_GULCH) == eventId) { @@ -48,9 +44,7 @@ class cta_switch_event_script : public GameEventScript case EVENT_CTA_ARATHI_BASIN: if (!sConfigMgr->GetOption("ModCTASwitch.SwitchAB", EVENT_CTA_ARATHI_BASIN)) - { return; - } if (sConfigMgr->GetOption("ModCTASwitch.SwitchAB", EVENT_CTA_ARATHI_BASIN) == eventId) { @@ -64,9 +58,7 @@ class cta_switch_event_script : public GameEventScript case EVENT_CTA_ALTERAC_VALLEY: if (!sConfigMgr->GetOption("ModCTASwitch.SwitchAV", EVENT_CTA_ALTERAC_VALLEY)) - { return; - } if (sConfigMgr->GetOption("ModCTASwitch.SwitchAV", EVENT_CTA_ALTERAC_VALLEY) == eventId) { @@ -80,9 +72,7 @@ class cta_switch_event_script : public GameEventScript case EVENT_CTA_EYE_OF_THE_STORM: if (!sConfigMgr->GetOption("ModCTASwitch.SwitchEots", EVENT_CTA_EYE_OF_THE_STORM)) - { return; - } if (sConfigMgr->GetOption("ModCTASwitch.SwitchEots", EVENT_CTA_EYE_OF_THE_STORM) == eventId) { @@ -96,9 +86,7 @@ class cta_switch_event_script : public GameEventScript case EVENT_CTA_STRAND_OF_THE_ANCIENTS: if (!sConfigMgr->GetOption("ModCTASwitch.SwitchSota", EVENT_CTA_STRAND_OF_THE_ANCIENTS)) - { return; - } if (sConfigMgr->GetOption("ModCTASwitch.SwitchSota", EVENT_CTA_STRAND_OF_THE_ANCIENTS) == eventId) { @@ -112,9 +100,7 @@ class cta_switch_event_script : public GameEventScript case EVENT_CTA_ISLE_OF_CONQUEST: if (!sConfigMgr->GetOption("ModCTASwitch.SwitchIoc", EVENT_CTA_ISLE_OF_CONQUEST)) - { return; - } if (sConfigMgr->GetOption("ModCTASwitch.SwitchIoc", EVENT_CTA_ISLE_OF_CONQUEST) == eventId) { @@ -131,9 +117,7 @@ class cta_switch_event_script : public GameEventScript void OnEventCheck(uint16 /*eventId*/) override { if (!sConfigMgr->GetOption("ModCTASwitch.Enable", 0)) - { return; - } std::vector eventIds = { EVENT_CTA_ALTERAC_VALLEY, EVENT_CTA_ARATHI_BASIN, EVENT_CTA_WARSONG_GULCH, EVENT_CTA_EYE_OF_THE_STORM, EVENT_CTA_ISLE_OF_CONQUEST, EVENT_CTA_STRAND_OF_THE_ANCIENTS }; @@ -158,7 +142,7 @@ class cta_switch_event_script : public GameEventScript GameEventData const& eventData = events[activeEvent]; sGameEventMgr->StopEvent(activeEvent, true); - LOG_INFO("module", "[CTA-Switch]: Stopping {} ({})", eventData.description, activeEvent); + LOG_INFO("module", "[CTA-Switch]: Stopping {} ({})", eventData.Description, activeEvent); } } }