diff options
| author | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
| commit | b16d2245bbd374805d15cdca585e8b42bf139605 (patch) | |
| tree | b7b63c567112e1999a2566611363cf5e83adb1be /src/server/scripts/Spells | |
| parent | 8b820baa7324d41df264f48e344d62584bff70f8 (diff) | |
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
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 14 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 4 |
7 files changed, 21 insertions, 21 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 0245888e92e..86b92eebfe3 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -168,9 +168,9 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader SpellInfo const* talentSpell = sSpellMgr->GetSpellInfo(DK_SPELL_ANTI_MAGIC_SHELL_TALENT); amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster()); Unit* caster = GetCaster(); - if(!caster) + if (!caster) return; - if(Player* player = caster->ToPlayer()) + if (Player* player = caster->ToPlayer()) amount += int32(2 * player->GetTotalAttackPowerValue(BASE_ATTACK)); } @@ -607,7 +607,7 @@ public: } }; -// 50391,50392 Improved Unholy Presence +// 50391, 50392 Improved Unholy Presence class spell_dk_improved_unholy_presence : public SpellScriptLoader { public: @@ -632,7 +632,7 @@ public: { // Not listed as any effect, only base points set in dbc int32 basePoints0 = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); - target->CastCustomSpell(target, DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints0 , &basePoints0, &basePoints0, true, 0, aurEff); + target->CastCustomSpell(target, DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints0, &basePoints0, &basePoints0, true, 0, aurEff); } } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index f90fe53a9e2..f0b48a5ad90 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -102,7 +102,7 @@ class spell_gen_av_drekthar_presence : public SpellScriptLoader bool CheckAreaTarget(Unit* target) { - switch(target->GetEntry()) + switch (target->GetEntry()) { // alliance case 14762: // Dun Baldar North Marshal @@ -1226,7 +1226,7 @@ class spell_gen_launch : public SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { if (Player* player = GetHitPlayer()) - player->AddAura(SPELL_LAUNCH_NO_FALLING_DAMAGE,player); // prevents falling damage + player->AddAura(SPELL_LAUNCH_NO_FALLING_DAMAGE, player); // prevents falling damage } void Launch() @@ -1241,10 +1241,10 @@ class spell_gen_launch : public SpellScriptLoader // There is no spell for this, the following calculation was based on void Spell::CalculateJumpSpeeds float speedZ = 10.0f; - float dist = position->GetExactDist2d(player->GetPositionX(),player->GetPositionY()); + float dist = position->GetExactDist2d(player->GetPositionX(), player->GetPositionY()); float speedXY = dist; - player->GetMotionMaster()->MoveJump(position->GetPositionX(),position->GetPositionY(),position->GetPositionZ(),speedXY,speedZ); + player->GetMotionMaster()->MoveJump(position->GetPositionX(), position->GetPositionY(), position->GetPositionZ(), speedXY, speedZ); } } @@ -1324,8 +1324,8 @@ public: PrepareSpellScript(spell_gen_oracle_wolvar_reputation_SpellScript) void HandleDummy(SpellEffIndex effIndex) - { - + { + if (Player* player = GetCaster()->ToPlayer()) { @@ -1344,7 +1344,7 @@ public: // EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation } - + } void Register() diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index baa998f9487..2346a30640c 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1108,7 +1108,7 @@ class spell_magic_eater_food : public SpellScriptLoader target->CastSpell(target, SPELL_WELL_FED_3, true); break; case 4: - target->CastSpell(target, SPELL_WELL_FED_4, true); + target->CastSpell(target, SPELL_WELL_FED_4, true); break; case 5: target->CastSpell(target, SPELL_WELL_FED_5, true); diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index f07a13bf7db..84df4418078 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -141,7 +141,7 @@ public: if (Unit* unitTarget = GetHitUnit()) { uint32 spell_id = 0; - switch(unitTarget->getClass()) + switch (unitTarget->getClass()) { case CLASS_DRUID: spell_id = SPELL_BLESSING_OF_LOWER_CITY_DRUID; break; case CLASS_PALADIN: spell_id = SPELL_BLESSING_OF_LOWER_CITY_PALADIN; break; diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 83281a9c93f..07b8a79691a 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -131,7 +131,7 @@ class spell_pri_mind_sear : public SpellScriptLoader void FilterTargets(std::list<Unit*>& unitList) { - unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT))); + unitList.remove_if (Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT))); } void Register() diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 6fbd33fe81b..6ae9577070e 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -648,7 +648,7 @@ public: Unit* target = GetTarget(); if (Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself()) { - switch(target->GetEntry()) + switch (target->GetEntry()) { case NPC_FROSTWORG: target->CastSpell(player, SPELL_FROSTWORG_CREDIT, true); @@ -707,7 +707,7 @@ public: Unit* pCaster = GetCaster(); if (Player* player = pCaster->ToPlayer()) { - if(Creature* target = GetHitCreature()) + if (Creature* target = GetHitCreature()) { player->CastSpell(player, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true, NULL); player->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER, 0); @@ -948,7 +948,7 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader */ enum eBattleStandard { - NPC_KING_OF_THE_MOUNTAINT_KC = 31766, + NPC_KING_OF_THE_MOUNTAINT_KC = 31766, }; class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader { @@ -959,11 +959,11 @@ public: { PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript) void HandleDummy(SpellEffIndex /*effIndex*/) - { + { Unit* caster = GetCaster(); if (caster->IsVehicle()) if (Unit* player = caster->GetVehicleKit()->GetPassenger(0)) - player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC,0); + player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC, 0); } void Register() diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index ff389f41075..76dac9b59f1 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -250,7 +250,7 @@ class spell_sha_bloodlust : public SpellScriptLoader void RemoveInvalidTargets(std::list<Unit*>& targets) { - targets.remove_if(Trinity::UnitAuraCheck(true, SHAMAN_SPELL_SATED)); + targets.remove_if (Trinity::UnitAuraCheck(true, SHAMAN_SPELL_SATED)); } void ApplyDebuff() @@ -291,7 +291,7 @@ class spell_sha_heroism : public SpellScriptLoader void RemoveInvalidTargets(std::list<Unit*>& targets) { - targets.remove_if(Trinity::UnitAuraCheck(true, SHAMAN_SPELL_EXHAUSTION)); + targets.remove_if (Trinity::UnitAuraCheck(true, SHAMAN_SPELL_EXHAUSTION)); } void ApplyDebuff() |
