diff options
author | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-07-18 20:42:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-18 20:42:28 +0200 |
commit | 85b5b842ca6c05d4e51081e6c3282940a80f3761 (patch) | |
tree | 4b5d72c0d163cff0a134fcfe4c50f05b59a46668 | |
parent | 7032ee0bdb47c995dfd89bce3d5b6fad13ec6d73 (diff) |
Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
37 files changed, 59 insertions, 59 deletions
diff --git a/src/common/Logging/AppenderConsole.cpp b/src/common/Logging/AppenderConsole.cpp index f69ed1b1494..86e7634f1b9 100644 --- a/src/common/Logging/AppenderConsole.cpp +++ b/src/common/Logging/AppenderConsole.cpp @@ -185,7 +185,7 @@ void AppenderConsole::_write(LogMessage const* message) index = 0; break; case LOG_LEVEL_ERROR: - /* fallthrough */ + [[fallthrough]]; default: index = 1; break; diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp index 60596a17c5c..1b38b388536 100644 --- a/src/server/database/Database/MySQLConnection.cpp +++ b/src/server/database/Database/MySQLConnection.cpp @@ -545,8 +545,8 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo, uint8 attempts /*= 5*/) mysql_close(m_Mysql); m_Mysql = nullptr; } + [[fallthrough]]; } - /* fallthrough */ case CR_CONN_HOST_ERROR: { TC_LOG_INFO("sql.sql", "Attempting to reconnect to the MySQL server..."); diff --git a/src/server/database/Updater/UpdateFetcher.cpp b/src/server/database/Updater/UpdateFetcher.cpp index b6387e2d31a..d8f6cafacbc 100644 --- a/src/server/database/Updater/UpdateFetcher.cpp +++ b/src/server/database/Updater/UpdateFetcher.cpp @@ -306,7 +306,7 @@ UpdateResult UpdateFetcher::Update(bool const redundancyChecks, { case MODE_APPLY: speed = Apply(availableQuery.first); - /* fallthrough */ + [[fallthrough]]; case MODE_REHASH: UpdateEntry(file, speed); break; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 31c98d61fab..4ac8c616a88 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1194,7 +1194,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invoker cast action, but event does not provide any invoker!", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); return false; } - /* fallthrough */ + [[fallthrough]]; case SMART_ACTION_SELF_CAST: case SMART_ACTION_ADD_AURA: if (!IsSpellValid(e, e.action.cast.spell)) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 1bf959a3905..b1457af4df4 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -203,7 +203,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player) case AV_QUEST_A_BOSS1: case AV_QUEST_H_BOSS1: m_Team_QuestStatus[team][4] += 9; //you can turn in 10 or 1 item.. - /* fallthrough */ + [[fallthrough]]; case AV_QUEST_A_BOSS2: case AV_QUEST_H_BOSS2: m_Team_QuestStatus[team][4]++; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index ed7d96ca693..cbd157a1cd3 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -740,11 +740,11 @@ bool BattlegroundSA::CanInteractWithObject(uint32 objectId) case BG_SA_TITAN_RELIC: if (GateStatus[BG_SA_ANCIENT_GATE] != BG_SA_GATE_DESTROYED || GateStatus[BG_SA_YELLOW_GATE] != BG_SA_GATE_DESTROYED) return false; - /* fallthrough */ + [[fallthrough]]; case BG_SA_CENTRAL_FLAG: if (GateStatus[BG_SA_RED_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_PURPLE_GATE] != BG_SA_GATE_DESTROYED) return false; - /* fallthrough */ + [[fallthrough]]; case BG_SA_LEFT_FLAG: case BG_SA_RIGHT_FLAG: if (GateStatus[BG_SA_GREEN_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_BLUE_GATE] != BG_SA_GATE_DESTROYED) diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 50a81782fa2..b3f3b6dbeb8 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1942,7 +1942,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const TC_LOG_ERROR("sql.sql", "%s has invalid state mask (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue2); return false; } - /* fallthrough */ + [[fallthrough]]; case CONDITION_QUESTREWARDED: case CONDITION_QUESTTAKEN: case CONDITION_QUEST_NONE: diff --git a/src/server/game/DungeonFinding/LFGGroupData.cpp b/src/server/game/DungeonFinding/LFGGroupData.cpp index b1386a43c80..181ce3e081a 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.cpp +++ b/src/server/game/DungeonFinding/LFGGroupData.cpp @@ -40,11 +40,11 @@ void LfgGroupData::SetState(LfgState state) case LFG_STATE_NONE: m_Dungeon = 0; m_KicksLeft = LFG_GROUP_MAX_KICKS; - /* fallthrough */ + [[fallthrough]]; case LFG_STATE_FINISHED_DUNGEON: case LFG_STATE_DUNGEON: m_OldState = state; - /* fallthrough */ + [[fallthrough]]; default: m_State = state; } diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 0c7e1855e1e..ef4d316387e 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -490,7 +490,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const joinData.result = LFG_JOIN_DUNGEON_INVALID; else rDungeonId = (*dungeons.begin()); - /* fallthrough - Random can only be dungeon or heroic dungeon */ + [[fallthrough]]; // Random can only be dungeon or heroic dungeon case LFG_TYPE_HEROIC: case LFG_TYPE_DUNGEON: if (isRaid) diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp index 3c1bda34d4a..a94c20a111a 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.cpp +++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp @@ -35,10 +35,10 @@ void LfgPlayerData::SetState(LfgState state) m_Roles = 0; m_SelectedDungeons.clear(); m_Comment.clear(); - /* fallthrough */ + [[fallthrough]]; case LFG_STATE_DUNGEON: m_OldState = state; - /* fallthrough */ + [[fallthrough]]; default: m_State = state; } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 39bdfc1e7da..5703c5346db 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -532,8 +532,8 @@ void GameObject::Update(uint32 diff) m_lootState = GO_READY; // for other GOis same switched without delay to GO_READY break; } + [[fallthrough]]; } - /* fallthrough */ case GO_READY: { if (m_respawnCompatibilityMode) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 4e5e8b37f6c..8203d22b478 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5866,7 +5866,7 @@ void Player::UpdateWeaponSkill(WeaponAttackType attType) break; case ITEM_SUBCLASS_WEAPON_FIST: UpdateSkill(SKILL_UNARMED, weapon_skill_gain); - /* fallthrough */ + [[fallthrough]]; default: UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain); break; @@ -14270,8 +14270,8 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool GetName().c_str(), GetGUID().ToString().c_str(), menu->GetGossipMenu().GetMenuId(), creature->GetName().c_str(), creature->GetEntry()); canTalk = false; } + [[fallthrough]]; } - /* fallthrough */ case GOSSIP_OPTION_GOSSIP: case GOSSIP_OPTION_SPIRITGUIDE: case GOSSIP_OPTION_INNKEEPER: diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ca47aec50b6..7159afa9f15 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7038,10 +7038,10 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, { case 911: // Shatter (Rank 3) modChance += 16.f; - /* fallthrough */ + [[fallthrough]]; case 910: // Shatter (Rank 2) modChance += 17.f; - /* fallthrough */ + [[fallthrough]]; case 849: // Shatter (Rank 1) modChance += 17.f; if (!HasAuraState(AURA_STATE_FROZEN, spellInfo, caster)) @@ -7163,8 +7163,8 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, break; } } + [[fallthrough]]; // Calculate critical strike chance for both Ranged and Melee spells } - /* fallthrough - Calculate critical strike chance for both Ranged and Melee spells*/ case SPELL_DAMAGE_CLASS_RANGED: if (caster) crit_chance = GetUnitCriticalChanceTaken(caster, attackType, crit_chance); diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index 656f59bf4ea..40daa756b3d 100644 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -356,7 +356,7 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData) { case lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE: // Rolecheck Success queued = true; - /* fallthrough */ + [[fallthrough]]; case lfg::LFG_UPDATETYPE_PROPOSAL_BEGIN: join = true; break; diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 36d6a42d25c..56d12210529 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -262,7 +262,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe { case REACT_PASSIVE: // passive pet->AttackStop(); - /* fallthrough */ + [[fallthrough]]; case REACT_DEFENSIVE: // recovery case REACT_AGGRESSIVE: // activete if (pet->GetTypeId() == TYPEID_UNIT) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 9aa86b57451..91f46881467 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -2678,7 +2678,7 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint8>& targets, Unit* ca case SPELL_EFFECT_APPLY_AREA_AURA_PET: if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), ref, *condList)) units.push_back(GetUnitOwner()); - /* fallthrough */ + [[fallthrough]]; case SPELL_EFFECT_APPLY_AREA_AURA_OWNER: { if (Unit* owner = GetUnitOwner()->GetCharmerOrOwner()) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 69f365785df..615e4093a3e 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3186,7 +3186,7 @@ void Spell::cancel() { case SPELL_STATE_PREPARING: CancelGlobalCooldown(); - /* fallthrough */ + [[fallthrough]]; case SPELL_STATE_DELAYED: SendInterrupted(0); SendCastResult(SPELL_FAILED_INTERRUPTED); @@ -5719,7 +5719,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint case SUMMON_CATEGORY_PET: if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && unitCaster->GetPetGUID()) return SPELL_FAILED_ALREADY_HAVE_SUMMON; - /* fallthrough - check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET*/ + [[fallthrough]]; // check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET case SUMMON_CATEGORY_PUPPET: if (unitCaster->GetCharmedGUID()) return SPELL_FAILED_ALREADY_HAVE_CHARM; @@ -6786,7 +6786,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / return SPELL_FAILED_DONT_REPORT; } } - /* fallthrough */ + [[fallthrough]]; case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC: { Item* targetItem = m_targets.GetItemTarget(); @@ -8206,7 +8206,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target) const return false; if (refUnit->GetClass() != unitTarget->GetClass()) return false; - /* fallthrough */ + [[fallthrough]]; case TARGET_CHECK_RAID: if (!refUnit) return false; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 776e2380481..e7a0635100c 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3759,7 +3759,7 @@ void Spell::EffectActivateObject(SpellEffIndex effIndex) case GameObjectActions::OpenAndUnlock: if (Unit* unitCaster = m_caster->ToUnit()) gameObjTarget->UseDoorOrButton(0, false, unitCaster); - /* fallthrough */ + [[fallthrough]]; case GameObjectActions::Unlock: case GameObjectActions::Lock: gameObjTarget->ApplyModFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED, action == GameObjectActions::Lock); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index dd5dcb04f1a..24a587a161c 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -181,7 +181,7 @@ uint32 SpellImplicitTargetInfo::GetExplicitTargetMask(bool& srcSet, bool& dstSet targetMask = TARGET_FLAG_UNIT_PASSENGER; break; case TARGET_CHECK_RAID_CLASS: - /* fallthrough */ + [[fallthrough]]; default: targetMask = TARGET_FLAG_UNIT; break; @@ -2222,7 +2222,7 @@ void SpellInfo::_LoadSpellSpecific() /// @workaround For non-stacking tracking spells (We need generic solution) if (Id == 30645) // Gas Cloud Tracking return SPELL_SPECIFIC_NORMAL; - /* fallthrough */ + [[fallthrough]]; case SPELL_AURA_TRACK_RESOURCES: case SPELL_AURA_TRACK_STEALTHED: return SPELL_SPECIFIC_TRACKER; @@ -2615,7 +2615,7 @@ void SpellInfo::_LoadImmunityInfo() immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT); immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE); immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR); - /* fallthrough */ + [[fallthrough]]; case 61869: // Overload case 63481: case 61887: // Lightning Tendrils diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 2bcce293cdf..fc996c72db2 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2789,8 +2789,8 @@ void SpellMgr::LoadSpellInfoCustomAttributes() spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_HEALTH_FUNNEL || spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DUMMY) break; + [[fallthrough]]; } - /* fallthrough */ default: { // No value and not interrupt cast or crowd control without SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY flag diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp index 00d33790d43..168a988c867 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp @@ -109,7 +109,7 @@ class boss_salramm : public CreatureScript break; case EVENT_EXPLODE_GHOUL2: events.ScheduleEvent(EVENT_SUMMON_GHOULS, Seconds(4)); - /* fallthrough */ + [[fallthrough]]; case EVENT_EXPLODE_GHOUL1: Talk(SAY_EXPLODE_GHOUL); DoCastAOE(SPELL_EXPLODE_GHOUL, true); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 02dd358ed0e..764a4802b88 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -360,7 +360,7 @@ class npc_chromie_start : public CreatureScript break; case GOSSIP_OFFSET_SKIP_1: AdvanceDungeonFar(); - /* fallthrough */ + [[fallthrough]]; case GOSSIP_OFFSET_TELEPORT: CloseGossipMenuFor(player); me->CastSpell(player, SPELL_TELEPORT_PLAYER); diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index a8a4971d861..2a3192c241a 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -562,7 +562,7 @@ public: Spark->DisappearAndDie(); DespawnNagaFlag(false); me->DisappearAndDie(); - /* fallthrough */ + [[fallthrough]]; default: return 99999999; } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 99abf037c4f..e33320b6622 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -769,7 +769,7 @@ struct npc_hadronox_foeAI : public ScriptedAI me->GetMotionMaster()->MovePoint(MOVE_DOWNSTAIRS_2, downstairsMoves2[_mySpawn]); break; } - /* fallthrough */ + [[fallthrough]]; case MOVE_HADRONOX: case MOVE_HADRONOX_REAL: { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index 34cf55020c0..32e87d8139c 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -139,7 +139,7 @@ class boss_general_zarithrian : public CreatureScript { case EVENT_SUMMON_ADDS: Talk(SAY_ADDS); - /* fallthrough */ + [[fallthrough]]; case EVENT_SUMMON_ADDS2: { if (Creature* stalker1 = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ZARITHRIAN_SPAWN_STALKER_1))) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index ed0471ae6ec..45c0a094489 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -157,7 +157,7 @@ class instance_halls_of_reflection : public InstanceMapScript case NPC_WORLD_TRIGGER: if (!creature->GetTransport()) break; - /* fallthrough */ + [[fallthrough]]; case NPC_GUNSHIP_CANNON_HORDE: GunshipCannonGUIDs.insert(creature->GetGUID()); break; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index 2242d93a1cd..189be71df0c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -231,7 +231,7 @@ class boss_lord_marrowgar : public CreatureScript me->SetSpeedRate(MOVE_RUN, _baseSpeed*3.0f); Talk(SAY_BONE_STORM); events.ScheduleEvent(EVENT_BONE_STORM_END, _boneStormDuration + 1ms); - /* fallthrough */ + [[fallthrough]]; case EVENT_BONE_STORM_MOVE: { events.ScheduleEvent(EVENT_BONE_STORM_MOVE, _boneStormDuration/3); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sister_svalna.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sister_svalna.cpp index 9fc310aa781..3df14a192b6 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sister_svalna.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sister_svalna.cpp @@ -1199,7 +1199,7 @@ struct npc_frostwing_ymirjar_vrykul : public ScriptedAI { case NPC_YMIRJAR_FROSTBINDER: me->RemoveAurasDueToSpell(SPELL_ARCTIC_CHILL); - /* fallthrough */ + [[fallthrough]]; case NPC_YMIRJAR_DEATHBRINGER: _OOCevents.ScheduleEvent(EVENT_YMIRJAR_SPIRIT_STREAM, 10s, 20s); break; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index b46851e7918..82932615cb3 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -233,7 +233,7 @@ class ValithriaDespawner : public BasicEvent case NPC_VALITHRIA_DREAMWALKER: if (InstanceScript* instance = creature->GetInstanceScript()) instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, creature); - /* fallthrough */ + [[fallthrough]]; case NPC_BLAZING_SKELETON: case NPC_SUPPRESSER: case NPC_BLISTERING_ZOMBIE: diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index abcce451423..652b7e1b50f 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -1217,7 +1217,7 @@ class instance_icecrown_citadel : public InstanceMapScript case DATA_THE_LICH_KING: if (GetBossState(DATA_PROFESSOR_PUTRICIDE) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_PROFESSOR_PUTRICIDE: if (GetBossState(DATA_FESTERGUT) != DONE || GetBossState(DATA_ROTFACE) != DONE) return false; @@ -1236,7 +1236,7 @@ class instance_icecrown_citadel : public InstanceMapScript case DATA_THE_LICH_KING: if (GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_BLOOD_QUEEN_LANA_THEL: if (GetBossState(DATA_BLOOD_PRINCE_COUNCIL) != DONE) return false; @@ -1255,7 +1255,7 @@ class instance_icecrown_citadel : public InstanceMapScript case DATA_THE_LICH_KING: if (GetBossState(DATA_SINDRAGOSA) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_SINDRAGOSA: if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE) return false; @@ -1281,19 +1281,19 @@ class instance_icecrown_citadel : public InstanceMapScript case DATA_FESTERGUT: if (GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_DEATHBRINGER_SAURFANG: if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_ICECROWN_GUNSHIP_BATTLE: if (GetBossState(DATA_LADY_DEATHWHISPER) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_LADY_DEATHWHISPER: if (GetBossState(DATA_LORD_MARROWGAR) != DONE) return false; - /* fallthrough */ + [[fallthrough]]; case DATA_LORD_MARROWGAR: default: break; @@ -1423,7 +1423,7 @@ class instance_icecrown_citadel : public InstanceMapScript case EVENT_ENEMY_GUNSHIP_COMBAT: if (Creature* captain = source->FindNearestCreature(TeamInInstance == HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 100.0f)) captain->AI()->DoAction(ACTION_ENEMY_GUNSHIP_TALK); - /* fallthrough */ + [[fallthrough]]; case EVENT_PLAYERS_GUNSHIP_SPAWN: case EVENT_PLAYERS_GUNSHIP_COMBAT: if (GameObject* go = source->ToGameObject()) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index ceb351b6997..e624870663b 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -594,7 +594,7 @@ struct npc_gothik_minion_baseAI : public ScriptedAI { case ACTION_GATE_OPENED: _gateIsOpen = true; - /* fallthrough */ + [[fallthrough]]; case ACTION_ACQUIRE_TARGET: if (Player* target = FindEligibleTarget(me, _gateIsOpen)) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index 9d86ed8408d..1a1ed14e7e6 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -223,7 +223,7 @@ class boss_kologarn : public CreatureScript break; case NPC_RUBBLE: summons.Summon(summon); - // absence of break intended + [[fallthrough]]; default: return; } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 8922144d67b..54a48a47019 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -740,7 +740,7 @@ class boss_leviathan_mk_ii : public CreatureScript DoCast(me, SPELL_EMERGENCY_MODE); DoCastAOE(SPELL_EMERGENCY_MODE_TURRET); events.ScheduleEvent(EVENT_FLAME_SUPPRESSANT_MK, 1min, 0, PHASE_LEVIATHAN_MK_II); - /* fallthrough */ + [[fallthrough]]; case DO_START_MKII: me->SetReactState(REACT_AGGRESSIVE); events.SetPhase(PHASE_LEVIATHAN_MK_II); @@ -985,7 +985,7 @@ class boss_vx_001 : public CreatureScript DoCast(me, SPELL_EMERGENCY_MODE); events.ScheduleEvent(EVENT_FROST_BOMB, 1s); events.ScheduleEvent(EVENT_FLAME_SUPPRESSANT_VX, 6s); - /* fallthrough */ + [[fallthrough]]; case DO_START_VX001: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetImmuneToPC(false); @@ -1166,7 +1166,7 @@ class boss_aerial_command_unit : public CreatureScript fireFigther = true; DoCast(me, SPELL_EMERGENCY_MODE); events.ScheduleEvent(EVENT_SUMMON_FIRE_BOTS, 1s, 0, PHASE_AERIAL_COMMAND_UNIT); - /* fallthrough */ + [[fallthrough]]; case DO_START_AERIAL: me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_HOVER); me->SetDisableGravity(false); diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index cda78ea331e..b9f28381643 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -742,7 +742,7 @@ class instance_violet_hold : public InstanceMapScript guard->SetImmuneToAll(true); } } - /* fallthrough */ + [[fallthrough]]; default: if (boss->isDead()) { diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index 9628a041896..309b70fe669 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -517,8 +517,8 @@ public: /// @todo Make crunchy perform emote eat when he reaches the bird break; } + [[fallthrough]]; } - /* fallthrough */ case EVENT_MISS: { shooter->CastSpell(wilhelm, SPELL_MISS_APPLE); diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index f894466f7c8..dcaff1cb12c 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -191,7 +191,7 @@ class instance_black_temple : public InstanceMapScript for (ObjectGuid ashtongueGuid : AshtongueGUIDs) if (Creature* ashtongue = instance->GetCreature(ashtongueGuid)) ashtongue->SetFaction(FACTION_ASHTONGUE_DEATHSWORN); - /* fallthrough */ + [[fallthrough]]; case DATA_TERON_GOREFIEND: case DATA_GURTOGG_BLOODBOIL: case DATA_RELIQUARY_OF_SOULS: diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp index d497edc4998..b4d721396bf 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp @@ -143,13 +143,13 @@ class boss_shattered_executioner : public CreatureScript { case 3: me->RemoveLootMode(LOOT_MODE_HARD_MODE_1); - /* fallthrough */ + [[fallthrough]]; case 2: me->RemoveLootMode(LOOT_MODE_HARD_MODE_2); - /* fallthrough */ + [[fallthrough]]; case 1: me->RemoveLootMode(LOOT_MODE_HARD_MODE_3); - /* fallthrough */ + [[fallthrough]]; default: break; } |