diff options
Diffstat (limited to 'src/server/scripts')
11 files changed, 51 insertions, 51 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index fdcf88177a9..e51052bc18f 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -320,7 +320,7 @@ public: // check online security if (handler->HasLowerSecurity(target, 0)) return false; - + playerOldName = target->GetName(); } else @@ -345,7 +345,7 @@ public: handler->SetSentErrorMessage(true); return false; } - + if (WorldSession* session = handler->GetSession()) { if (!session->HasPermission(RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(newName)) diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 81608ebd458..6b8ce7732c5 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -518,7 +518,7 @@ public: uint32 copp = (money % GOLD) % SILVER; std::string receiverStr = handler->playerLink(receiver); std::string senderStr = handler->playerLink(sender); - handler->PSendSysMessage(LANG_LIST_MAIL_INFO_1 , messageId, subject.c_str(),gold, silv, copp); + handler->PSendSysMessage(LANG_LIST_MAIL_INFO_1, messageId, subject.c_str(), gold, silv, copp); handler->PSendSysMessage(LANG_LIST_MAIL_INFO_2, senderStr.c_str(), senderId, receiverStr.c_str(), receiverId); handler->PSendSysMessage(LANG_LIST_MAIL_INFO_3, TimeToTimestampStr(deliverTime).c_str(), TimeToTimestampStr(expireTime).c_str()); if (hasItem == 1) @@ -541,7 +541,7 @@ public: uint32 item_entry = fields[0].GetUInt32(); uint32 item_count = fields[1].GetUInt32(); QueryResult result4; - result4 = WorldDatabase.PQuery("SELECT name,quality FROM item_template WHERE entry = '%u'", item_entry); + result4 = WorldDatabase.PQuery("SELECT name, quality FROM item_template WHERE entry = '%u'", item_entry); Field* fields1 = result4->Fetch(); std::string item_name = fields1[0].GetString(); int item_quality = fields1[1].GetUInt8(); diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp index 55b6edbadbe..300b39fc389 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -128,7 +128,7 @@ public: int32 gy = 32 - player->GetPositionY() / SIZE_OF_GRIDS; handler->PSendSysMessage("%03u%02i%02i.mmtile", player->GetMapId(), gy, gx); - handler->PSendSysMessage("gridloc [%i,%i]", gx, gy); + handler->PSendSysMessage("gridloc [%i, %i]", gx, gy); // calculate navmesh tile location dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId()); @@ -148,7 +148,7 @@ public: int32 tilex = int32((y - min[0]) / SIZE_OF_GRIDS); int32 tiley = int32((x - min[2]) / SIZE_OF_GRIDS); - handler->PSendSysMessage("Calc [%02i,%02i]", tilex, tiley); + handler->PSendSysMessage("Calc [%02i, %02i]", tilex, tiley); // navmesh poly -> navmesh tile location dtQueryFilter filter = dtQueryFilter(); @@ -156,16 +156,16 @@ public: navmeshquery->findNearestPoly(location, extents, &filter, &polyRef, NULL); if (polyRef == INVALID_POLYREF) - handler->PSendSysMessage("Dt [??,??] (invalid poly, probably no tile loaded)"); + handler->PSendSysMessage("Dt [??, ??] (invalid poly, probably no tile loaded)"); else { dtMeshTile const* tile; dtPoly const* poly; navmesh->getTileAndPolyByRef(polyRef, &tile, &poly); if (tile) - handler->PSendSysMessage("Dt [%02i,%02i]", tile->header->x, tile->header->y); + handler->PSendSysMessage("Dt [%02i, %02i]", tile->header->x, tile->header->y); else - handler->PSendSysMessage("Dt [??,??] (no tile loaded)"); + handler->PSendSysMessage("Dt [??, ??] (no tile loaded)"); } return true; @@ -190,7 +190,7 @@ public: if (!tile || !tile->header) continue; - handler->PSendSysMessage("[%02i,%02i]", tile->header->x, tile->header->y); + handler->PSendSysMessage("[%02i, %02i]", tile->header->x, tile->header->y); } return true; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 97eeb385e15..6fe0934191e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -222,7 +222,7 @@ class boss_arlokk : public CreatureScript break; case EVENT_MARK_OF_ARLOKK: { - Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, urand(1,3), 0.0f, false, -SPELL_MARK_OF_ARLOKK); + Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, urand(1, 3), 0.0f, false, -SPELL_MARK_OF_ARLOKK); if (!target) target = me->getVictim(); if (target) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index bd7b7a8798c..9a94ab02348 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -409,7 +409,7 @@ class spell_threatening_gaze : public SpellScriptLoader void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (Unit* caster = GetCaster()) - if(Unit* target = GetTarget()) + if (Unit* target = GetTarget()) if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) caster->CastSpell(target, SPELL_WATCH_CHARGE); } diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp index c523cfba952..6458047bb60 100644 --- a/src/server/scripts/Kalimdor/zone_winterspring.cpp +++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp @@ -154,14 +154,14 @@ struct DialogueEntry class DialogueHelper { public: - // The array MUST be terminated by {0,0,0} + // The array MUST be terminated by {0, 0, 0} DialogueHelper(DialogueEntry const* dialogueArray) : _dialogueArray(dialogueArray), _currentEntry(NULL), _actionTimer(0), _isFirstSide(true) {} - // The array MUST be terminated by {0,0,0,0,0} + // The array MUST be terminated by {0, 0, 0, 0, 0} /// Function to initialize the dialogue helper for instances. If not used with instances, GetSpeakerByEntry MUST be overwritten to obtain the speakers /// Set if take first entries or second entries @@ -183,7 +183,7 @@ public: if (!found) return; - + DoNextDialogueStep(); } @@ -398,7 +398,7 @@ public: void WaypointReached(uint32 pointId) { - switch(pointId) + switch (pointId) { case 3: Talk(SAY_ENTER_OWL_THICKET); @@ -437,7 +437,7 @@ public: SetEscortPaused(true); DoSummonPriestess(); Talk(SAY_RANSHALLA_ALTAR_2); - events.ScheduleEvent(EVENT_RESUME,2000); + events.ScheduleEvent(EVENT_RESUME, 2000); break; case 44: // Stop the escort and turn towards the altar diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index bd8afded346..090ebbca69d 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -148,10 +148,10 @@ class npc_announcer_toc10 : public CreatureScript break; } } - + if (i >= NUM_MESSAGES) return false; - + player->SEND_GOSSIP_MENU(_GossipMessage[i].msgnum, creature->GetGUID()); return true; } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 4b2961d2616..105b4757066 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -95,7 +95,7 @@ enum Yells SAY_STORMWIND_ROLEPLAY_2 = 1, SAY_STORMWIND_ROLEPLAY_3 = 2, SAY_STORMWIND_ROLEPLAY_6 = 3, - + // King Llane SAY_STORMWIND_ROLEPLAY_5 = 0, }; @@ -440,7 +440,7 @@ class boss_voice_of_yogg_saron : public CreatureScript void EnterEvadeMode() { BossAI::EnterEvadeMode(); - + for (uint8 i = DATA_SARA; i <= DATA_MIMIRON_YS; ++i) if (Creature* creature = ObjectAccessor::GetCreature(*me, instance->GetData64(i))) creature->AI()->EnterEvadeMode(); @@ -448,7 +448,7 @@ class boss_voice_of_yogg_saron : public CreatureScript // not sure, spoken by Sara (sound), regarding to wowwiki Voice whispers it Map::PlayerList const& players = me->GetMap()->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if (Player *player = itr->getSource()) + if (Player* player = itr->getSource()) { if (events.IsInPhase(PHASE_ONE)) Talk(WHISPER_VOICE_PHASE_1_WIPE, player->GetGUID()); @@ -670,16 +670,16 @@ class boss_sara : public CreatureScript std::map<uint64, uint64>::const_iterator itr = _linkData.find(guid); if (itr != _linkData.end()) return itr->second; - + return 0; } - + void SetLinkBetween(uint64 player1, uint64 player2) { _linkData[player1] = player2; _linkData[player2] = player1; } - + // called once for each target on aura remove void RemoveLinkFrom(uint64 player1) { @@ -932,7 +932,7 @@ class boss_yogg_saron : public CreatureScript Map::PlayerList const& players = me->GetMap()->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if (Player *player = itr->getSource()) + if (Player* player = itr->getSource()) { player->RemoveAurasDueToSpell(SPELL_SANITY); player->RemoveAurasDueToSpell(SPELL_INSANE); @@ -1069,7 +1069,7 @@ class boss_brain_of_yogg_saron : public CreatureScript uint8 illusion = _instance->GetData(DATA_ILLUSION); if (++_tentaclesKilled >= (illusion == ICECROWN_ILLUSION ? 9 : 8)) { - sCreatureTextMgr->SendChat(me, EMOTE_BRAIN_ILLUSION_SHATTERED, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_AREA); + sCreatureTextMgr->SendChat(me, EMOTE_BRAIN_ILLUSION_SHATTERED, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_AREA); _summons.DespawnAll(); DoCastAOE(SPELL_SHATTERED_ILLUSION, true); _instance->HandleGameObject(_instance->GetData64(GO_BRAIN_ROOM_DOOR_1 + illusion), true); @@ -1522,7 +1522,7 @@ class npc_observation_ring_keeper : public CreatureScript DoCast(SPELL_TELEPORT); Talk(SAY_KEEPER_CHOSEN_1, player->GetGUID()); Talk(SAY_KEEPER_CHOSEN_2, player->GetGUID()); - + switch (me->GetEntry()) { case NPC_FREYA_OBSERVATION_RING: @@ -2085,16 +2085,16 @@ class spell_yogg_saron_malady_of_the_mind : public SpellScriptLoader // 63830 return new spell_yogg_saron_malady_of_the_mind_AuraScript(); } }; - + class spell_yogg_saron_brain_link : public SpellScriptLoader // 63802 { public: spell_yogg_saron_brain_link() : SpellScriptLoader("spell_yogg_saron_brain_link") { } - + class spell_yogg_saron_brain_link_SpellScript : public SpellScript { PrepareSpellScript(spell_yogg_saron_brain_link_SpellScript); - + void FilterTargets(std::list<WorldObject*>& targets) { targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_ILLUSION_ROOM)); @@ -2104,17 +2104,17 @@ class spell_yogg_saron_brain_link : public SpellScriptLoader // 63802 targets.clear(); return; } - + if (SaraAI* ai = CAST_AI(SaraAI, GetCaster()->GetAI())) ai->SetLinkBetween(targets.front()->GetGUID(), targets.back()->GetGUID()); } - + void Register() { OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_brain_link_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); } }; - + class spell_yogg_saron_brain_link_AuraScript : public AuraScript { PrepareAuraScript(spell_yogg_saron_brain_link_AuraScript); @@ -2127,13 +2127,13 @@ class spell_yogg_saron_brain_link : public SpellScriptLoader // 63802 return false; return true; } - + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* caster = GetCaster(); if (!caster) return; - + if (SaraAI* ai = CAST_AI(SaraAI, caster->GetAI())) { if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) @@ -2148,36 +2148,36 @@ class spell_yogg_saron_brain_link : public SpellScriptLoader // 63802 } } } - + void DummyTick(AuraEffect const* aurEff) { Unit* caster = GetCaster(); if (!caster) return; - + SaraAI* ai = CAST_AI(SaraAI, caster->GetAI()); if (!ai) return; - + Player* linked = ObjectAccessor::GetPlayer(*GetTarget(), ai->GetLinkedPlayerGUID(GetTarget()->GetGUID())); if (!linked) return; - + GetTarget()->CastSpell(linked, (GetTarget()->GetDistance(linked) > (float)aurEff->GetAmount()) ? SPELL_BRAIN_LINK_DAMAGE : SPELL_BRAIN_LINK_NO_DAMAGE, true); } - + void Register() { OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_brain_link_AuraScript::DummyTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_brain_link_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; - + SpellScript* GetSpellScript() const { return new spell_yogg_saron_brain_link_SpellScript(); } - + AuraScript* GetAuraScript() const { return new spell_yogg_saron_brain_link_AuraScript(); @@ -2212,7 +2212,7 @@ class spell_yogg_saron_boil_ominously : public SpellScriptLoader // 63030 { public: spell_yogg_saron_boil_ominously() : SpellScriptLoader("spell_yogg_saron_boil_ominously") { } - + class spell_yogg_saron_boil_ominously_SpellScript : public SpellScript { PrepareSpellScript(spell_yogg_saron_boil_ominously_SpellScript); @@ -2223,7 +2223,7 @@ class spell_yogg_saron_boil_ominously : public SpellScriptLoader // 63030 return false; return true; } - + void HandleDummy(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) @@ -2235,7 +2235,7 @@ class spell_yogg_saron_boil_ominously : public SpellScriptLoader // 63030 GetCaster()->CastSpell(GetCaster(), SPELL_SUMMON_GUARDIAN_1, true); } } - + void Register() { OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_boil_ominously_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index 86c0c4888ed..612be3b71e8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -21,7 +21,7 @@ #include "ObjectMgr.h" #define UlduarScriptName "instance_ulduar" -extern Position const ObservationRingKeepersPos[4]; +extern Position const ObservationRingKeepersPos[4]; extern Position const YSKeepersPos[4]; extern Position const AlgalonLandPos; @@ -149,7 +149,7 @@ enum UlduarNPCs NPC_SANITY_WELL = 33991, NPC_DESCEND_INTO_MADNESS = 34072, NPC_MARKED_IMMORTAL_GUARDIAN = 36064, - + // Algalon the Observer NPC_BRANN_BRONZBEARD_ALG = 34064, NPC_AZEROTH = 34246, diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 84829cdae12..8e726c10fca 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -115,10 +115,10 @@ public: /// There is a good reason to store them like this, we are going to shuffle the order. for (uint32 i = PHASE_FRENZIED_WORGEN; i < PHASE_GORTOK_PALEHOOF; ++i) Sequence[i] = Phase(i); - + /// This ensures a random order and only executes each phase once. std::random_shuffle(Sequence, Sequence + PHASE_GORTOK_PALEHOOF); - + uiArcingSmashTimer = 15000; uiImpaleTimer = 12000; uiWhiteringRoarTimer = 10000; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 60f641d9054..c60f4f07821 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -3531,7 +3531,7 @@ class spell_gen_orc_disguise : public SpellScriptLoader bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_TRIGGER) || !sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_MALE) || + if (!sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_TRIGGER) || !sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_MALE) || !sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_FEMALE)) return false; return true; |
