diff options
| author | jackpoz <giacomopoz@gmail.com> | 2019-03-30 17:48:36 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2019-03-31 17:34:28 +0200 |
| commit | 1d04a3b216901671eae0104547715a570b1ff3ab (patch) | |
| tree | 6736646c01e731af453241cb00d4fefbb1086d30 /src/server/game | |
| parent | 4f1f8983a7f304ec11ab1b1306499b09a6b05369 (diff) | |
Core/Misc: Fix GCC 8 warnings
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp | 1 | ||||
| -rw-r--r-- | src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/DungeonFinding/LFGGroupData.cpp | 3 | ||||
| -rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/DungeonFinding/LFGPlayerData.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 1 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Handlers/LFGHandler.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Handlers/PetHandler.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 5 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 1 |
16 files changed, 27 insertions, 20 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 0029dba7ed8..f7619848191 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1188,7 +1188,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; } - // no break + /* 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 bcfb6a96adb..21806cefeb0 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -204,6 +204,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 */ 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 bfb5708e6d5..4512d70ca58 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -741,11 +741,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; - // no break + /* 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; - // no break + /* 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 9e382a03b5e..71ee0029477 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1905,7 +1905,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; } - // intentional missing break + /* 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 501533edb24..39d173d69f9 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.cpp +++ b/src/server/game/DungeonFinding/LFGGroupData.cpp @@ -40,10 +40,11 @@ void LfgGroupData::SetState(LfgState state) case LFG_STATE_NONE: m_Dungeon = 0; m_KicksLeft = LFG_GROUP_MAX_KICKS; + /* fallthrough */ case LFG_STATE_FINISHED_DUNGEON: case LFG_STATE_DUNGEON: m_OldState = state; - // No break on purpose + /* fallthrough */ default: m_State = state; } diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 73c302c0988..a21cd01ba37 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -483,7 +483,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const joinData.result = LFG_JOIN_DUNGEON_INVALID; else rDungeonId = (*dungeons.begin()); - // No break on purpose (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 5464fba729b..24054f31b61 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(); - // No break on purpose + /* fallthrough */ case LFG_STATE_DUNGEON: m_OldState = state; - // No break on purpose + /* fallthrough */ default: m_State = state; } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 3f5509b7baf..c058f3066e3 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -513,6 +513,7 @@ void GameObject::Update(uint32 diff) } // NO BREAK for switch (m_lootState) } + /* 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 022a52b2d3a..7496216ac96 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5854,7 +5854,7 @@ void Player::UpdateWeaponSkill(WeaponAttackType attType) break; case ITEM_SUBCLASS_WEAPON_FIST: UpdateSkill(SKILL_UNARMED, weapon_skill_gain); - // no break intended + /* fallthrough */ default: UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain); break; @@ -14162,8 +14162,8 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool GetName().c_str(), GetGUID().GetCounter(), menu->GetGossipMenu().GetMenuId(), creature->GetName().c_str(), creature->GetEntry()); canTalk = false; } - // no break; } + /* 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 c8ec43db194..7cf57adaca7 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7027,8 +7027,10 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, { case 911: // Shatter (Rank 3) modChance += 16.f; + /* fallthrough */ case 910: // Shatter (Rank 2) modChance += 17.f; + /* fallthrough */ case 849: // Shatter (Rank 1) modChance += 17.f; if (!HasAuraState(AURA_STATE_FROZEN, spellInfo, caster)) @@ -7151,7 +7153,7 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, } } } - /// Intentional fallback. 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 c8a48f57521..76ac7ccf3ca 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; - // no break on purpose + /* 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 507b76a100c..6d767b6a064 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -275,7 +275,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe { case REACT_PASSIVE: //passive pet->AttackStop(); - // no break; + /* 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 caa6ab536c9..1ac03700311 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -2670,7 +2670,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()); - // no break + /* 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 05ab4296d9e..096359d1f20 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3126,7 +3126,7 @@ void Spell::cancel() { case SPELL_STATE_PREPARING: CancelGlobalCooldown(); - // no break + /* fallthrough */ case SPELL_STATE_DELAYED: SendInterrupted(0); SendCastResult(SPELL_FAILED_INTERRUPTED); @@ -5626,7 +5626,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; - // intentional missing break, 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; @@ -6666,7 +6666,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / return SPELL_FAILED_DONT_REPORT; } } - // no break + /* fallthrough */ case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC: { Item* targetItem = m_targets.GetItemTarget(); @@ -8093,7 +8093,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target) const return false; if (refUnit->getClass() != unitTarget->getClass()) return false; - // nobreak; + /* fallthrough */ case TARGET_CHECK_RAID: if (!refUnit) return false; diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 8f32f011e28..6d45d7cf1e7 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: - // nobreak; + /* fallthrough */ default: targetMask = TARGET_FLAG_UNIT; break; @@ -2223,6 +2223,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 */ case SPELL_AURA_TRACK_RESOURCES: case SPELL_AURA_TRACK_STEALTHED: return SPELL_SPECIFIC_TRACKER; @@ -2612,7 +2613,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); - // no break intended + /* 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 d8622f9d8ed..c50ebfad1f6 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2806,6 +2806,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes() spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DUMMY) break; } + /* fallthrough */ default: { // No value and not interrupt cast or crowd control without SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY flag |
