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:
@@ -449,7 +449,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
float DoneActualBenefit = 0.0f;
|
||||
|
||||
// custom amount calculations go here
|
||||
switch(GetAuraType())
|
||||
switch (GetAuraType())
|
||||
{
|
||||
// crowd control auras
|
||||
case SPELL_AURA_MOD_CONFUSE:
|
||||
@@ -483,7 +483,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
m_canBeRecalculated = false;
|
||||
if (!caster)
|
||||
break;
|
||||
switch(GetSpellInfo()->SpellFamilyName)
|
||||
switch (GetSpellInfo()->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
// Ice Barrier
|
||||
@@ -864,7 +864,7 @@ void AuraEffect::CalculateSpellMod()
|
||||
switch (GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_DUMMY:
|
||||
switch(GetSpellInfo()->SpellFamilyName)
|
||||
switch (GetSpellInfo()->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_PRIEST:
|
||||
// Pain and Suffering
|
||||
@@ -904,7 +904,7 @@ void AuraEffect::CalculateSpellMod()
|
||||
break;
|
||||
}
|
||||
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 51466: // Elemental oath
|
||||
case 51470: // Elemental oath
|
||||
@@ -1112,21 +1112,21 @@ void AuraEffect::Update(uint32 diff, Unit* caster)
|
||||
|
||||
void AuraEffect::UpdatePeriodic(Unit* caster)
|
||||
{
|
||||
switch(GetAuraType())
|
||||
switch (GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_DUMMY:
|
||||
// Haunting Spirits
|
||||
if (GetId() == 7057)
|
||||
{
|
||||
m_amplitude = irand (0 , 60) + 30;
|
||||
m_amplitude = irand (0, 60) + 30;
|
||||
m_amplitude *= IN_MILLISECONDS;
|
||||
}
|
||||
break;
|
||||
case SPELL_AURA_PERIODIC_DUMMY:
|
||||
switch(GetSpellInfo()->SpellFamilyName)
|
||||
switch (GetSpellInfo()->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
// Drink
|
||||
case 430:
|
||||
@@ -1287,7 +1287,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const
|
||||
|
||||
Unit* target = aurApp->GetTarget();
|
||||
|
||||
switch(GetAuraType())
|
||||
switch (GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_PERIODIC_DUMMY:
|
||||
HandlePeriodicDummyAuraTick(target, caster);
|
||||
@@ -1327,7 +1327,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const
|
||||
case SPELL_AURA_DUMMY:
|
||||
// Haunting Spirits
|
||||
if (GetId() == 7057)
|
||||
target->CastSpell((Unit*)NULL , GetAmount(), true);
|
||||
target->CastSpell((Unit*)NULL, GetAmount(), true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1337,7 +1337,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const
|
||||
void AuraEffect::HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
// TODO: effect script handlers here
|
||||
switch(GetAuraType())
|
||||
switch (GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL:
|
||||
HandleProcTriggerSpellAuraProc(aurApp, eventInfo);
|
||||
@@ -1388,7 +1388,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
//uint32 spellId3 = 0;
|
||||
uint32 HotWSpellId = 0;
|
||||
|
||||
switch(GetMiscValue())
|
||||
switch (GetMiscValue())
|
||||
{
|
||||
case FORM_CAT:
|
||||
spellId = 3025;
|
||||
@@ -1518,11 +1518,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
}
|
||||
}
|
||||
}
|
||||
switch(GetMiscValue())
|
||||
switch (GetMiscValue())
|
||||
{
|
||||
case FORM_CAT:
|
||||
// Savage Roar
|
||||
if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0))
|
||||
if (target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0, 0x10000000, 0))
|
||||
target->CastSpell(target, 62071, true);
|
||||
// Nurturing Instinct
|
||||
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0))
|
||||
@@ -3469,7 +3469,7 @@ void AuraEffect::HandleAuraModStateImmunity(AuraApplication const* aurApp, uint8
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_STATE, GetMiscValue(), apply);
|
||||
|
||||
if (apply && GetSpellInfo()->AttributesEx & SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY)
|
||||
target->RemoveAurasByType(AuraType(GetMiscValue()), 0 , GetBase());
|
||||
target->RemoveAurasByType(AuraType(GetMiscValue()), 0, GetBase());
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
@@ -4488,8 +4488,8 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
for(int i = 0; i < MAX_ATTACK; ++i)
|
||||
if(Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i),false))
|
||||
for (int i = 0; i < MAX_ATTACK; ++i)
|
||||
if (Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), false))
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(item, WeaponAttackType(i), this, apply);
|
||||
}
|
||||
|
||||
@@ -4669,7 +4669,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 1515: // Tame beast
|
||||
// FIX_ME: this is 2.0.12 threat effect replaced in 2.1.x by dummy aura, must be checked for correctness
|
||||
@@ -4707,7 +4707,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
{
|
||||
if (caster)
|
||||
{
|
||||
switch(caster->getGender())
|
||||
switch (caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target, 37095, true, NULL, this); // Blood Elf Disguise
|
||||
@@ -4747,7 +4747,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
case 46354: // Blood Elf Illusion
|
||||
if (caster)
|
||||
{
|
||||
switch(caster->getGender())
|
||||
switch (caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target, 46356, true, NULL, this);
|
||||
@@ -4787,7 +4787,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
if (caster) // actually we can also use cast(this, originalcasterguid)
|
||||
{
|
||||
int32 damage;
|
||||
switch(GetBase()->GetStackAmount())
|
||||
switch (GetBase()->GetStackAmount())
|
||||
{
|
||||
case 1: damage = 0; break;
|
||||
case 2: damage = 500; break;
|
||||
@@ -4820,7 +4820,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
if ((GetSpellInfo()->IsQuestTame()) && caster && caster->isAlive() && target->isAlive())
|
||||
{
|
||||
uint32 finalSpelId = 0;
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 19548: finalSpelId = 19597; break;
|
||||
case 19674: finalSpelId = 19677; break;
|
||||
@@ -4846,10 +4846,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
caster->CastSpell(target, finalSpelId, true, NULL, this);
|
||||
}
|
||||
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 2584: // Waiting to Resurrect
|
||||
// Waiting to resurrect spell cancel, we must remove player from resurrect queue
|
||||
@@ -4967,13 +4967,13 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
|
||||
// AT APPLY & REMOVE
|
||||
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
break;
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
// Recently Bandaged
|
||||
case 11196:
|
||||
@@ -5050,7 +5050,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
case 57723: // Exhaustion
|
||||
case 57724: // Sated
|
||||
{
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 57723: target->ApplySpellImmune(GetId(), IMMUNITY_ID, 32182, apply); break; // Heroism
|
||||
case 57724: target->ApplySpellImmune(GetId(), IMMUNITY_ID, 2825, apply); break; // Bloodlust
|
||||
@@ -5069,7 +5069,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
|
||||
if (apply)
|
||||
{
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 57819: FactionID = 1106; break; // Argent Crusade
|
||||
case 57820: FactionID = 1098; break; // Knights of the Ebon Blade
|
||||
@@ -5151,7 +5151,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK))
|
||||
break;
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 52610: // Savage Roar
|
||||
{
|
||||
@@ -5608,8 +5608,8 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
||||
case 66149: // Bullet Controller Periodic - 10 Man
|
||||
case 68396: // Bullet Controller Periodic - 25 Man
|
||||
{
|
||||
caster->CastCustomSpell(66152, SPELLVALUE_MAX_TARGETS, urand(1,6), target, true);
|
||||
caster->CastCustomSpell(66153, SPELLVALUE_MAX_TARGETS, urand(1,6), target, true);
|
||||
caster->CastCustomSpell(66152, SPELLVALUE_MAX_TARGETS, urand(1, 6), target, true);
|
||||
caster->CastCustomSpell(66153, SPELLVALUE_MAX_TARGETS, urand(1, 6), target, true);
|
||||
break;
|
||||
}
|
||||
case 54798: // FLAMING Arrow Triggered Effect
|
||||
@@ -5979,7 +5979,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
}
|
||||
case SPELLFAMILY_SHAMAN:
|
||||
{
|
||||
switch(auraId)
|
||||
switch (auraId)
|
||||
{
|
||||
// Lightning Shield (The Earthshatterer set trigger after cast Lighting Shield)
|
||||
case 28820:
|
||||
@@ -6541,7 +6541,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
|
||||
}
|
||||
|
||||
// spell-specific code
|
||||
switch(GetId())
|
||||
switch (GetId())
|
||||
{
|
||||
case 31447: // Mark of Kaz'rogal
|
||||
if (target->GetPower(powerType) == 0)
|
||||
|
||||
Reference in New Issue
Block a user