Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006 (cherry picked from commit 85b5b842ca6c05d4e51081e6c3282940a80f3761)
This commit is contained in:
committed by
Shauren
parent
fda8a09766
commit
ad340466d0
@@ -185,7 +185,7 @@ void AppenderConsole::_write(LogMessage const* message)
|
||||
index = 0;
|
||||
break;
|
||||
case LOG_LEVEL_ERROR:
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
default:
|
||||
index = 1;
|
||||
break;
|
||||
|
||||
@@ -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...");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2214,7 +2214,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
case SMART_ACTION_SET_CORPSE_DELAY:
|
||||
{
|
||||
for (WorldObject* const target : targets)
|
||||
|
||||
@@ -1294,7 +1294,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " 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))
|
||||
|
||||
@@ -193,7 +193,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]++;
|
||||
|
||||
@@ -734,11 +734,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)
|
||||
|
||||
@@ -2155,7 +2155,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:
|
||||
@@ -2274,7 +2274,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
|
||||
case CONDITION_OBJECT_ENTRY_GUID_LEGACY:
|
||||
cond->ConditionType = CONDITION_OBJECT_ENTRY_GUID;
|
||||
cond->ConditionValue1 = Trinity::Legacy::ConvertLegacyTypeID(Trinity::Legacy::TypeID(cond->ConditionValue1));
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case CONDITION_OBJECT_ENTRY_GUID:
|
||||
{
|
||||
switch (cond->ConditionValue1)
|
||||
@@ -2341,7 +2341,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
|
||||
case CONDITION_TYPE_MASK_LEGACY:
|
||||
cond->ConditionType = CONDITION_TYPE_MASK;
|
||||
cond->ConditionValue1 = Trinity::Legacy::ConvertLegacyTypeMask(cond->ConditionValue1);
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case CONDITION_TYPE_MASK:
|
||||
{
|
||||
if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE)))
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons)
|
||||
joinData.result = LFG_JOIN_INVALID_SLOT;
|
||||
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)
|
||||
|
||||
@@ -39,10 +39,10 @@ void LfgPlayerData::SetState(LfgState state)
|
||||
case LFG_STATE_FINISHED_DUNGEON:
|
||||
m_Roles = 0;
|
||||
m_SelectedDungeons.clear();
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case LFG_STATE_DUNGEON:
|
||||
m_OldState = state;
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
default:
|
||||
m_State = state;
|
||||
}
|
||||
|
||||
@@ -653,8 +653,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)
|
||||
|
||||
@@ -6742,7 +6742,6 @@ float Unit::SpellCritChanceTaken(Unit const* caster, Spell* spell, AuraEffect co
|
||||
}
|
||||
case SPELL_DAMAGE_CLASS_MELEE:
|
||||
|
||||
/* 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);
|
||||
|
||||
@@ -278,7 +278,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)
|
||||
|
||||
@@ -464,7 +464,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
|
||||
break;
|
||||
case CMSG_HOTFIX_REQUEST:
|
||||
_canRequestHotfixes = false;
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
default:
|
||||
{
|
||||
if (opcode == CMSG_TIME_SYNC_RESPONSE)
|
||||
|
||||
@@ -2462,7 +2462,7 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint32>& targets, Unit* c
|
||||
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())
|
||||
|
||||
@@ -3375,7 +3375,7 @@ void Spell::cancel()
|
||||
{
|
||||
case SPELL_STATE_PREPARING:
|
||||
CancelGlobalCooldown();
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case SPELL_STATE_DELAYED:
|
||||
SendInterrupted(0);
|
||||
SendCastResult(SPELL_FAILED_INTERRUPTED);
|
||||
@@ -5953,7 +5953,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32
|
||||
case SUMMON_CATEGORY_PET:
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && !unitCaster->GetPetGUID().IsEmpty())
|
||||
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().IsEmpty())
|
||||
return SPELL_FAILED_ALREADY_HAVE_CHARM;
|
||||
@@ -7144,7 +7144,7 @@ SpellCastResult Spell::CheckItems(int32* param1 /*= nullptr*/, int32* param2 /*=
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC:
|
||||
{
|
||||
Item* targetItem = m_targets.GetItemTarget();
|
||||
@@ -8577,7 +8577,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;
|
||||
|
||||
@@ -186,7 +186,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;
|
||||
@@ -2692,7 +2692,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;
|
||||
@@ -3243,7 +3243,7 @@ void SpellInfo::_LoadImmunityInfo()
|
||||
immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_CONFUSE);
|
||||
immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_FEAR);
|
||||
immuneInfo.AuraTypeImmune.insert(SPELL_AURA_MOD_ROOT_2);
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case 61869: // Overload
|
||||
case 63481:
|
||||
case 61887: // Lightning Tendrils
|
||||
|
||||
@@ -3106,7 +3106,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
|
||||
spellEffectInfo.ApplyAuraName == SPELL_AURA_PERIODIC_HEALTH_FUNNEL ||
|
||||
spellEffectInfo.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
|
||||
|
||||
@@ -840,14 +840,14 @@ void TolBaradCapturePoint::ChangeTeam(TeamId /*oldTeam*/)
|
||||
break;
|
||||
case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
|
||||
m_Bf->SendWarning(TBCapturePoints[iBase].textLost[TEAM_HORDE]);
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
|
||||
SendUpdateWorldState(TBCapturePoints[iBase].wsCapturing[TEAM_ALLIANCE], uint32(1));
|
||||
GetCapturePointGo()->SetGoArtKit(TB_GO_ARTKIT_FLAG_NONE);
|
||||
break;
|
||||
case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
|
||||
m_Bf->SendWarning(TBCapturePoints[iBase].textLost[TEAM_ALLIANCE]);
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
|
||||
SendUpdateWorldState(TBCapturePoints[iBase].wsCapturing[TEAM_HORDE], uint32(1));
|
||||
GetCapturePointGo()->SetGoArtKit(TB_GO_ARTKIT_FLAG_NONE);
|
||||
|
||||
+1
-1
@@ -110,7 +110,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);
|
||||
|
||||
+1
-1
@@ -361,7 +361,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);
|
||||
|
||||
@@ -62,7 +62,7 @@ class instance_halls_of_origination : public InstanceMapScript
|
||||
{
|
||||
case GO_ANHUURS_BRIDGE:
|
||||
AnhuursBridgeGUID = go->GetGUID();
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case GO_DOODAD_ULDUM_ELEVATOR_COL01:
|
||||
case GO_VAULT_OF_LIGHTS_DOOR:
|
||||
case GO_DOODAD_ULDUM_LIGHTMACHINE_01:
|
||||
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
Spark->DisappearAndDie();
|
||||
DespawnNagaFlag(false);
|
||||
me->DisappearAndDie();
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
default:
|
||||
return 99999999;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
{
|
||||
|
||||
+1
-1
@@ -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)))
|
||||
|
||||
+1
-1
@@ -161,7 +161,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;
|
||||
|
||||
@@ -230,7 +230,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);
|
||||
|
||||
@@ -1186,7 +1186,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;
|
||||
|
||||
@@ -234,7 +234,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:
|
||||
|
||||
@@ -1214,7 +1214,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;
|
||||
@@ -1233,7 +1233,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;
|
||||
@@ -1252,7 +1252,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;
|
||||
@@ -1278,19 +1278,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;
|
||||
@@ -1420,7 +1420,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())
|
||||
|
||||
@@ -589,7 +589,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))
|
||||
{
|
||||
|
||||
@@ -223,7 +223,7 @@ class boss_kologarn : public CreatureScript
|
||||
break;
|
||||
case NPC_RUBBLE:
|
||||
summons.Summon(summon);
|
||||
// absence of break intended
|
||||
[[fallthrough]];
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,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);
|
||||
@@ -987,7 +987,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->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
|
||||
me->SetImmuneToPC(false);
|
||||
@@ -1169,7 +1169,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->SetAnimTier(UNIT_BYTE1_FLAG_HOVER, true);
|
||||
me->SetDisableGravity(false);
|
||||
|
||||
@@ -745,7 +745,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
guard->SetImmuneToAll(true);
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
default:
|
||||
if (boss->isDead())
|
||||
{
|
||||
|
||||
@@ -516,8 +516,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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -60,7 +60,7 @@ class instance_gruuls_lair : public InstanceMapScript
|
||||
{
|
||||
case NPC_MAULGAR:
|
||||
MaulgarGUID = creature->GetGUID();
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case NPC_KROSH_FIREHAND:
|
||||
case NPC_OLM_THE_SUMMONER:
|
||||
case NPC_KIGGLER_THE_CRAZED:
|
||||
|
||||
@@ -103,7 +103,7 @@ class instance_blood_furnace : public InstanceMapScript
|
||||
{
|
||||
case GO_PRISON_DOOR_04:
|
||||
PrisonDoor4GUID = go->GetGUID();
|
||||
/* fallthrough */
|
||||
[[fallthrough]];
|
||||
case GO_PRISON_DOOR_01:
|
||||
case GO_PRISON_DOOR_02:
|
||||
case GO_PRISON_DOOR_03:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user