Core/Misc: Fix coverity analysis issues
This commit is contained in:
1 parent
fccdba3842
commit
316d9a5ce8
1 file changed
+14
-8
@@ -3845,6 +3845,8 @@ void Unit::RemoveAurasByType(AuraType auraType, uint64 casterGUID, Aura* except,
|
||||
{
|
||||
Aura* aura = (*iter)->GetBase();
|
||||
AuraApplication * aurApp = aura->GetApplicationOfTarget(GetGUID());
|
||||
if (!aurApp)
|
||||
continue;
|
||||
|
||||
++iter;
|
||||
if (aura != except && (!casterGUID || aura->GetCasterGUID() == casterGUID)
|
||||
@@ -10504,17 +10506,21 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
|
||||
{
|
||||
if (!((*i)->IsAffectedOnSpell(spellProto)))
|
||||
continue;
|
||||
int32 modChance = 0;
|
||||
|
||||
switch ((*i)->GetMiscValue())
|
||||
{
|
||||
// Shatter
|
||||
case 911: modChance+= 16;
|
||||
case 910: modChance+= 17;
|
||||
case 849: modChance+= 17;
|
||||
if (!victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
|
||||
break;
|
||||
crit_chance+=modChance;
|
||||
case 911: // Shatter (Rank 1)
|
||||
if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
|
||||
crit_chance += 17;
|
||||
break;
|
||||
case 910: // Shatter (Rank 2)
|
||||
if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
|
||||
crit_chance += 34;
|
||||
break;
|
||||
case 849: // Shatter (Rank 3)
|
||||
if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
|
||||
crit_chance += 50;
|
||||
break;
|
||||
case 7917: // Glyph of Shadowburn
|
||||
if (victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
|
||||
crit_chance+=(*i)->GetAmount();
|
||||
|
||||
Reference in new issue
Block a user