fix(Core/Misc): all GCC warnings (#3457)

This commit is contained in:
Francesco Borzì
2020-09-14 17:31:12 +02:00
committed by GitHub
parent 80b149b218
commit b61ae8abcd
34 changed files with 157 additions and 75 deletions

View File

@@ -2912,13 +2912,15 @@ SpellMissInfo Unit::SpellHitResult(Unit* victim, SpellInfo const* spell, bool Ca
case SPELL_DAMAGE_CLASS_NONE:
{
if (spell->SpellFamilyName)
{
return SPELL_MISS_NONE;
}
// Xinef: apply DAMAGE_CLASS_MAGIC conditions to damaging DAMAGE_CLASS_NONE spells
for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
if (spell->Effects[i].Effect && spell->Effects[i].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
if (spell->Effects[i].ApplyAuraName != SPELL_AURA_PERIODIC_DAMAGE)
return SPELL_MISS_NONE;
// no break intended
[[fallthrough]];
}
case SPELL_DAMAGE_CLASS_MAGIC:
return MagicSpellHitResult(victim, spell);
@@ -6812,6 +6814,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = isWrathSpell ? 48518 : 48517;
break;
}
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
}
case SPELLFAMILY_ROGUE:
{
@@ -8593,6 +8596,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
target = this;
trigger_spell_id = 22588;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
}
// Bonus Healing (Crystal Spire of Karabor mace)
case 40971:
@@ -11088,9 +11092,9 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
switch ((*i)->GetMiscValue())
{
// Shatter
case 911: modChance+= 16;
case 910: modChance+= 17;
case 849: modChance+= 17;
case 911: modChance+= 16; [[fallthrough]];
case 910: modChance+= 17; [[fallthrough]];
case 849: modChance+= 17;
if (!HasAuraState(AURA_STATE_FROZEN, spellProto, caster))
break;
crit_chance+=modChance;
@@ -11199,6 +11203,7 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
}
break;
}
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_DAMAGE_CLASS_RANGED:
{
// flat aura mods