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:
1 parent
8b820baa73
commit
b16d2245bb
390 files changed
+1545
-1545
No files matched your search
@@ -330,7 +330,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
damage /= count; // divide to all targets
|
||||
}
|
||||
|
||||
switch(m_spellInfo->Id) // better way to check unknown
|
||||
switch (m_spellInfo->Id) // better way to check unknown
|
||||
{
|
||||
// Positive/Negative Charge
|
||||
case 28062:
|
||||
@@ -945,7 +945,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
case 35745: // Socrethar's Stone
|
||||
{
|
||||
uint32 spell_id;
|
||||
switch(m_caster->GetAreaId())
|
||||
switch (m_caster->GetAreaId())
|
||||
{
|
||||
case 3900: spell_id = 35743; break; // Socrethar Portal
|
||||
case 3742: spell_id = 35744; break; // Socrethar Portal
|
||||
@@ -1281,7 +1281,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
m_damage += CalculatePctF(damage, m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
|
||||
return;
|
||||
}
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
// Bloodthirst
|
||||
case 23881:
|
||||
@@ -1363,7 +1363,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 31789: // Righteous Defense (step 1)
|
||||
{
|
||||
@@ -1564,7 +1564,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
&& effectHandleMode == SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
|
||||
{
|
||||
// special cases
|
||||
switch(triggered_spell_id)
|
||||
switch (triggered_spell_id)
|
||||
{
|
||||
// Mirror Image
|
||||
case 58832:
|
||||
@@ -2399,7 +2399,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
|
||||
// bg reward have some special in code work
|
||||
uint32 bgType = 0;
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case SPELL_AV_MARK_WINNER:
|
||||
case SPELL_AV_MARK_LOSER:
|
||||
@@ -3189,7 +3189,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
typedef std::list< std::pair<uint32, uint64> > DispelList;
|
||||
typedef std::list< std::pair<Aura* , uint8> > DispelChargesList;
|
||||
typedef std::list< std::pair<Aura*, uint8> > DispelChargesList;
|
||||
void Spell::EffectDispel(SpellEffIndex effIndex)
|
||||
{
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
@@ -3659,7 +3659,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
// enchanting spell selected by calculated damage-per-sec stored in Effect[1] base value
|
||||
// Note: damage calculated (correctly) with rounding int32(float(v)) but
|
||||
// RW enchantments applied damage int32(float(v)+0.5), this create 0..1 difference sometime
|
||||
switch(damage)
|
||||
switch (damage)
|
||||
{
|
||||
// Rank 1
|
||||
case 2: spell_id = 36744; break; // 0% [ 7% == 2, 14% == 2, 20% == 2]
|
||||
@@ -4236,7 +4236,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
{
|
||||
// We assume that a spell have at most one fixed_bonus
|
||||
// and at most one weaponDamagePercentMod
|
||||
switch(m_spellInfo->Effects[j].Effect)
|
||||
switch (m_spellInfo->Effects[j].Effect)
|
||||
{
|
||||
case SPELL_EFFECT_WEAPON_DAMAGE:
|
||||
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
|
||||
@@ -4382,7 +4382,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
|
||||
Player* pl = m_caster->ToPlayer();
|
||||
Battleground* bg = pl->GetBattleground();
|
||||
|
||||
switch(pGameObj->GetMapId())
|
||||
switch (pGameObj->GetMapId())
|
||||
{
|
||||
case 489: //WS
|
||||
{
|
||||
@@ -4438,11 +4438,11 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
// TODO: we must implement hunter pet summon at login there (spell 6962)
|
||||
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
// Glyph of Backstab
|
||||
case 63975:
|
||||
@@ -4525,7 +4525,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
uint32 spell_id = 0;
|
||||
switch(urand(1, 5))
|
||||
switch (urand(1, 5))
|
||||
{
|
||||
case 1: spell_id = 8854; break;
|
||||
default: spell_id = 8855; break;
|
||||
@@ -4660,7 +4660,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
|
||||
canFly = false;
|
||||
|
||||
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
{
|
||||
case 75: unitTarget->CastSpell(unitTarget, 51621, true); break;
|
||||
case 150: unitTarget->CastSpell(unitTarget, 48024, true); break;
|
||||
@@ -4705,7 +4705,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
|
||||
canFly = false;
|
||||
|
||||
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
{
|
||||
case 75: unitTarget->CastSpell(unitTarget, 42680, true); break;
|
||||
case 150: unitTarget->CastSpell(unitTarget, 42683, true); break;
|
||||
@@ -4775,7 +4775,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
uint32 spellId = 0;
|
||||
switch(rand() % 4)
|
||||
switch (rand() % 4)
|
||||
{
|
||||
case 0: spellId = 46740; break;
|
||||
case 1: spellId = 46739; break;
|
||||
@@ -5021,7 +5021,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
|
||||
canFly = false;
|
||||
|
||||
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
{
|
||||
case 0: unitTarget->CastSpell(unitTarget, 71343, true); break;
|
||||
case 75: unitTarget->CastSpell(unitTarget, 71344, true); break;
|
||||
@@ -5067,7 +5067,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
|
||||
canFly = false;
|
||||
|
||||
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
{
|
||||
case 75: unitTarget->CastSpell(unitTarget, 72281, true); break;
|
||||
case 150: unitTarget->CastSpell(unitTarget, 72282, true); break;
|
||||
@@ -5130,7 +5130,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
|
||||
canFly = false;
|
||||
|
||||
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
switch (unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
|
||||
{
|
||||
case 75: unitTarget->CastSpell(unitTarget, 75619, true); break;
|
||||
case 150: unitTarget->CastSpell(unitTarget, 75620, true); break;
|
||||
@@ -5229,7 +5229,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
uint32 spell_heal;
|
||||
|
||||
switch(m_caster->GetEntry())
|
||||
switch (m_caster->GetEntry())
|
||||
{
|
||||
case 31897: spell_heal = 7001; break;
|
||||
case 31896: spell_heal = 27873; break;
|
||||
@@ -5396,7 +5396,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
}
|
||||
case SPELLFAMILY_POTION:
|
||||
{
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
// Netherbloom
|
||||
case 28702:
|
||||
@@ -5562,8 +5562,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
Map* map = m_caster->GetMap();
|
||||
if (!pGameObj->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id,
|
||||
map, m_caster->GetPhaseMask(),
|
||||
m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2 ,
|
||||
m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2 ,
|
||||
m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2,
|
||||
m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2,
|
||||
m_caster->GetPositionZ(),
|
||||
m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
|
||||
{
|
||||
@@ -5879,7 +5879,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
uint32 go_id = m_spellInfo->Effects[effIndex].MiscValue;
|
||||
|
||||
uint8 slot = 0;
|
||||
switch(m_spellInfo->Effects[effIndex].Effect)
|
||||
switch (m_spellInfo->Effects[effIndex].Effect)
|
||||
{
|
||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT1: slot = 0; break;
|
||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT2: slot = 1; break;
|
||||
@@ -6579,7 +6579,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
|
||||
switch(goinfo->type)
|
||||
switch (goinfo->type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_FISHINGNODE:
|
||||
{
|
||||
@@ -6589,7 +6589,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
// end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo))
|
||||
// start time == fish-FISHING_BOBBER_READY_TIME (0..GetDuration(m_spellInfo)-FISHING_BOBBER_READY_TIME)
|
||||
int32 lastSec = 0;
|
||||
switch(urand(0, 3))
|
||||
switch (urand(0, 3))
|
||||
{
|
||||
case 0: lastSec = 3; break;
|
||||
case 1: lastSec = 7; break;
|
||||
@@ -7229,7 +7229,7 @@ void Spell::EffectPlayerNotification(SpellEffIndex effIndex)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 58730: // Restricted Flight Area
|
||||
case 58600: // Restricted Flight Area
|
||||
|
||||
Reference in new issue
Block a user