Skip to content

Commit

Permalink
Merge pull request #6 from azerothcore/sudlud-patch-1
Browse files Browse the repository at this point in the history
fix build for AC pr #21151 and minor code style adjustments
  • Loading branch information
Nyeriah authored Feb 7, 2025
2 parents b97542a + ff711ff commit 232b15e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/mod_cta_switch_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ class cta_switch_event_script : public GameEventScript
void OnStart(uint16 eventId) override
{
if (!sConfigMgr->GetOption<int>("ModCTASwitch.Enable", 0))
{
return;
}

switch (eventId)
{
case EVENT_CTA_WARSONG_GULCH:

if (!sConfigMgr->GetOption<int>("ModCTASwitch.SwitchWsg", EVENT_CTA_WARSONG_GULCH))
{
return;
}

if (sConfigMgr->GetOption<int>("ModCTASwitch.SwitchWsg", EVENT_CTA_WARSONG_GULCH) == eventId)
{
Expand All @@ -48,9 +44,7 @@ class cta_switch_event_script : public GameEventScript
case EVENT_CTA_ARATHI_BASIN:

if (!sConfigMgr->GetOption<int>("ModCTASwitch.SwitchAB", EVENT_CTA_ARATHI_BASIN))
{
return;
}

if (sConfigMgr->GetOption<int>("ModCTASwitch.SwitchAB", EVENT_CTA_ARATHI_BASIN) == eventId)
{
Expand All @@ -64,9 +58,7 @@ class cta_switch_event_script : public GameEventScript
case EVENT_CTA_ALTERAC_VALLEY:

if (!sConfigMgr->GetOption<int>("ModCTASwitch.SwitchAV", EVENT_CTA_ALTERAC_VALLEY))
{
return;
}

if (sConfigMgr->GetOption<int>("ModCTASwitch.SwitchAV", EVENT_CTA_ALTERAC_VALLEY) == eventId)
{
Expand All @@ -80,9 +72,7 @@ class cta_switch_event_script : public GameEventScript
case EVENT_CTA_EYE_OF_THE_STORM:

if (!sConfigMgr->GetOption<int>("ModCTASwitch.SwitchEots", EVENT_CTA_EYE_OF_THE_STORM))
{
return;
}

if (sConfigMgr->GetOption<int>("ModCTASwitch.SwitchEots", EVENT_CTA_EYE_OF_THE_STORM) == eventId)
{
Expand All @@ -96,9 +86,7 @@ class cta_switch_event_script : public GameEventScript
case EVENT_CTA_STRAND_OF_THE_ANCIENTS:

if (!sConfigMgr->GetOption<int>("ModCTASwitch.SwitchSota", EVENT_CTA_STRAND_OF_THE_ANCIENTS))
{
return;
}

if (sConfigMgr->GetOption<int>("ModCTASwitch.SwitchSota", EVENT_CTA_STRAND_OF_THE_ANCIENTS) == eventId)
{
Expand All @@ -112,9 +100,7 @@ class cta_switch_event_script : public GameEventScript
case EVENT_CTA_ISLE_OF_CONQUEST:

if (!sConfigMgr->GetOption<int>("ModCTASwitch.SwitchIoc", EVENT_CTA_ISLE_OF_CONQUEST))
{
return;
}

if (sConfigMgr->GetOption<int>("ModCTASwitch.SwitchIoc", EVENT_CTA_ISLE_OF_CONQUEST) == eventId)
{
Expand All @@ -131,9 +117,7 @@ class cta_switch_event_script : public GameEventScript
void OnEventCheck(uint16 /*eventId*/) override
{
if (!sConfigMgr->GetOption<int>("ModCTASwitch.Enable", 0))
{
return;
}

std::vector<uint16> 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 };
Expand All @@ -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);
}
}
}
Expand Down

0 comments on commit 232b15e

Please # to comment.