Core/Misc: readd some codestyle changes inadvertently reverted

This commit is contained in:
ariel- authored and roc13x committed 2017-05-04 03:42:24 +01:00
1 parent 4f3f455de4
commit 62f9b5a0a1
2 files changed
+7 -7

No files matched your search

+6 -6
View File
@@ -6603,14 +6603,14 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
// Pets just add their bonus damage to their spell damage
// note that their spell damage is just gain of their own auras
if (HasUnitTypeMask(UNIT_MASK_GUARDIAN))
DoneAdvertisedBenefit += ((Guardian*)this)->GetBonusDamage();
DoneAdvertisedBenefit += static_cast<Guardian const*>(this)->GetBonusDamage();
// Check for table values
float coeff = 0.0f;
float coeff = 0.f;
SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id);
if (bonus)
{
WeaponAttackType attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
WeaponAttackType const attType = (spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
float APbonus = float(victim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS));
APbonus += GetTotalAttackPowerValue(attType);
@@ -7810,10 +7810,10 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
float DoneTotalMod = 1.0f;
// Some spells don't benefit from pct done mods
if (spellProto)
if (spellProto && !spellProto->HasAttribute(SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS))
{
// mods for SPELL_SCHOOL_MASK_NORMAL are already factored in base melee damage calculation
if (!spellProto->HasAttribute(SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS) && !(spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_NORMAL))
if (!(spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_NORMAL))
{
float maxModDamagePercentSchool = 0.0f;
if (GetTypeId() == TYPEID_PLAYER)
@@ -8681,7 +8681,7 @@ int32 Unit::ModifyPowerPct(Powers power, float pct, bool apply)
uint32 Unit::GetAttackTime(WeaponAttackType att) const
{
float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME+att) / m_modAttackSpeedPct[att];
float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME + att) / m_modAttackSpeedPct[att];
return (uint32)f_BaseAttackTime;
}