Cosmetic: Multiple cosmetic changes

- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
This commit is contained in:
Spp
2011-09-29 12:43:05 +02:00
parent 8b820baa73
commit b16d2245bb
390 changed files with 1545 additions and 1545 deletions
+9 -9
View File
@@ -68,7 +68,7 @@ bool Player::UpdateStats(Stats stat)
pet->UpdateStats(stat);
}
switch(stat)
switch (stat)
{
case STAT_STRENGTH:
UpdateShieldBlockValue();
@@ -472,7 +472,7 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bo
{
UnitMods unitMod;
switch(attType)
switch (attType)
{
case BASE_ATTACK:
default:
@@ -584,7 +584,7 @@ void Player::UpdateCritPercentage(WeaponAttackType attType)
uint16 index;
CombatRating cr;
switch(attType)
switch (attType)
{
case OFF_ATTACK:
modGroup = OFFHAND_CRIT_PERCENTAGE;
@@ -814,7 +814,7 @@ void Player::UpdateExpertise(WeaponAttackType attack)
if (expertise < 0)
expertise = 0;
switch(attack)
switch (attack)
{
case BASE_ATTACK: SetUInt32Value(PLAYER_EXPERTISE, expertise); break;
case OFF_ATTACK: SetUInt32Value(PLAYER_OFFHAND_EXPERTISE, expertise); break;
@@ -998,7 +998,7 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged)
void Creature::UpdateDamagePhysical(WeaponAttackType attType)
{
UnitMods unitMod;
switch(attType)
switch (attType)
{
case BASE_ATTACK:
default:
@@ -1034,7 +1034,7 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType)
float mindamage = ((base_value + weapon_mindamage) * dmg_multiplier * base_pct + total_value) * total_pct;
float maxdamage = ((base_value + weapon_maxdamage) * dmg_multiplier * base_pct + total_value) * total_pct;
switch(attType)
switch (attType)
{
case BASE_ATTACK:
default:
@@ -1221,7 +1221,7 @@ void Guardian::UpdateMaxHealth()
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
float multiplicator;
switch(GetEntry())
switch (GetEntry())
{
case ENTRY_IMP: multiplicator = 8.4f; break;
case ENTRY_VOIDWALKER: multiplicator = 11.0f; break;
@@ -1246,7 +1246,7 @@ void Guardian::UpdateMaxPower(Powers power)
float addValue = (power == POWER_MANA) ? GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT) : 0.0f;
float multiplicator = 15.0f;
switch(GetEntry())
switch (GetEntry())
{
case ENTRY_IMP: multiplicator = 4.95f; break;
case ENTRY_VOIDWALKER:
@@ -1386,7 +1386,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
// Pet's base damage changes depending on happiness
if (isHunterPet() && attType == BASE_ATTACK)
{
switch(ToPet()->GetHappinessState())
switch (ToPet()->GetHappinessState())
{
case HAPPY:
// 125% of normal damage
+55 -55
View File
@@ -685,7 +685,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
uint32 weaponSpeedHitFactor;
uint32 rage_damage = damage + cleanDamage->absorbed_damage;
switch(cleanDamage->attackType)
switch (cleanDamage->attackType)
{
case BASE_ATTACK:
{
@@ -1196,7 +1196,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
// Calculate armor reduction
if (IsDamageReducedByArmor((SpellSchoolMask)(damageInfo->damageSchoolMask)))
{
damageInfo->damage = CalcArmorReducedDamage(damageInfo->target, damage, NULL , damageInfo->attackType);
damageInfo->damage = CalcArmorReducedDamage(damageInfo->target, damage, NULL, damageInfo->attackType);
damageInfo->cleanDamage += damage - damageInfo->damage;
}
else
@@ -1420,7 +1420,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
{
SpellInfo const* i_spellProto = (*dmgShieldItr)->GetSpellInfo();
// Damage shield can be resisted...
if (SpellMissInfo missInfo = victim->SpellHitResult(this, i_spellProto , false))
if (SpellMissInfo missInfo = victim->SpellHitResult(this, i_spellProto, false))
{
victim->SendSpellMiss(this, i_spellProto->Id, missInfo);
continue;
@@ -2734,7 +2734,7 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victi
if (GetTypeId() == TYPEID_PLAYER)
{
switch(attackType)
switch (attackType)
{
case BASE_ATTACK:
crit = GetFloatValue(PLAYER_CRIT_PERCENTAGE);
@@ -3601,7 +3601,7 @@ void Unit::RemoveAuraFromStack(uint32 spellId, uint64 caster, AuraRemoveMode rem
if ((aura->GetType() == UNIT_AURA_TYPE)
&& (!caster || aura->GetCasterGUID() == caster))
{
aura->ModStackAmount(-1,removeMode);
aura->ModStackAmount(-1, removeMode);
return;
}
else
@@ -4079,7 +4079,7 @@ void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
// update for out of range group members (on 1 slot use)
aura->SetNeedClientUpdateForTargets();
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId() , GetGUIDLow(), aura->GetDuration());
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId(), GetGUIDLow(), aura->GetDuration());
}
}
}
@@ -4769,7 +4769,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo)
data << uint32(aura->GetId()); // spellId
data << uint32(1); // count
data << uint32(aura->GetAuraType()); // auraId
switch(aura->GetAuraType())
switch (aura->GetAuraType())
{
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
@@ -4928,11 +4928,11 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
Unit* target = victim;
int32 basepoints0 = 0;
switch(hasteSpell->SpellFamilyName)
switch (hasteSpell->SpellFamilyName)
{
case SPELLFAMILY_ROGUE:
{
switch(hasteSpell->Id)
switch (hasteSpell->Id)
{
// Blade Flurry
case 13877:
@@ -4987,11 +4987,11 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit* victim, uint32 /*damage*/, AuraEf
Unit* target = victim;
int32 basepoints0 = 0;
switch(triggeredByAuraSpell->SpellFamilyName)
switch (triggeredByAuraSpell->SpellFamilyName)
{
case SPELLFAMILY_MAGE:
{
switch(triggeredByAuraSpell->Id)
switch (triggeredByAuraSpell->Id)
{
// Focus Magic
case 54646:
@@ -5054,7 +5054,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
int32 basepoints0 = 0;
uint64 originalCaster = 0;
switch(dummySpell->SpellFamilyName)
switch (dummySpell->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
{
@@ -5118,7 +5118,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (!GetAuraEffect(SPELL_AURA_MOD_MANA_REGEN_INTERRUPT, SPELLFAMILY_MAGE, 0x10000000, 0, 0))
return false;
switch(GetFirstSchoolInMask(procSpell->GetSchoolMask()))
switch (GetFirstSchoolInMask(procSpell->GetSchoolMask()))
{
case SPELL_SCHOOL_NORMAL:
case SPELL_SCHOOL_HOLY:
@@ -5141,7 +5141,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (!procSpell)
return false;
switch(GetFirstSchoolInMask(procSpell->GetSchoolMask()))
switch (GetFirstSchoolInMask(procSpell->GetSchoolMask()))
{
case SPELL_SCHOOL_NORMAL:
return false; // ignore
@@ -5701,7 +5701,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 37436;
break;
}
switch(dummySpell->Id)
switch (dummySpell->Id)
{
// Glyph of Polymorph
case 56375:
@@ -5795,7 +5795,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
case SPELLFAMILY_WARRIOR:
{
switch(dummySpell->Id)
switch (dummySpell->Id)
{
// Sweeping Strikes
case 12328:
@@ -6206,7 +6206,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
case SPELLFAMILY_DRUID:
{
switch(dummySpell->Id)
switch (dummySpell->Id)
{
// Glyph of Innervate
case 54832:
@@ -6957,7 +6957,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
case SPELLFAMILY_SHAMAN:
{
switch(dummySpell->Id)
switch (dummySpell->Id)
{
// Earthen Power (Rank 1, 2)
case 51523:
@@ -7776,7 +7776,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit* victim, uint32 /*damage*/, AuraEffec
Unit* target = victim;
int32 basepoints0 = 0;
switch(dummySpell->SpellFamilyName)
switch (dummySpell->SpellFamilyName)
{
case SPELLFAMILY_HUNTER:
{
@@ -7829,7 +7829,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit* victim, uint32 /*damage*/, Aura
Unit* target = victim;
int32 basepoints0 = 0;
switch(dummySpell->SpellFamilyName)
switch (dummySpell->SpellFamilyName)
{
case SPELLFAMILY_PALADIN:
{
@@ -7878,7 +7878,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
{
SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo();
switch(dummySpell->SpellFamilyName)
switch (dummySpell->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
switch (dummySpell->Id)
@@ -8084,7 +8084,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
return false;
}
switch(dummySpell->Id)
switch (dummySpell->Id)
{
// Bone Shield cooldown
case 49222:
@@ -8270,7 +8270,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
{
if (!procSpell)
return false;
switch(GetFirstSchoolInMask(procSpell->GetSchoolMask()))
switch (GetFirstSchoolInMask(procSpell->GetSchoolMask()))
{
case SPELL_SCHOOL_NORMAL:
return false; // ignore
@@ -8456,7 +8456,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
// Holy Shock heal
if (procSpell->SpellFamilyFlags[1] & 0x00010000)
{
switch(procSpell->Id)
switch (procSpell->Id)
{
case 25914: originalSpellId = 20473; break;
case 25913: originalSpellId = 20929; break;
@@ -8562,7 +8562,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
{
if (!procSpell)
return false;
switch(GetFirstSchoolInMask(procSpell->GetSchoolMask()))
switch (GetFirstSchoolInMask(procSpell->GetSchoolMask()))
{
case SPELL_SCHOOL_NORMAL:
return false; // ignore
@@ -9038,7 +9038,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au
uint32 triggered_spell_id = 0;
switch(scriptId)
switch (scriptId)
{
case 836: // Improved Blizzard (Rank 1)
{
@@ -9089,7 +9089,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au
{
if (!roll_chance_i(triggeredByAura->GetAmount()))
return false;
switch(victim->getPowerType())
switch (victim->getPowerType())
{
case POWER_MANA: triggered_spell_id = 48542; break;
case POWER_RAGE: triggered_spell_id = 48541; break;
@@ -9147,7 +9147,7 @@ void Unit::setPowerType(Powers new_powertype)
}
}
switch(new_powertype)
switch (new_powertype)
{
default:
case POWER_MANA:
@@ -10405,7 +10405,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
}
// Custom scripted damage
switch(spellProto->SpellFamilyName)
switch (spellProto->SpellFamilyName)
{
case SPELLFAMILY_MAGE:
// Ice Lance
@@ -10577,7 +10577,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
AuraEffectList const& mDummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
{
switch((*i)->GetSpellInfo()->SpellIconID)
switch ((*i)->GetSpellInfo()->SpellIconID)
{
// Cheat Death
case 2109:
@@ -10814,7 +10814,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
return false;
float crit_chance = 0.0f;
switch(spellProto->DmgClass)
switch (spellProto->DmgClass)
{
case SPELL_DAMAGE_CLASS_NONE:
// We need more spells to find a general way (if there is any)
@@ -10857,7 +10857,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
if (!((*i)->IsAffectedOnSpell(spellProto)))
continue;
int32 modChance = 0;
switch((*i)->GetMiscValue())
switch ((*i)->GetMiscValue())
{
// Shatter
case 911: modChance+= 16;
@@ -10954,7 +10954,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
if (victim)
{
// Custom crit by class
switch(spellProto->SpellFamilyName)
switch (spellProto->SpellFamilyName)
{
case SPELLFAMILY_DRUID:
// Rend and Tear - bonus crit chance for Ferocious Bite on bleeding targets
@@ -11008,7 +11008,7 @@ uint32 Unit::SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage
int32 crit_bonus = damage;
float crit_mod = 0.0f;
switch(spellProto->DmgClass)
switch (spellProto->DmgClass)
{
case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100%
case SPELL_DAMAGE_CLASS_RANGED:
@@ -11043,7 +11043,7 @@ uint32 Unit::SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damag
{
// Calculate critical bonus
int32 crit_bonus;
switch(spellProto->DmgClass)
switch (spellProto->DmgClass)
{
case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100%
case SPELL_DAMAGE_CLASS_RANGED:
@@ -11099,7 +11099,7 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32
{
if (!(*i)->IsAffectedOnSpell(spellProto))
continue;
switch((*i)->GetMiscValue())
switch ((*i)->GetMiscValue())
{
case 4415: // Increased Rejuvenation Healing
case 4953:
@@ -11144,7 +11144,7 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32
}
case 7871: // Glyph of Lesser Healing Wave
{
if (victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0 , 0x00000400, 0, GetGUID()))
if (victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0, 0x00000400, 0, GetGUID()))
AddPctN(DoneTotalMod, (*i)->GetAmount());
break;
}
@@ -11680,7 +11680,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
// Custom scripted damage
if (spellProto)
switch(spellProto->SpellFamilyName)
switch (spellProto->SpellFamilyName)
{
case SPELLFAMILY_DEATHKNIGHT:
// Glacier Rot
@@ -11723,7 +11723,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
AuraEffectList const& mDummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
{
switch((*i)->GetSpellInfo()->SpellIconID)
switch ((*i)->GetSpellInfo()->SpellIconID)
{
// Cheat Death
case 2109:
@@ -11759,7 +11759,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
/*AuraEffectList const& mclassScritAuras = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for (AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i)
{
switch((*i)->GetMiscValue())
switch ((*i)->GetMiscValue())
{
}
}*/
@@ -12559,7 +12559,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
WorldPacket data;
if (!forced)
{
switch(mtype)
switch (mtype)
{
case MOVE_WALK:
data.Initialize(MSG_MOVE_SET_WALK_SPEED, 8+4+2+4+4+4+4+4+4+4);
@@ -12618,7 +12618,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
pet->SetSpeed(mtype, m_speed_rate[mtype], forced);
}
switch(mtype)
switch (mtype)
{
case MOVE_WALK:
data.Initialize(SMSG_FORCE_WALK_SPEED_CHANGE, 16);
@@ -13202,7 +13202,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,
if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TAUNT_DIMINISH))
{
DiminishingLevels diminish = Level;
switch(diminish)
switch (diminish)
{
case DIMINISHING_LEVEL_1: break;
case DIMINISHING_LEVEL_2: mod = 0.65f; break;
@@ -13220,7 +13220,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,
|| GetDiminishingReturnsGroupType(group) == DRTYPE_ALL)
{
DiminishingLevels diminish = Level;
switch(diminish)
switch (diminish)
{
case DIMINISHING_LEVEL_1: break;
case DIMINISHING_LEVEL_2: mod = 0.5f; break;
@@ -13334,7 +13334,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
if (!CanModifyStats())
return false;
switch(unitMod)
switch (unitMod)
{
case UNIT_MOD_STAT_STRENGTH:
case UNIT_MOD_STAT_AGILITY:
@@ -13427,7 +13427,7 @@ SpellSchools Unit::GetSpellSchoolByAuraGroup(UnitMods unitMod) const
{
SpellSchools school = SPELL_SCHOOL_NORMAL;
switch(unitMod)
switch (unitMod)
{
case UNIT_MOD_RESISTANCE_HOLY: school = SPELL_SCHOOL_HOLY; break;
case UNIT_MOD_RESISTANCE_FIRE: school = SPELL_SCHOOL_FIRE; break;
@@ -13447,7 +13447,7 @@ Stats Unit::GetStatByAuraGroup(UnitMods unitMod) const
{
Stats stat = STAT_STRENGTH;
switch(unitMod)
switch (unitMod)
{
case UNIT_MOD_STAT_STRENGTH: stat = STAT_STRENGTH; break;
case UNIT_MOD_STAT_AGILITY: stat = STAT_AGILITY; break;
@@ -13495,7 +13495,7 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
}
}
float Unit::GetWeaponDamageRange(WeaponAttackType attType , WeaponDamageRange type) const
float Unit::GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const
{
if (attType == OFF_ATTACK && !haveOffhandWeapon())
return 0.0f;
@@ -14306,7 +14306,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
AuraEffect* triggeredByAura = i->aura->GetEffect(effIndex);
ASSERT(triggeredByAura);
switch(triggeredByAura->GetAuraType())
switch (triggeredByAura->GetAuraType())
{
case SPELL_AURA_PROC_TRIGGER_SPELL:
{
@@ -14318,7 +14318,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
}
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
{
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount(), spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask);
uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE);
CalculateSpellDamageTaken(&damageInfo, damage, spellInfo);
@@ -15588,7 +15588,7 @@ void Unit::SetControlled(bool apply, UnitState state)
return;
AddUnitState(state);
switch(state)
switch (state)
{
case UNIT_STAT_STUNNED:
SetStunned(true);
@@ -15618,7 +15618,7 @@ void Unit::SetControlled(bool apply, UnitState state)
}
else
{
switch(state)
switch (state)
{
case UNIT_STAT_STUNNED: if (HasAuraType(SPELL_AURA_MOD_STUN)) return;
else SetStunned(false); break;
@@ -15901,7 +15901,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
if (charmer->GetTypeId() == TYPEID_PLAYER)
{
switch(type)
switch (type)
{
case CHARM_TYPE_VEHICLE:
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
@@ -16008,7 +16008,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
if (charmer->GetTypeId() == TYPEID_PLAYER)
{
switch(type)
switch (type)
{
case CHARM_TYPE_VEHICLE:
charmer->ToPlayer()->SetClientControl(charmer, 1);
@@ -16572,7 +16572,7 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form)
// Male
if (getGender() == GENDER_MALE)
{
switch(skinColor)
switch (skinColor)
{
case 12: // White
case 13:
+5 -5
View File
@@ -1443,7 +1443,7 @@ class Unit : public WorldObject
int32 DealHeal(Unit* pVictim, uint32 addhealth);
void ProcDamageAndSpell(Unit* pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL);
void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage , SpellInfo const* procAura = NULL);
void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage, SpellInfo const* procAura = NULL);
void GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTriggeringProc, std::list<AuraApplication*>* procAuras, ProcEventInfo eventInfo);
void TriggerAurasProcOnEvent(CalcDamageInfo& damageInfo);
@@ -1490,7 +1490,7 @@ class Unit : public WorldObject
int32 GetMechanicResistChance(const SpellInfo* spell);
bool CanUseAttackType(uint8 attacktype) const
{
switch(attacktype)
switch (attacktype)
{
case BASE_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED);
case OFF_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_DISARM_OFFHAND);
@@ -1783,7 +1783,7 @@ class Unit : public WorldObject
AuraEffect* GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const;
AuraEffect* GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const;
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const; // spell mustn't have familyflags
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1 , uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0);
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0);
inline AuraEffect* GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);}
AuraApplication * GetAuraApplication(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, AuraApplication * except = NULL) const;
@@ -1926,8 +1926,8 @@ class Unit : public WorldObject
virtual void UpdateAttackPowerAndDamage(bool ranged = false) = 0;
virtual void UpdateDamagePhysical(WeaponAttackType attType) = 0;
float GetTotalAttackPowerValue(WeaponAttackType attType) const;
float GetWeaponDamageRange(WeaponAttackType attType , WeaponDamageRange type) const;
void SetBaseWeaponDamage(WeaponAttackType attType , WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; }
float GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const;
void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; }
bool isInFrontInMap(Unit const* target, float distance, float arc = M_PI) const;
void SetInFront(Unit const* target)