Core/Cleanup:
Mostly if(.. -> if (.. and for(.. -> for (.. but also some miscellaneous cleanup
This commit is contained in:
1 parent
38d5fbac0e
commit
49e24e2dfb
23 files changed
+63
-84
No files matched your search
@@ -1494,7 +1494,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*itr)->GetSpellInfo()))
|
||||
if (ToPlayer()->HasItemFitToSpellRequirements((*itr)->GetSpellInfo()))
|
||||
bonusPct += (*itr)->GetAmount();
|
||||
}
|
||||
}
|
||||
@@ -1504,6 +1504,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
|
||||
maxArmorPen = float(400 + 85 * victim->getLevel());
|
||||
else
|
||||
maxArmorPen = 400 + 85 * victim->getLevel() + 4.5f * 85 * (victim->getLevel() - 59);
|
||||
|
||||
// Cap armor penetration to this number
|
||||
maxArmorPen = std::min((armor + maxArmorPen) / 3, armor);
|
||||
// Figure out how much armor do we ignore
|
||||
@@ -5751,7 +5752,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Glyph of Polymorph
|
||||
case 56375:
|
||||
{
|
||||
if(!target)
|
||||
if (!target)
|
||||
return false;
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(32409)); // SW:D shall not be removed.
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
@@ -5810,7 +5811,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
|
||||
case 64411:
|
||||
{
|
||||
if(!victim)
|
||||
if (!victim)
|
||||
return false;
|
||||
basepoints0 = int32(CalculatePctN(damage, 15));
|
||||
if (AuraEffect* aurEff = victim->GetAuraEffect(64413, 0, GetGUID()))
|
||||
@@ -6121,7 +6122,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Divine Aegis
|
||||
if (dummySpell->SpellIconID == 2820)
|
||||
{
|
||||
if(!target)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
// Multiple effects stack, so let's try to find this aura.
|
||||
@@ -6291,7 +6292,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Glyph of Shred
|
||||
case 54815:
|
||||
{
|
||||
if(!target)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
// try to find spell Rip on the target
|
||||
@@ -6597,7 +6598,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Explosive Shot
|
||||
if (procSpell->SpellFamilyFlags[2] & 0x200)
|
||||
{
|
||||
if(!victim)
|
||||
if (!victim)
|
||||
return false;
|
||||
if (AuraEffect const* pEff = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DUMMY, SPELLFAMILY_HUNTER, 0x0, 0x80000000, 0x0, GetGUID()))
|
||||
basepoints0 = pEff->GetSpellInfo()->CalcPowerCost(this, SpellSchoolMask(pEff->GetSpellInfo()->SchoolMask)) * 4/10/3;
|
||||
|
||||
Reference in new issue
Block a user