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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user