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:
@@ -68,7 +68,7 @@ class AreaTrigger_at_aldurthar_gate : public AreaTriggerScript
|
||||
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
|
||||
{
|
||||
switch(trigger->id)
|
||||
switch (trigger->id)
|
||||
{
|
||||
case TRIGGER_SOUTH: player->KilledMonsterCredit(NPC_SOUTH_GATE, 0); break;
|
||||
case TRIGGER_CENTRAL: player->KilledMonsterCredit(NPC_CENTRAL_GATE, 0); break;
|
||||
@@ -205,7 +205,7 @@ class AreaTrigger_at_warsong_farms : public AreaTriggerScript
|
||||
{
|
||||
if (!player->isDead() && player->GetQuestStatus(QUEST_THE_WARSONG_FARMS) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
switch(trigger->id)
|
||||
switch (trigger->id)
|
||||
{
|
||||
case AT_SLAUGHTERHOUSE: player->KilledMonsterCredit(NPC_CREDIT_SLAUGHTERHOUSE, 0); break;
|
||||
case AT_GRAINERY: player->KilledMonsterCredit(NPC_CREDIT_GRAINERY, 0); break;
|
||||
@@ -305,7 +305,7 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
|
||||
|
||||
WorldLocation pPosition;
|
||||
|
||||
switch(trigger->id)
|
||||
switch (trigger->id)
|
||||
{
|
||||
case 5332:
|
||||
case 5338:
|
||||
@@ -357,7 +357,7 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
|
||||
if (player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && !player->isDead() &&
|
||||
player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED)
|
||||
{
|
||||
switch(trigger->id)
|
||||
switch (trigger->id)
|
||||
{
|
||||
case AT_SHOLAZAR: player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, false); break;
|
||||
case AT_UNGORO: player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, false); break;
|
||||
|
||||
@@ -122,7 +122,7 @@ struct emerald_dragonAI : public WorldBossAI
|
||||
// Despawntime is 2 minutes, so reschedule it for new cast after 2 minutes + a minor "random time" (30 seconds at max)
|
||||
DoCast(me, SPELL_SEEPING_FOG_LEFT, true);
|
||||
DoCast(me, SPELL_SEEPING_FOG_RIGHT, true);
|
||||
events.ScheduleEvent(EVENT_SEEPING_FOG, urand(120000,150000));
|
||||
events.ScheduleEvent(EVENT_SEEPING_FOG, urand(120000, 150000));
|
||||
break;
|
||||
case EVENT_NOXIOUS_BREATH:
|
||||
// Noxious Breath is cast on random intervals, no less than 7.5 seconds between
|
||||
@@ -241,7 +241,7 @@ class spell_dream_fog_sleep : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove_if(DreamFogTargetSelector());
|
||||
unitList.remove_if (DreamFogTargetSelector());
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -292,7 +292,7 @@ class spell_mark_of_nature : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove_if(MarkOfNatureTargetSelector());
|
||||
unitList.remove_if (MarkOfNatureTargetSelector());
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex effIndex)
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group)
|
||||
{
|
||||
//! NOTE:
|
||||
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
|
||||
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_PARTY:
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild)
|
||||
{
|
||||
switch(type)
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_GUILD:
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
{
|
||||
uint32 Spell = 0;
|
||||
|
||||
switch(pFaction->faction)
|
||||
switch (pFaction->faction)
|
||||
{
|
||||
case 1011: Spell = SPELL_REP_LC; break;
|
||||
case 935: Spell = SPELL_REP_SHAT; break;
|
||||
@@ -434,7 +434,7 @@ public:
|
||||
float fX, fY, fZ;
|
||||
pGO->GetClosePoint(fX, fY, fZ, pGO->GetObjectSize(), INTERACTION_DISTANCE);
|
||||
|
||||
switch(pGO->GetEntry())
|
||||
switch (pGO->GetEntry())
|
||||
{
|
||||
case GO_SHRINE_HAWK:
|
||||
BirdEntry = NPC_HAWK_GUARD;
|
||||
@@ -566,7 +566,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_BEAST, false);
|
||||
@@ -625,7 +625,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, GameObject* pGO, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->CastSpell(player, SPELL_CREATE_1_FLASK_OF_SORCERER, false);
|
||||
@@ -675,7 +675,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
{
|
||||
switch(pGO->GetEntry())
|
||||
switch (pGO->GetEntry())
|
||||
{
|
||||
case MATRIX_PUNCHOGRAPH_3005_A:
|
||||
if (player->HasItemCount(ITEM_WHITE_PUNCH_CARD, 1))
|
||||
@@ -853,7 +853,7 @@ public:
|
||||
|
||||
pPrisoner->DisappearAndDie();
|
||||
player->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
|
||||
switch(pPrisoner->GetEntry())
|
||||
switch (pPrisoner->GetEntry())
|
||||
{
|
||||
case NPC_EBON_BLADE_PRISONER_HUMAN:
|
||||
player->CastSpell(player, SPELL_SUMMON_BLADE_KNIGHT_H, true);
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
void DoReplyToTextEmote(uint32 emote)
|
||||
{
|
||||
switch(emote)
|
||||
switch (emote)
|
||||
{
|
||||
case TEXT_EMOTE_KISS: me->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
|
||||
case TEXT_EMOTE_WAVE: me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
|
||||
void ReceiveEmote(Player* player, uint32 textEmote)
|
||||
{
|
||||
switch(me->GetEntry())
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_STORMWIND_CITY_GUARD:
|
||||
case NPC_STORMWIND_CITY_PATROLLER:
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
bool disabled = false;
|
||||
|
||||
//for special scripts
|
||||
switch(itemId)
|
||||
switch (itemId)
|
||||
{
|
||||
case 24538:
|
||||
if (player->GetAreaId() != 3628)
|
||||
@@ -418,7 +418,7 @@ public:
|
||||
} else
|
||||
player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
} else
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW , pItem, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -426,7 +426,7 @@ public:
|
||||
|
||||
void SendActionMenu(Player* player, Creature* creature, uint32 uiAction)
|
||||
{
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
@@ -510,7 +510,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiSender)
|
||||
switch (uiSender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, uiAction); break;
|
||||
case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, uiAction); break;
|
||||
@@ -601,7 +601,7 @@ public:
|
||||
|
||||
void SendActionMenu(Player* player, Creature* creature, uint32 uiAction)
|
||||
{
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
@@ -669,7 +669,7 @@ public:
|
||||
{
|
||||
if (uiAction)
|
||||
{
|
||||
switch(creature->GetEntry())
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case 11191:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction);
|
||||
@@ -1103,7 +1103,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiSender)
|
||||
switch (uiSender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, uiAction); break;
|
||||
case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, uiAction); break;
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
if (creature->isQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
switch(creature->GetEntry())
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case 17435: // Azuremyst Isle - Susurrus
|
||||
if (player->HasItemCount(23843, 1, true))
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
//spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
if (!lastSpawnedGuard)
|
||||
SpawnedGUID = 0;
|
||||
|
||||
switch(SpawnAssoc->spawnType)
|
||||
switch (SpawnAssoc->spawnType)
|
||||
{
|
||||
case SPAWNTYPE_ALARMBOT:
|
||||
{
|
||||
@@ -348,7 +348,7 @@ public:
|
||||
|
||||
void ReceiveEmote(Player* player, uint32 emote)
|
||||
{
|
||||
switch(emote)
|
||||
switch (emote)
|
||||
{
|
||||
case TEXT_EMOTE_CHICKEN:
|
||||
if (player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE && rand() % 30 == 1)
|
||||
@@ -455,7 +455,7 @@ public:
|
||||
WorldPacket data;
|
||||
me->BuildHeartBeatMsg(&data);
|
||||
me->SendMessageToSet(&data, true);
|
||||
switch(emote)
|
||||
switch (emote)
|
||||
{
|
||||
case TEXT_EMOTE_KISS:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SHY);
|
||||
@@ -598,7 +598,7 @@ public:
|
||||
PatientDiedCount = 0;
|
||||
PatientSavedCount = 0;
|
||||
|
||||
switch(me->GetEntry())
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case DOCTOR_ALLIANCE:
|
||||
for (uint8 i = 0; i < ALLIANCE_COORDS; ++i)
|
||||
@@ -826,7 +826,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 const diff)
|
||||
std::vector<Location*>::iterator itr = Coordinates.begin() + rand() % Coordinates.size();
|
||||
uint32 patientEntry = 0;
|
||||
|
||||
switch(me->GetEntry())
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case DOCTOR_ALLIANCE:
|
||||
patientEntry = AllianceSoldierId[rand() % 3];
|
||||
@@ -944,7 +944,7 @@ public:
|
||||
|
||||
if (Player* player = caster->ToPlayer())
|
||||
{
|
||||
switch(me->GetEntry())
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case ENTRY_SHAYA:
|
||||
if (player->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -1052,7 +1052,7 @@ public:
|
||||
{
|
||||
if (Unit* unit = Unit::GetUnit(*me, CasterGUID))
|
||||
{
|
||||
switch(me->GetEntry())
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case ENTRY_SHAYA:
|
||||
DoScriptText(SAY_SHAYA_GOODBYE, me, unit);
|
||||
@@ -1313,7 +1313,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
@@ -1417,7 +1417,7 @@ public:
|
||||
|
||||
void SendAction(Player* player, Creature* creature, uint32 action)
|
||||
{
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
@@ -1464,7 +1464,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(sender)
|
||||
switch (sender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN:
|
||||
SendAction(player, creature, action);
|
||||
@@ -1706,7 +1706,7 @@ public:
|
||||
//Add delta to make them not all hit the same time
|
||||
uint32 delta = (rand() % 7) * 100;
|
||||
me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta));
|
||||
me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , float(Info->attackpower));
|
||||
me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower));
|
||||
|
||||
// Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target
|
||||
if (!me->getVictim() && me->isSummon())
|
||||
@@ -2211,7 +2211,7 @@ public:
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
bool roll = urand(0, 1);
|
||||
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1: //Borean Tundra
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
@@ -2283,7 +2283,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->PlayerTalkClass->SendGossipMenu(TEXT_PETINFO, creature->GetGUID());
|
||||
@@ -2383,7 +2383,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
@@ -2542,7 +2542,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
@@ -2608,7 +2608,7 @@ public:
|
||||
bool noXPGain = player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN);
|
||||
bool doSwitch = false;
|
||||
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1://xp off
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user