From a3bdaf7e6d614f081ddc073aa6cec3e158f8617f Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 14 Apr 2012 17:49:51 +0200 Subject: Core/Scripts: Added support for creating custom GameObjectAI classes, similar to how creature scripts work. --- src/server/game/Scripting/ScriptMgr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index aac615180c8..9de0951c5ef 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -954,6 +954,14 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd return tmpscript->OnDummyEffect(caster, spellId, effIndex, target); } +GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go) +{ + ASSERT(go); + + GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL); + tmpscript->GetAI(go); +} + bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger) { ASSERT(player); -- cgit v1.2.3 From 4f14693ef29402c6cfdab38879f9722235e4e1a9 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 14 Apr 2012 18:26:16 +0200 Subject: Core/Scripts: Corrected previous commit and added a few AI hooks to GameObjectAI --- src/server/game/AI/CoreAI/GameObjectAI.h | 23 +++++++++++++---------- src/server/game/AI/SmartScripts/SmartAI.cpp | 2 +- src/server/game/AI/SmartScripts/SmartAI.h | 2 +- src/server/game/Scripting/ScriptMgr.cpp | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index b9d385ba675..f4555649210 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -33,21 +33,24 @@ class GameObjectAI explicit GameObjectAI(GameObject* g) : go(g) {} virtual ~GameObjectAI() {} - virtual void UpdateAI(const uint32 /*diff*/) {} + virtual void UpdateAI(uint32 /*diff*/) {} virtual void InitializeAI() { Reset(); } virtual void Reset() {}; - static int Permissible(const GameObject* go); + static int Permissible(GameObject const* go); - virtual bool GossipHello(Player* /*player*/) {return false;} - virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) {return false;} - virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) {return false;} - virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) {return false;} - virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {return false;} - virtual uint32 GetDialogStatus(Player* /*player*/) {return 100;} + virtual bool GossipHello(Player* /*player*/) { return false; } + virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) { return false; } + virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) { return false; } + virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) { return false; } + virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } + virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; } virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {} + virtual uint32 GetData(uint32 /*id*/) { return 0; } + virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {} + virtual uint64 GetData64(uint32 /*id*/) { return 0; } virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {} virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { } @@ -58,8 +61,8 @@ class NullGameObjectAI : public GameObjectAI public: explicit NullGameObjectAI(GameObject* g); - void UpdateAI(const uint32 /*diff*/) {} + void UpdateAI(uint32 /*diff*/) {} - static int Permissible(const GameObject* /*go*/) { return PERMIT_BASE_IDLE; } + static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; } }; #endif diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 4eb7f8a7f50..2a412bffb22 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -854,7 +854,7 @@ int SmartGameObjectAI::Permissible(const GameObject* g) return PERMIT_BASE_NO; } -void SmartGameObjectAI::UpdateAI(const uint32 diff) +void SmartGameObjectAI::UpdateAI(uint32 diff) { GetScript()->OnUpdate(diff); } diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 94e5e65cf8b..bfd1c7b9d41 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -239,7 +239,7 @@ public: SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) {} ~SmartGameObjectAI() {} - void UpdateAI(const uint32 diff); + void UpdateAI(uint32 diff); void InitializeAI(); void Reset(); SmartScript* GetScript() { return &mScript; } diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 9de0951c5ef..01d56cf8060 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -959,7 +959,7 @@ GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go) ASSERT(go); GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL); - tmpscript->GetAI(go); + return tmpscript->GetAI(go); } bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger) -- cgit v1.2.3 From c70792df02858a93c156ac00b4a1fdd366c994ec Mon Sep 17 00:00:00 2001 From: Kandera Date: Wed, 16 May 2012 08:47:43 -0400 Subject: Core/Scripting: add the ability to access loot/go state changed events for gameobjects from cpp scripting. (malcrom's idea) --- src/server/game/Entities/GameObject/GameObject.cpp | 2 ++ src/server/game/Scripting/ScriptMgr.cpp | 16 ++++++++++++++++ src/server/game/Scripting/ScriptMgr.h | 8 ++++++++ 3 files changed, 26 insertions(+) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index e871f99b38c..10136c5fbd7 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1910,6 +1910,7 @@ void GameObject::SetLootState(LootState state, Unit* unit) { m_lootState = state; AI()->OnStateChanged(state, unit); + sScriptMgr->OnGameObjectLootStateChanged(this, state, unit); if (m_model) { // startOpen determines whether we are going to add or remove the LoS on activation @@ -1929,6 +1930,7 @@ void GameObject::SetLootState(LootState state, Unit* unit) void GameObject::SetGoState(GOState state) { SetByteValue(GAMEOBJECT_BYTES_1, 0, state); + sScriptMgr->OnGameObjectStateChanged(this, state); if (m_model) { if (!IsInWorld()) diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 01d56cf8060..23d18e12097 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -937,6 +937,22 @@ void ScriptMgr::OnGameObjectDamaged(GameObject* go, Player* player) tmpscript->OnDamaged(go, player); } +void ScriptMgr::OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit) +{ + ASSERT(go); + + GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript); + tmpscript->OnLootStateChanged(go, state, unit); +} + +void ScriptMgr::OnGameObjectStateChanged(GameObject* go, uint32 state) +{ + ASSERT(go); + + GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript); + tmpscript->OnGameObjectStateChanged(go, state); +} + void ScriptMgr::OnGameObjectUpdate(GameObject* go, uint32 diff) { ASSERT(go); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 6fe058d336a..b3d445af0c6 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -473,6 +473,12 @@ class GameObjectScript : public ScriptObject, public UpdatableScript // Called when the game object is damaged (destructible buildings only). virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { } + // Called when the game object loot state is changed. + virtual void OnLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } + + // Called when the game object state is changed. + virtual void OnGameObjectStateChanged(GameObject* /*go*/, uint32 /*state*/) { } + // Called when a GameObjectAI object is needed for the gameobject. virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return NULL; } }; @@ -914,6 +920,8 @@ class ScriptMgr uint32 GetDialogStatus(Player* player, GameObject* go); void OnGameObjectDestroyed(GameObject* go, Player* player); void OnGameObjectDamaged(GameObject* go, Player* player); + void OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit); + void OnGameObjectStateChanged(GameObject* go, uint32 state); void OnGameObjectUpdate(GameObject* go, uint32 diff); GameObjectAI* GetGameObjectAI(GameObject* go); -- cgit v1.2.3 From 634b3645d5f2a0752bc389adfd98f56f84cfd838 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 29 Jul 2012 21:40:10 +0200 Subject: Core/Misc: Use proper headers to optimize compile --- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 6 +++++- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 2 +- src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp | 2 +- src/server/game/AI/SmartScripts/SmartAI.cpp | 3 +-- src/server/game/DungeonFinding/LFGScripts.cpp | 3 ++- src/server/game/DungeonFinding/LFGScripts.h | 2 +- src/server/game/Scripting/ScriptMgr.cpp | 5 ++++- src/server/game/Scripting/ScriptSystem.cpp | 2 +- src/server/game/Scripting/ScriptSystem.h | 1 + .../scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp | 3 ++- .../scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp | 3 ++- .../scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp | 3 ++- .../scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp | 3 ++- .../scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp | 3 ++- .../EasternKingdoms/BlackrockDepths/blackrock_depths.cpp | 4 +++- .../BlackrockDepths/boss_ambassador_flamelash.cpp | 3 ++- .../EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp | 3 ++- .../BlackrockDepths/boss_emperor_dagran_thaurissan.cpp | 3 ++- .../BlackrockDepths/boss_general_angerforge.cpp | 3 ++- .../BlackrockDepths/boss_gorosh_the_dervish.cpp | 3 ++- .../scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp | 3 ++- .../BlackrockDepths/boss_high_interrogator_gerstahn.cpp | 3 ++- .../scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp | 3 ++- .../BlackrockDepths/boss_moira_bronzebeard.cpp | 3 ++- .../EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp | 4 +++- .../BlackrockDepths/instance_blackrock_depths.cpp | 4 +++- .../BlackwingLair/boss_broodlord_lashlayer.cpp | 4 +++- .../EasternKingdoms/BlackwingLair/boss_chromaggus.cpp | 3 ++- .../scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp | 3 ++- .../scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp | 3 ++- .../scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp | 3 ++- .../scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp | 3 ++- .../scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp | 3 ++- .../EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp | 4 +++- .../EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp | 4 +++- .../BlackwingLair/instance_blackwing_lair.cpp | 3 ++- .../scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp | 3 ++- src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp | 3 ++- .../scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp | 3 ++- src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp | 4 +++- .../EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp | 3 ++- src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp | 3 ++- .../EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp | 3 ++- .../scripts/EasternKingdoms/Karazhan/boss_midnight.cpp | 3 ++- src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp | 3 ++- .../scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp | 3 ++- .../scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp | 3 ++- .../EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp | 3 ++- .../scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 3 ++- .../EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp | 4 +++- src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp | 4 +++- .../scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp | 3 ++- src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp | 4 +++- .../MagistersTerrace/boss_felblood_kaelthas.cpp | 3 ++- .../MagistersTerrace/boss_priestess_delrissa.cpp | 3 ++- .../MagistersTerrace/boss_selin_fireheart.cpp | 3 ++- .../EasternKingdoms/MagistersTerrace/boss_vexallus.cpp | 3 ++- .../MagistersTerrace/instance_magisters_terrace.cpp | 3 ++- .../EasternKingdoms/MagistersTerrace/magisters_terrace.cpp | 4 +++- .../scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp | 3 ++- .../scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 6 +++++- .../scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp | 3 ++- .../scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp | 4 +++- .../EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp | 4 +++- .../EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp | 3 ++- .../ScarletMonastery/boss_azshir_the_sleepless.cpp | 3 ++- .../ScarletMonastery/boss_bloodmage_thalnos.cpp | 3 ++- .../ScarletMonastery/boss_headless_horseman.cpp | 3 ++- .../scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp | 3 ++- .../ScarletMonastery/boss_high_inquisitor_fairbanks.cpp | 3 ++- .../ScarletMonastery/boss_houndmaster_loksey.cpp | 3 ++- .../ScarletMonastery/boss_interrogator_vishas.cpp | 3 ++- .../ScarletMonastery/boss_mograine_and_whitemane.cpp | 3 ++- .../scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp | 3 ++- .../ScarletMonastery/instance_scarlet_monastery.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp | 3 ++- .../Scholomance/boss_death_knight_darkreaver.cpp | 3 ++- .../Scholomance/boss_doctor_theolen_krastinov.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_illucia_barov.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_instructor_malicia.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_jandice_barov.cpp | 3 ++- .../scripts/EasternKingdoms/Scholomance/boss_kormok.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp | 3 ++- .../EasternKingdoms/Scholomance/boss_the_ravenian.cpp | 3 ++- .../scripts/EasternKingdoms/Scholomance/boss_vectus.cpp | 3 ++- .../EasternKingdoms/Scholomance/instance_scholomance.cpp | 3 ++- .../ShadowfangKeep/instance_shadowfang_keep.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_baron_rivendare.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_baroness_anastari.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp | 3 ++- .../scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_postmaster_malown.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp | 3 ++- .../EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp | 3 ++- .../EasternKingdoms/Stratholme/instance_stratholme.cpp | 4 +++- src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp | 3 ++- .../EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp | 3 ++- .../scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp | 3 ++- .../EasternKingdoms/SunwellPlateau/boss_brutallus.cpp | 3 ++- .../EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp | 3 ++- .../scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp | 7 ++++++- .../scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp | 3 ++- .../EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp | 3 ++- .../scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp | 3 ++- .../SunwellPlateau/instance_sunwell_plateau.cpp | 3 ++- .../EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp | 3 ++- .../scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp | 3 ++- src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp | 3 ++- .../scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp | 3 ++- src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp | 7 ++++++- src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp | 3 ++- .../scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp | 4 +++- src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp | 3 ++- .../scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp | 3 ++- .../scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp | 3 ++- .../scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp | 3 ++- .../scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp | 3 ++- src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp | 3 ++- .../scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp | 3 ++- .../scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp | 3 ++- src/server/scripts/EasternKingdoms/alterac_mountains.cpp | 3 ++- src/server/scripts/EasternKingdoms/arathi_highlands.cpp | 3 ++- src/server/scripts/EasternKingdoms/blasted_lands.cpp | 4 +++- src/server/scripts/EasternKingdoms/boss_kruul.cpp | 3 ++- src/server/scripts/EasternKingdoms/burning_steppes.cpp | 4 +++- src/server/scripts/EasternKingdoms/duskwood.cpp | 3 ++- src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp | 4 +++- src/server/scripts/EasternKingdoms/eversong_woods.cpp | 4 +++- src/server/scripts/EasternKingdoms/ghostlands.cpp | 4 +++- src/server/scripts/EasternKingdoms/hinterlands.cpp | 3 ++- src/server/scripts/EasternKingdoms/ironforge.cpp | 4 +++- src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp | 3 ++- src/server/scripts/EasternKingdoms/loch_modan.cpp | 4 +++- src/server/scripts/EasternKingdoms/redridge_mountains.cpp | 3 ++- src/server/scripts/EasternKingdoms/silvermoon_city.cpp | 3 ++- src/server/scripts/EasternKingdoms/silverpine_forest.cpp | 3 ++- src/server/scripts/EasternKingdoms/stormwind_city.cpp | 4 +++- src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp | 3 ++- src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp | 3 ++- src/server/scripts/EasternKingdoms/tirisfal_glades.cpp | 3 ++- src/server/scripts/EasternKingdoms/undercity.cpp | 4 +++- src/server/scripts/EasternKingdoms/western_plaguelands.cpp | 4 +++- src/server/scripts/EasternKingdoms/westfall.cpp | 3 ++- src/server/scripts/EasternKingdoms/wetlands.cpp | 3 ++- src/server/scripts/Examples/example_commandscript.cpp | 2 +- src/server/scripts/Examples/example_creature.cpp | 4 +++- src/server/scripts/Examples/example_escort.cpp | 4 +++- src/server/scripts/Examples/example_gossip_codebox.cpp | 4 +++- src/server/scripts/Examples/example_misc.cpp | 1 - src/server/scripts/Examples/example_spell.cpp | 3 ++- .../CavernsOfTime/CullingOfStratholme/boss_epoch.cpp | 3 ++- .../CavernsOfTime/CullingOfStratholme/boss_infinite.cpp | 3 ++- .../CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp | 3 ++- .../CavernsOfTime/CullingOfStratholme/boss_meathook.cpp | 3 ++- .../CavernsOfTime/CullingOfStratholme/boss_salramm.cpp | 3 ++- .../CullingOfStratholme/culling_of_stratholme.cpp | 5 ++++- .../CullingOfStratholme/instance_culling_of_stratholme.cpp | 3 ++- .../Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp | 3 ++- .../CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp | 3 ++- .../Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp | 3 ++- .../Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp | 4 +++- .../CavernsOfTime/DarkPortal/instance_dark_portal.cpp | 3 ++- .../EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp | 3 ++- .../EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp | 3 ++- .../EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp | 3 ++- .../EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp | 4 +++- .../CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp | 4 +++- .../scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp | 1 + .../Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp | 3 ++- .../Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp | 3 ++- src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp | 4 +++- .../Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp | 3 ++- src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp | 3 ++- src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp | 3 ++- src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp | 3 ++- .../scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp | 3 ++- .../Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp | 3 ++- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp | 3 ++- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 3 ++- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp | 3 ++- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp | 3 ++- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp | 3 ++- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp | 3 ++- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp | 3 ++- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp | 3 ++- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp | 3 ++- .../TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp | 3 ++- .../Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp | 3 ++- .../Kalimdor/WailingCaverns/instance_wailing_caverns.cpp | 3 ++- .../scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp | 4 +++- src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp | 3 ++- src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp | 4 +++- .../scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp | 3 ++- .../Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp | 3 ++- .../Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp | 3 ++- .../AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp | 3 ++- .../Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp | 3 ++- .../Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp | 4 +++- .../Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp | 3 ++- .../Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp | 3 ++- .../AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp | 3 ++- .../Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp | 3 ++- .../ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp | 7 ++++++- .../ObsidianSanctum/instance_obsidian_sanctum.cpp | 3 ++- .../ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp | 3 ++- .../ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp | 3 ++- .../ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp | 3 ++- .../Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp | 4 +++- .../TrialOfTheChampion/boss_argent_challenge.cpp | 4 +++- .../TrialOfTheChampion/boss_black_knight.cpp | 3 ++- .../TrialOfTheChampion/boss_grand_champions.cpp | 3 ++- .../TrialOfTheChampion/instance_trial_of_the_champion.cpp | 4 +++- .../TrialOfTheChampion/trial_of_the_champion.cpp | 4 +++- .../TrialOfTheCrusader/boss_anubarak_trial.cpp | 3 ++- .../TrialOfTheCrusader/boss_lord_jaraxxus.cpp | 3 ++- .../TrialOfTheCrusader/boss_northrend_beasts.cpp | 3 ++- .../TrialOfTheCrusader/boss_twin_valkyr.cpp | 10 +++++++++- .../TrialOfTheCrusader/instance_trial_of_the_crusader.cpp | 3 ++- .../TrialOfTheCrusader/trial_of_the_crusader.cpp | 4 +++- src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp | 3 ++- src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp | 3 ++- .../scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp | 3 ++- .../scripts/Northrend/DraktharonKeep/boss_trollgore.cpp | 4 +++- .../Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp | 3 ++- .../Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp | 4 +++- .../FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp | 3 ++- .../Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp | 4 +++- .../FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp | 3 ++- .../Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp | 3 ++- .../Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp | 3 ++- .../FrozenHalls/HallsOfReflection/halls_of_reflection.cpp | 4 +++- .../HallsOfReflection/instance_halls_of_reflection.cpp | 4 +++- .../FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp | 5 ++++- .../Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp | 5 ++++- .../FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp | 5 ++++- .../FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp | 3 ++- .../Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp | 5 ++++- .../scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp | 3 ++- src/server/scripts/Northrend/Gundrak/boss_eck.cpp | 3 ++- src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp | 3 ++- src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp | 3 ++- src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp | 4 +++- src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp | 4 +++- src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp | 5 ++++- src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp | 5 ++++- src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp | 4 +++- src/server/scripts/Northrend/Naxxramas/boss_noth.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp | 3 ++- src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp | 3 ++- .../scripts/Northrend/Naxxramas/instance_naxxramas.cpp | 4 +++- .../scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 6 +++++- .../Nexus/EyeOfEternity/instance_eye_of_eternity.cpp | 4 +++- src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp | 3 ++- .../scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp | 5 ++++- .../scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp | 3 ++- src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp | 3 ++- .../scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp | 3 ++- .../scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp | 3 ++- src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp | 3 ++- src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp | 3 ++- src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp | 5 ++++- src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp | 3 ++- src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp | 5 ++++- .../scripts/Northrend/Nexus/Oculus/instance_oculus.cpp | 4 +++- src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp | 6 +++++- .../Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp | 3 ++- .../scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp | 3 ++- .../Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp | 3 ++- .../Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp | 3 ++- .../Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp | 3 ++- .../scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp | 3 ++- .../scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp | 4 +++- .../Ulduar/HallsOfStone/instance_halls_of_stone.cpp | 3 ++- .../UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp | 3 ++- .../Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp | 5 ++++- .../UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp | 3 ++- .../UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp | 3 ++- .../Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp | 3 ++- .../Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp | 3 ++- .../Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp | 3 ++- .../Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp | 5 ++++- .../Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp | 3 ++- .../UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp | 3 ++- .../scripts/Northrend/VaultOfArchavon/boss_archavon.cpp | 3 ++- src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp | 4 +++- .../scripts/Northrend/VaultOfArchavon/boss_koralon.cpp | 3 ++- .../scripts/Northrend/VaultOfArchavon/boss_toravon.cpp | 3 ++- .../Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_erekem.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_moragg.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp | 3 ++- .../scripts/Northrend/VioletHold/instance_violet_hold.cpp | 3 ++- src/server/scripts/Northrend/VioletHold/violet_hold.cpp | 4 +++- src/server/scripts/Northrend/borean_tundra.cpp | 4 +++- src/server/scripts/Northrend/crystalsong_forest.cpp | 3 ++- src/server/scripts/Northrend/dalaran.cpp | 4 +++- src/server/scripts/Northrend/dragonblight.cpp | 6 +++++- src/server/scripts/Northrend/grizzly_hills.cpp | 3 ++- src/server/scripts/Northrend/howling_fjord.cpp | 4 +++- src/server/scripts/Northrend/icecrown.cpp | 5 ++++- src/server/scripts/Northrend/isle_of_conquest.cpp | 4 +++- src/server/scripts/Northrend/sholazar_basin.cpp | 5 ++++- src/server/scripts/Northrend/storm_peaks.cpp | 4 +++- src/server/scripts/Northrend/zuldrak.cpp | 4 +++- src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp | 2 +- src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp | 2 +- src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp | 2 +- src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp | 2 +- src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp | 2 +- src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp | 2 +- .../Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp | 3 ++- .../AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp | 3 ++- .../Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp | 3 ++- .../Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp | 3 ++- .../Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp | 3 ++- .../Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp | 3 ++- .../Auchindoun/SethekkHalls/instance_sethekk_halls.cpp | 3 ++- .../Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp | 3 ++- .../ShadowLabyrinth/boss_blackheart_the_inciter.cpp | 3 ++- .../Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp | 3 ++- .../Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp | 3 ++- .../Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp | 3 ++- src/server/scripts/Outland/BlackTemple/black_temple.cpp | 4 +++- src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp | 3 ++- src/server/scripts/Outland/BlackTemple/boss_illidan.cpp | 5 ++++- .../scripts/Outland/BlackTemple/boss_mother_shahraz.cpp | 3 ++- .../scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp | 3 ++- .../scripts/Outland/BlackTemple/boss_shade_of_akama.cpp | 4 +++- src/server/scripts/Outland/BlackTemple/boss_supremus.cpp | 4 +++- .../scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp | 3 ++- .../scripts/Outland/BlackTemple/boss_warlord_najentus.cpp | 3 ++- src/server/scripts/Outland/BlackTemple/illidari_council.cpp | 5 ++++- .../scripts/Outland/BlackTemple/instance_black_temple.cpp | 3 ++- .../SerpentShrine/boss_fathomlord_karathress.cpp | 3 ++- .../SerpentShrine/boss_hydross_the_unstable.cpp | 3 ++- .../CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp | 3 ++- .../SerpentShrine/boss_leotheras_the_blind.cpp | 3 ++- .../CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp | 3 ++- .../SerpentShrine/boss_morogrim_tidewalker.cpp | 3 ++- .../SerpentShrine/instance_serpent_shrine.cpp | 3 ++- .../SteamVault/boss_hydromancer_thespia.cpp | 3 ++- .../SteamVault/boss_mekgineer_steamrigger.cpp | 3 ++- .../CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp | 3 ++- .../CoilfangReservoir/SteamVault/instance_steam_vault.cpp | 3 ++- .../Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp | 3 ++- .../CoilfangReservoir/underbog/boss_the_black_stalker.cpp | 3 ++- .../scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp | 3 ++- .../scripts/Outland/GruulsLair/instance_gruuls_lair.cpp | 3 ++- .../Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp | 3 ++- .../BloodFurnace/boss_kelidan_the_breaker.cpp | 4 +++- .../Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp | 3 ++- .../HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp | 3 ++- .../HellfireRamparts/boss_omor_the_unscarred.cpp | 3 ++- .../HellfireRamparts/boss_vazruden_the_herald.cpp | 3 ++- .../HellfireRamparts/boss_watchkeeper_gargolmar.cpp | 3 ++- .../HellfireRamparts/instance_hellfire_ramparts.cpp | 3 ++- .../HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp | 3 ++- .../MagtheridonsLair/instance_magtheridons_lair.cpp | 4 +++- .../HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp | 3 ++- .../ShatteredHalls/boss_warbringer_omrogg.cpp | 3 ++- .../ShatteredHalls/boss_warchief_kargath_bladefist.cpp | 3 ++- .../ShatteredHalls/instance_shattered_halls.cpp | 3 ++- src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp | 3 ++- src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp | 3 ++- .../scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp | 3 ++- .../scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp | 3 ++- src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp | 3 ++- .../TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp | 3 ++- .../TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp | 3 ++- .../TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp | 1 + .../TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp | 3 ++- .../TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp | 3 ++- .../Outland/TempestKeep/Mechanar/instance_mechanar.cpp | 3 ++- src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp | 3 ++- .../Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp | 3 ++- .../Outland/TempestKeep/arcatraz/instance_arcatraz.cpp | 3 ++- .../TempestKeep/botanica/boss_high_botanist_freywinn.cpp | 3 ++- src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp | 3 ++- .../Outland/TempestKeep/botanica/boss_warp_splinter.cpp | 3 ++- src/server/scripts/Outland/blades_edge_mountains.cpp | 8 +++++++- src/server/scripts/Outland/boss_doomwalker.cpp | 3 ++- src/server/scripts/Outland/hellfire_peninsula.cpp | 4 +++- src/server/scripts/Outland/nagrand.cpp | 5 +++-- src/server/scripts/Outland/netherstorm.cpp | 4 +++- src/server/scripts/Outland/shadowmoon_valley.cpp | 4 +++- src/server/scripts/Outland/shattrath_city.cpp | 4 +++- src/server/scripts/Outland/terokkar_forest.cpp | 4 +++- src/server/scripts/Outland/zangarmarsh.cpp | 4 +++- src/server/scripts/Spells/spell_holiday.cpp | 6 +++++- src/server/scripts/World/areatrigger_scripts.cpp | 3 ++- src/server/scripts/World/chat_log.cpp | 2 +- src/server/scripts/World/go_scripts.cpp | 4 +++- src/server/scripts/World/guards.cpp | 3 ++- src/server/scripts/World/item_scripts.cpp | 3 ++- src/server/scripts/World/mob_generic_creature.cpp | 4 +++- src/server/scripts/World/npc_innkeeper.cpp | 5 ++++- src/server/scripts/World/npc_professions.cpp | 4 +++- src/server/scripts/World/npc_taxi.cpp | 4 +++- src/server/scripts/World/npcs_special.cpp | 12 +++++++++++- 425 files changed, 995 insertions(+), 424 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 6d27d251579..a5f957c352c 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -5,9 +5,13 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#include "ScriptPCH.h" +#include "ScriptedCreature.h" #include "Item.h" #include "Spell.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" #include "ObjectMgr.h" #include "TemporarySummon.h" diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index c7751fc7383..d6da6a91bf1 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -9,7 +9,7 @@ SDComment: SDCategory: Npc EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Group.h" diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 987af82e496..4a71184442d 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -9,7 +9,7 @@ SDComment: This AI is under development SDCategory: Npc EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptedCreature.h" #include "ScriptedFollowerAI.h" #include "Group.h" diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 96fc43e0572..629998e3579 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -27,9 +27,8 @@ #include "InstanceScript.h" #include "ScriptedCreature.h" #include "Group.h" - #include "SmartAI.h" -#include "ScriptPCH.h" +#include "ScriptMgr.h" SmartAI::SmartAI(Creature* c) : CreatureAI(c) { diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 1fa7fe0ca9f..e4b67e22221 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -23,9 +23,10 @@ #include "SharedDefines.h" #include "Player.h" #include "Group.h" -#include "ScriptPCH.h" #include "LFGScripts.h" #include "LFGMgr.h" +#include "ScriptMgr.h" +#include "ObjectAccessor.h" LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript") { diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h index 4b332c7d731..ac1f66abbda 100644 --- a/src/server/game/DungeonFinding/LFGScripts.h +++ b/src/server/game/DungeonFinding/LFGScripts.h @@ -21,7 +21,7 @@ #include "Common.h" #include "SharedDefines.h" -#include "ScriptPCH.h" +#include "ScriptMgr.h" class Player; class Group; diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 23d18e12097..b6381594145 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -16,7 +16,6 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" #include "ScriptMgr.h" #include "Config.h" #include "DatabaseEnv.h" @@ -27,6 +26,10 @@ #include "ScriptSystem.h" #include "Transport.h" #include "Vehicle.h" +#include "SpellInfo.h" +#include "SpellScript.h" +#include "GossipDef.h" +#include "CreatureAI.h" // This is the global static registry of scripts. template diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index c38d559372f..fb954662525 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -16,10 +16,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" #include "ScriptSystem.h" #include "ObjectMgr.h" #include "DatabaseEnv.h" +#include "ScriptMgr.h" ScriptPointVector const SystemMgr::_empty; diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h index cf6332b22f2..4211a63b043 100644 --- a/src/server/game/Scripting/ScriptSystem.h +++ b/src/server/game/Scripting/ScriptSystem.h @@ -5,6 +5,7 @@ #ifndef SC_SYSTEM_H #define SC_SYSTEM_H +#include "ScriptMgr.h" #include #define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index 75dd99eef97..b2b4083f9c6 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index 93de16fc80b..e776194652d 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 8b2a95be977..47091c162d9 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index da53cffc99d..0c1eb6e6d30 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index 3960351d395..fdb6a5da320 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Yells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 9375cc33f27..27c90d3b45c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" #include "blackrock_depths.h" //go_shadowforge_brazier diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp index ff0f1a4cedd..b2031ef0658 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp index 2585796e28e..a07e9059b70 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index 073c4fde82a..204fa3177e7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "blackrock_depths.h" enum Yells diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp index 703f684cc9f..15882b30ed2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp index b2c93d949c2..055f1eebbac 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp index 63d945ade90..40f8b2507e3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index f4f245be4be..b6be72d71e0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp index 3d2cc627145..c1e00796433 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp index e6f65ab4252..6f665e9efc7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp index 211930e4f1a..347aff2ce0b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp @@ -16,7 +16,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "blackrock_depths.h" enum Spells diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp index 03cb077936b..91cd5d2b9a5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp @@ -16,7 +16,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "blackrock_depths.h" #define TIMER_TOMBOFTHESEVEN 15000 diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp index af0dfd38ae8..ceca6330152 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -23,7 +23,9 @@ SDComment: SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + enum Say { SAY_AGGRO = -1469000, diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp index a3eb0cea5ad..204fbe5223b 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp @@ -23,7 +23,8 @@ SDComment: Chromatic Mutation disabled due to lack of core support SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Emotes { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp index c91e0fb3303..962e65fb8b0 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp @@ -23,7 +23,8 @@ SDComment: Shadow of Ebonroc needs core support SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_SHADOWFLAME 22539 #define SPELL_WINGBUFFET 18500 diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp index c2a2350c0e8..4d5f9b214db 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_SHADOWFLAME 22539 #define SPELL_WINGBUFFET 23339 diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp index 41bcb6c5427..e84ccd0e160 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Emotes { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index 5d4cc442a49..787fbe5312b 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -23,7 +23,8 @@ SDComment: Some issues with class calls effecting more than one class SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Say { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp index 24fc74cc7cb..04eca3586cc 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp @@ -23,7 +23,8 @@ SDComment: Needs additional review. Phase 1 NYI (Grethok the Controller) SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" //Razorgore Phase 2 Script diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp index eaa8c118f19..8cc42baff8e 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp @@ -23,7 +23,9 @@ SDComment: Burning Adrenaline not correctly implemented in core SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" enum Says { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp index 668b84d38dd..c7e8a5ea771 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp @@ -23,7 +23,9 @@ SDComment: Missing some text, Vael beginning event, and spawns Nef in wrong plac SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" enum Says { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp index 8a9b930aa09..ae518b7c703 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp @@ -23,4 +23,5 @@ SDComment: SDCategory: Blackwing Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index 4885d8620b0..f107fd7c5ec 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -21,7 +21,8 @@ SD%Complete: SDComment: Timers and say taken from acid script EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "deadmines.h" enum eSpels diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 6c6b0647c5f..888171c5415 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -23,7 +23,8 @@ SDComment: Placeholder SDCategory: Deadmines EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "deadmines.h" #include "Spell.h" diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index a75eda93d1d..8e0fb9ff411 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Deadmines EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "deadmines.h" enum Sounds diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index b5a7984d945..f1aa3d68bce 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -22,7 +22,9 @@ SD%Complete: 90% SDComment: Some visual effects are not implemented. Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "gnomeregan.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index 0bbe787827b..931c0bb90fc 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "gnomeregan.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 96bda019f6a..bf27cad44ef 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_AGGRO -1532057 #define SAY_SUMMON1 -1532058 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index e19efc7c4e5..8921867be21 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_AGGRO -1532018 #define SAY_SLAY1 -1532019 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index d8be6ffc0ca..08aad90f588 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_MIDNIGHT_KILL -1532000 #define SAY_APPEAR1 -1532001 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index f69cecdb4c3..bc29a6f1f3c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "karazhan.h" #define SAY_AGGRO -1532011 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index f89abca76cf..60e1a5ebc4c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -23,7 +23,8 @@ SDComment: Not sure about timing and portals placing SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "karazhan.h" #define EMOTE_PHASE_PORTAL -1532089 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index ded5e6903a5..e2420749a4c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -23,7 +23,8 @@ SDComment: SDComment: Timers may incorrect SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "karazhan.h" //phase 1 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 4700ad71fab..1ed4da1f25e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "karazhan.h" #define SAY_AGGRO -1532091 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index d95b4aa3ae1..7dd4e731a18 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -23,7 +23,8 @@ SDComment: Flame wreath missing cast animation, mods won't triggere. SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "karazhan.h" #include "GameObject.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 2f19d2c7fc1..44cd7e0faea 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -23,8 +23,10 @@ SDComment: Complete! Needs adjustments to use spell though. SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "karazhan.h" +#include "PassiveAI.h" #define SAY_SLAY1 -1532065 #define SAY_SLAY2 -1532066 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 6f8121ef5b6..959f1ac8f41 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -23,7 +23,9 @@ SDComment: Oz, Hood, and RAJ event implemented. RAJ event requires more testing. SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "karazhan.h" /***********************************/ diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 8e86024f4d8..05d6ecf1478 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -23,7 +23,8 @@ SDComment: Instance Script for Karazhan to help in various encounters. TODO: Gam SDCategory: Karazhan EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "karazhan.h" #define MAX_ENCOUNTER 12 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index b37f6913b8d..7e0a11da03a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -29,7 +29,9 @@ npc_berthold npc_image_of_medivh EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "karazhan.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 4a75370f0e8..bd79cbba628 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -23,7 +23,8 @@ SDComment: Normal and Heroic Support. Issues: Arcane Spheres do not initially fo SDCategory: Magisters' Terrace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "magisters_terrace.h" #include "WorldPacket.h" diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 883932fdb9b..7ce9b08845f 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -23,7 +23,8 @@ SDComment: No Heroic support yet. Needs further testing. Several scripts for pet SDCategory: Magister's Terrace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "magisters_terrace.h" struct Speech diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index af7deda4545..8bdfeb26ca2 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -23,7 +23,8 @@ SDComment: Heroic and Normal Support. Needs further testing. SDCategory: Magister's Terrace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "magisters_terrace.h" #define SAY_AGGRO -1585000 diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 327c611b2d6..b5cf443c5a5 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -23,7 +23,8 @@ SDComment: Heroic and Normal support. Needs further testing. SDCategory: Magister's Terrace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "magisters_terrace.h" enum eEnums diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index aa43cb3702f..33635cefa0a 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -23,7 +23,8 @@ SDComment: Designed only for Selin Fireheart SDCategory: Magister's Terrace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "magisters_terrace.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index ccaaa0ec68d..69e0e5bff40 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_kalecgos EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_kalecgos diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp index 0160f35f143..9d48d04cf07 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp @@ -23,7 +23,8 @@ SDComment: some spells doesnt work correctly SDCategory: Molten Core EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "molten_core.h" enum Texts diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index bf887bec164..cc11d727dc2 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -15,10 +15,14 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "Vehicle.h" #include "ObjectMgr.h" #include "ScriptedEscortAI.h" +#include "CombatAI.h" +#include "PassiveAI.h" /*###### ##Quest 12848 diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 1c17e6afa9b..b4c6268a43e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" //How to win friends and influence enemies diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 8cee23fab1c..4d1552b932e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp index 0ef2dddda8d..81211f36df3 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" /*#### ## npc_valkyr_battle_maiden diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp index e5886cc39d4..c39a647d5e1 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eEnums { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp index 30105cc7315..a2cc0172969 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp index 466f940621d..ff1a0867de0 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eEnums { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 813c43288d0..028cf640d21 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "SpellMgr.h" #include "scarlet_monastery.h" diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp index 58c21d86a2f..59244585ecf 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp @@ -23,7 +23,8 @@ SDComment: Should in addition spawn Myrmidons in the hallway outside SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" enum Says diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp index 1989c318c84..847a14f54d8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -23,7 +23,8 @@ SDComment: TODO: if this guy not involved in some special event, remove (and let SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSpells { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp index f311da401d4..9a66c9ba728 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eEnums { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index fd978136339..07b5ec5d584 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scarlet_monastery.h" enum Says diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index 8d813bfe502..46fb62eae7f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scarlet_monastery.h" enum Says diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp index 8035adfc33f..6eb27327438 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index ba0b854754e..3d3d9ae52ae 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scarlet Monastery EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scarlet_monastery.h" enum Entry diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index 2bc0320b81d..c2ccde645ca 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -23,7 +23,8 @@ SDComment: Doors missing in instance script. SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" #define SPELL_ARCANEMISSILES 22272 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp index 967f771fe7a..b4c4332aa45 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" class boss_death_knight_darkreaver : public CreatureScript { diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index 82f4dc85060..197ee9a5bfe 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" enum eEnums diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index e438ae56a2b..b6b5cc0acbd 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" #define SPELL_CURSEOFAGONY 18671 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 498e6596b06..406b1a6b10d 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" #define SPELL_CALLOFGRAVES 17831 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index 064faa5643d..3eb78662578 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_CURSEOFBLOOD 24673 //#define SPELL_ILLUSION 17773 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index 5fd5a96d605..10736464ef3 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_SHADOWBOLTVOLLEY 20741 #define SPELL_BONESHIELD 27688 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index 327c1df921d..438c3c88bb4 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -23,7 +23,8 @@ SDComment: aura applied/defined in database SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" #define SPELL_IMMOLATE 20294 // Old ID was 15570 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index 1919a1ba099..64bbbbe9514 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" #define SPELL_VOLATILEINFECTION 24928 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index fd10c6374a6..808dc97dc86 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_FROSTBOLT 21369 #define SPELL_ICEARMOR 18100 //This is actually a buff he gives himself diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index a28cecf3772..381a039d609 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "scholomance.h" #define SPELL_TRAMPLE 15550 diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index f5f453c30bd..3c7771612e2 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eEnums { diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index 86023d21eca..c3b3724ec3d 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Scholomance EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "scholomance.h" #define GO_GATE_KIRTONOS 175570 diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 57b902ac6d4..d4c037d45c3 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Shadowfang Keep EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "shadowfang_keep.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index 85faa14900b..cd3fbd09223 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -23,7 +23,8 @@ SDComment: aura applied/defined in database SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #define SAY_0 "Intruders! More pawns of the Argent Dawn, no doubt. I already count one of their number among my prisoners. Withdraw from my domain before she is executed!" diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 106719d654f..7dafcc2b647 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -23,7 +23,8 @@ SDComment: MC disabled SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #define SPELL_BANSHEEWAIL 16565 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index 01299ae06b6..4c2aa395e3c 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" //front, left #define ADD_1X 3553.851807f diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index 21e3e19d890..04380da3051 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -23,7 +23,8 @@ SDComment: Possibly need to fix/improve summons after death SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eEnums { diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index 37e0bd5757f..5e67f35af8b 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #define SPELL_DRAININGBLOW 16793 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index f8a10f06155..522e43c0824 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #define SPELL_FROSTBOLT 17503 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index c9a43edb66d..d6742e63167 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #define SPELL_ENCASINGWEBS 4962 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index ebeda248331..47c6b66f4bb 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -23,7 +23,8 @@ SDComment: Basic script to have support for Horde paladin epic mount (quest 9737 SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" /*##### diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index cf8b10a2ee5..f650029a439 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" //Spell ID to summon this guy is 24627 "Summon Postmaster Malown" //He should be spawned along with three other elites once the third postbox has been opened diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index 3bb1ce7959d..4f82367924d 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #define SPELL_TRAMPLE 5568 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp index a281c1b59c6..356023bce77 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_SPAWN "TIMMY!" diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 387b6d7b13c..338d88e71f0 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -23,7 +23,9 @@ SDComment: In progress. Undead side 75% implemented. Save/load not implemented. SDCategory: Stratholme EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "stratholme.h" #define GO_SERVICE_ENTRANCE 175368 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 7e167093e07..9b4591bc633 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -30,7 +30,8 @@ mob_restless_soul mobs_spectral_ghostly_citizen EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "stratholme.h" #include "Group.h" diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index e804fff44f5..e0987961f7e 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -23,7 +23,8 @@ SDComment:Place Holder SDCategory: Sunken Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "sunken_temple.h" #define GO_ATALAI_STATUE1 148830 diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index 35d6766872f..83ff86f5b88 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -27,7 +27,8 @@ EndScriptData */ at_malfurion_Stormrage_trigger EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunken_temple.h" /*##### diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 43c94f8a57d..542f8168e0f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -22,7 +22,8 @@ SD%Complete: 80 SDComment: Find a way to start the intro, best code for the intro EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunwell_plateau.h" enum Quotes diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 03486a644a2..e7b0e86285e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -21,7 +21,8 @@ SD%Complete: 100 SDComment: EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunwell_plateau.h" enum Quotes diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 72ad1100752..7267c4e1bdb 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -21,7 +21,12 @@ SD%Complete: 0 SDComment: EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" #include "sunwell_plateau.h" enum Yells diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index f783fcc1eb5..f336a7ecfe7 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Sunwell_Plateau EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunwell_plateau.h" enum Yells diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 8a64d45abcb..13201449a6e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -24,7 +24,8 @@ EndScriptData */ //TODO rewrite Armageddon -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunwell_plateau.h" #include diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 66030a1c78c..c00ab84b567 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -21,7 +21,8 @@ SD%Complete: 80 SDComment: all sounds, black hole effect triggers to often (46228) */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunwell_plateau.h" // Muru & Entropius's spells diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 645026c343d..24e4b0d9aa1 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -23,7 +23,8 @@ SDComment: VERIFY SCRIPT SDCategory: Sunwell_Plateau EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "sunwell_plateau.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp index e6349e3497e..25bc85f47b6 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp @@ -26,7 +26,8 @@ npc_prophet_velen npc_captain_selana EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sunwell_plateau.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 7a946e9d5bf..3ffb873e4d2 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -26,7 +26,8 @@ At 33%, he will awaken the Vault Walkers On his death the vault door opens. EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "uldaman.h" #define SAY_AGGRO "Who dares awaken Archaedas? Who dares the wrath of the makers!" diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index 8a845dbb7f6..c05a36f93a7 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Uldaman EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_AGGRO -1070000 diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index fea64c55377..ade07039a23 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -23,7 +23,8 @@ SDComment: Need some cosmetics updates when archeadas door are closing (Guardian SDCategory: Uldaman EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "uldaman.h" enum eSpells diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 1c6cad7278a..2b8d4e37b65 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -30,7 +30,8 @@ go_keystone_chamber at_map_chamber EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "uldaman.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index a715dbfce9d..c7d6e2fb6e4 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -25,7 +25,12 @@ SQLUpdate: EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" #include "zulaman.h" #include "Weather.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 3baa6ebdf62..ecf173b02e5 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Aman EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulaman.h" //#include "spell.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index a2125c45689..d4886bc3795 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Aman EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulaman.h" #include "GridNotifiers.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 48a406f22a4..b5646a16692 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Aman EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulaman.h" #include "GridNotifiers.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 2df202af088..1009d3e0a0a 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -22,7 +22,8 @@ SD%Complete: 85% SDComment: EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulaman.h" //Speech diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 884fe109785..f5d5a11084c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Aman EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "zulaman.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index bfb22483b09..f0bea065eb6 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_forest_frog EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "zulaman.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 4ba0c187973..1dc841d3518 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -23,7 +23,8 @@ SDComment: Wrong cleave and red aura is missing. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" enum eYells diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp index ce2fd0848f9..5e553c7396f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp @@ -23,7 +23,8 @@ SDComment: Massive Geyser with knockback not working. Spell buggy. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_FROSTBREATH 16099 #define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon... diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index cdd45a3fa0d..8c71ea6d48d 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SPELL_AVARTAR 24646 //The Enrage Spell diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index 9edd82c39b0..6cb657f4cff 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -23,7 +23,8 @@ SDComment: Blood siphon spell buggy cause of Core Issue. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SAY_AGGRO -1309020 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index 27c46b8e0f2..bb3e0b14e0e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SPELL_MANABURN 26046 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 7d2215f8311..156ccab5eae 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -23,7 +23,8 @@ SDComment: Problem in finding the right flying batriders for spawning and making SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SAY_AGGRO -1309002 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index f4a17da56fb..f8d23947e9c 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -23,7 +23,8 @@ SDComment: Mind Control not working because of core bug. Shades visible for all. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SAY_AGGRO -1309014 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index cbe1178e6c4..83cd0b46fb8 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -23,7 +23,8 @@ SDComment: Ohgan function needs improvements. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SAY_AGGRO -1309015 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index 44ab5d851f5..8e0deda1d0b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -23,7 +23,8 @@ SDComment: Charging healers and casters not working. Perhaps wrong Spell Timers. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SAY_AGGRO -1309005 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index 81260c28d73..32a8f209917 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SPELL_AMBUSH 24337 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 3da74d16dc3..29495f77f2a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -23,7 +23,8 @@ SDComment: Almost finished. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SAY_AGGRO -1309009 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp index b22630f51bb..6cdb00236df 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "zulgurub.h" #define SPELL_LIGHTNINGCLOUD 25033 diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index e3dd5d5933b..104d479383b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -23,7 +23,8 @@ SDComment: Missing reset function after killing a boss for Ohgan, Thekal. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "zulgurub.h" class instance_zulgurub : public InstanceMapScript diff --git a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp index e4b24dc00ee..b56727b18e1 100644 --- a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp @@ -26,7 +26,8 @@ EndScriptData */ /* ContentData EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /*void AddSC_alterac_mountains() { diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp index d4d35b107b2..b0d59fe8b5a 100644 --- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp @@ -27,7 +27,8 @@ EndScriptData */ npc_professor_phizzlethorpe EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/blasted_lands.cpp b/src/server/scripts/EasternKingdoms/blasted_lands.cpp index 2042e5313c3..3d8e68dfbf8 100644 --- a/src/server/scripts/EasternKingdoms/blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/blasted_lands.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_deathly_usher EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_deathly_usher diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp index 8749c943a6f..6a1ba633660 100644 --- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp +++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp @@ -23,7 +23,8 @@ SDComment: Highlord Kruul are presumably no longer in-game on regular bases, how SDCategory: Bosses EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_SHADOWVOLLEY 21341 #define SPELL_CLEAVE 20677 diff --git a/src/server/scripts/EasternKingdoms/burning_steppes.cpp b/src/server/scripts/EasternKingdoms/burning_steppes.cpp index b526246f670..eec747d6d73 100644 --- a/src/server/scripts/EasternKingdoms/burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/burning_steppes.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_ragged_john EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_ragged_john diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp index 10cb5987ce5..e5af5344dc1 100644 --- a/src/server/scripts/EasternKingdoms/duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/duskwood.cpp @@ -23,7 +23,8 @@ SDComment: Quest Support:8735 SDCategory: Duskwood EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Yells { diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp index 0519ce94b32..7ca76e38fce 100644 --- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp @@ -30,7 +30,9 @@ npc_darrowshire_spirit npc_tirion_fordring EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" class mobs_ghoul_flayer : public CreatureScript { diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index 8ae72e142c8..d69ae3454b4 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -31,7 +31,9 @@ npc_kelerun_bloodmourn go_harbinger_second_trial EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp index e40a2f785e6..9793c6fd31c 100644 --- a/src/server/scripts/EasternKingdoms/ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp @@ -30,7 +30,9 @@ npc_rathis_tomber npc_ranger_lilatha EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/hinterlands.cpp b/src/server/scripts/EasternKingdoms/hinterlands.cpp index 8de895cb51f..a6d01f0ca93 100644 --- a/src/server/scripts/EasternKingdoms/hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/hinterlands.cpp @@ -28,7 +28,8 @@ npc_00x09hl npc_rinji EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/ironforge.cpp b/src/server/scripts/EasternKingdoms/ironforge.cpp index 93a8d7423c9..2915ee1f3cb 100644 --- a/src/server/scripts/EasternKingdoms/ironforge.cpp +++ b/src/server/scripts/EasternKingdoms/ironforge.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_royal_historian_archesonus EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_royal_historian_archesonus diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp index 27d8ea3e51c..e448ccda14c 100644 --- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp @@ -28,7 +28,8 @@ npc_converted_sentry npc_greengill_slave EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /*###### ## npc_converted_sentry diff --git a/src/server/scripts/EasternKingdoms/loch_modan.cpp b/src/server/scripts/EasternKingdoms/loch_modan.cpp index 7ea8a62a5bd..4e3aaae71a1 100644 --- a/src/server/scripts/EasternKingdoms/loch_modan.cpp +++ b/src/server/scripts/EasternKingdoms/loch_modan.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_mountaineer_pebblebitty EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_mountaineer_pebblebitty diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp index 3ade1da4a19..2473fec899a 100644 --- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp @@ -21,7 +21,8 @@ SD%Complete: 100% SDComment: Support for quest 219. Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" enum eCorporalKeeshan diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp index e6595a83b66..954f21f73f5 100644 --- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp @@ -27,7 +27,8 @@ EndScriptData */ npc_blood_knight_stillblade EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /*####### # npc_blood_knight_stillblade diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp index bc3110878de..339e202fce1 100644 --- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp @@ -28,7 +28,8 @@ npc_deathstalker_erland pyrewood_ambush EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp index 96ad1da725d..560214d4085 100644 --- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp @@ -33,7 +33,9 @@ npc_marzon_silent_blade npc_lord_gregor_lescovar EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp index 03f92ce6d61..40f046a5075 100644 --- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp @@ -27,7 +27,8 @@ EndScriptData */ mob_yenniku EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /*###### ## mob_yenniku diff --git a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp index 6507ec911c0..4c81380fb60 100644 --- a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp +++ b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp index 4687fa3630f..70f9f93c7a7 100644 --- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp @@ -29,7 +29,8 @@ go_mausoleum_door go_mausoleum_trigger EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /*###### ## npc_calvin_montague diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp index a9b627ded34..f04e8c4e772 100644 --- a/src/server/scripts/EasternKingdoms/undercity.cpp +++ b/src/server/scripts/EasternKingdoms/undercity.cpp @@ -29,7 +29,9 @@ npc_highborne_lamenter npc_parqual_fintallas EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## npc_lady_sylvanas_windrunner diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 0057c01b882..31dea10453a 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -30,7 +30,9 @@ npc_the_scourge_cauldron npc_andorhal_tower EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/westfall.cpp b/src/server/scripts/EasternKingdoms/westfall.cpp index 46f1526c5bf..478c5f6c0d6 100644 --- a/src/server/scripts/EasternKingdoms/westfall.cpp +++ b/src/server/scripts/EasternKingdoms/westfall.cpp @@ -28,7 +28,8 @@ npc_daphne_stilwell npc_defias_traitor EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/wetlands.cpp b/src/server/scripts/EasternKingdoms/wetlands.cpp index bf28d9838a4..fac8fb51c2d 100644 --- a/src/server/scripts/EasternKingdoms/wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/wetlands.cpp @@ -28,7 +28,8 @@ npc_mikhail npc_tapoke_slim_jahn EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Examples/example_commandscript.cpp b/src/server/scripts/Examples/example_commandscript.cpp index 6b7a3d8def7..28ef021d599 100644 --- a/src/server/scripts/Examples/example_commandscript.cpp +++ b/src/server/scripts/Examples/example_commandscript.cpp @@ -23,7 +23,7 @@ Comment: Short custom scripting example Category: Script Examples EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" #include "Chat.h" // **** This script is designed as an example for others to build on **** diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index 7f75a0fb481..17b9aae732b 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -23,7 +23,9 @@ SDComment: Short custom scripting example SDCategory: Script Examples EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" // **** This script is designed as an example for others to build on **** // **** Please modify whatever you'd like to as this script is only for developement **** diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp index 851a32538e9..20e4c5614e9 100644 --- a/src/server/scripts/Examples/example_escort.cpp +++ b/src/server/scripts/Examples/example_escort.cpp @@ -23,7 +23,9 @@ SDComment: Script used for testing escortAI SDCategory: Script Examples EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" enum eEnums diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp index 6d57f1ac798..a5627c68ff6 100644 --- a/src/server/scripts/Examples/example_gossip_codebox.cpp +++ b/src/server/scripts/Examples/example_gossip_codebox.cpp @@ -23,7 +23,9 @@ SDComment: Show a codebox in gossip option SDCategory: Script Examples EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include enum eEnums diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp index d83a00ed82f..3aa4bac3f1e 100644 --- a/src/server/scripts/Examples/example_misc.cpp +++ b/src/server/scripts/Examples/example_misc.cpp @@ -23,7 +23,6 @@ SDComment: Item, Areatrigger and other small code examples SDCategory: Script Examples EndScriptData */ -#include "ScriptPCH.h" #include "ScriptMgr.h" enum eSay diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 70d7f43135c..737d1eec8f8 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -22,9 +22,10 @@ * and `ScriptName` is the name of a script assigned on registration */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" #include "SpellAuras.h" #include "SpellAuraEffects.h" +#include "SpellScript.h" enum Spells { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp index b2853f25a33..7b468cb7fe5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp @@ -23,7 +23,8 @@ SDComment: TODO: Intro, consecutive attacks to a random target durin time wrap, SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "culling_of_stratholme.h" enum Spells diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp index ccf60f9bd0b..56d07a49dc4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "culling_of_stratholme.h" enum Spells diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp index a038a06f815..d4359a100b4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp @@ -23,7 +23,8 @@ SDComment: TODO: Intro & outro SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "culling_of_stratholme.h" enum Spells diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp index d5dd597960f..8e80af66379 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp @@ -23,7 +23,8 @@ SDComment: It may need timer adjustment SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "culling_of_stratholme.h" enum Spells diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp index 7828d172e1e..d23957ddf81 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp @@ -23,7 +23,8 @@ SDComment: TODO: Intro SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "culling_of_stratholme.h" enum Spells diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 6454083e424..e74ba833908 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -15,9 +15,12 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "culling_of_stratholme.h" #include "ScriptedEscortAI.h" +#include "PassiveAI.h" enum Says { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index b232cae4657..ea02e8f50b5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "CreatureTextMgr.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp index 5b47c2ee07d..161ea4ba8b7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp @@ -23,7 +23,8 @@ SDComment: Some spells not implemented SDCategory: Caverns of Time, The Dark Portal EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "dark_portal.h" enum eEnums diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp index a4e805b3b75..8fc7f31e766 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp @@ -23,7 +23,8 @@ SDComment: All abilities not implemented SDCategory: Caverns of Time, The Dark Portal EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "dark_portal.h" enum eEnums diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp index f59c9f0ef4c..0256a099580 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp @@ -23,7 +23,8 @@ SDComment: More abilities need to be implemented SDCategory: Caverns of Time, The Dark Portal EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "dark_portal.h" enum eEnums diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index c2a41cb29d1..f7c4a21634c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -29,7 +29,9 @@ npc_time_rift npc_saat EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "dark_portal.h" #define SAY_ENTER -1269020 //where does this belong? diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp index 2c8cd096644..fbbe750626b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp @@ -23,7 +23,8 @@ SDComment: Quest support: 9836, 10297. Currently in progress. SDCategory: Caverns of Time, The Dark Portal EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "dark_portal.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index c27507cdcec..96cfba0007b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -23,7 +23,8 @@ SDComment: Missing adds, missing waypoints to move up to Thrall once spawned + s SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "old_hillsbrad.h" #define SAY_ENTER -1560000 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index 82bd0a9e9be..ab0f10bdfe0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -23,7 +23,8 @@ SDComment: Missing spawns pre-event, missing speech to be coordinated with rest SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "old_hillsbrad.h" #define SAY_ENTER1 -1560013 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp index 45825a81eb2..534c831814e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp @@ -23,7 +23,8 @@ SDComment: Missing proper code for patrolling area after being spawned. Script f SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "old_hillsbrad.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index b179a15e878..ea8aab5d46a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -23,7 +23,9 @@ SDComment: If thrall escort fail, all parts will reset. In future, save sub-part SDCategory: Caverns of Time, Old Hillsbrad Foothills EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "old_hillsbrad.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index 7d9da6771dc..3690e87354d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -29,7 +29,9 @@ npc_thrall_old_hillsbrad npc_taretha EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "old_hillsbrad.h" diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp index 1f887d7ce64..26e1f77bf48 100644 --- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "ScriptedCreature.h" enum Spells { diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp index bda5267713d..44f9aa1184a 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Razorfen Downs EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_AGGRO -1129000 #define SAY_SUMMON60 -1129001 diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 8b138468f4c..a0a8bb02d90 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "razorfen_downs.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index b84ecea4de3..3a147007fce 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_henry_stern EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "razorfen_downs.h" /*### diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index 98395305d57..374c2ae4257 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Razorfen Kraul EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "razorfen_kraul.h" #define WARD_KEEPERS_NR 2 diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp index 43e3fe6efdd..374059c46ac 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp @@ -27,7 +27,8 @@ EndScriptData */ npc_willix EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "razorfen_kraul.h" diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index 459dc87a9b8..40d4d5d54b4 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -23,7 +23,8 @@ SDComment: Place Holder SDCategory: Ruins of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ruins_of_ahnqiraj.h" enum Yells diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp index 18a77519ba2..c05613d387f 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ruins_of_ahnqiraj.h" enum Texts diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 91c0110abd5..e9bb8be67b7 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -23,7 +23,8 @@ SDComment: Place holder SDCategory: Ruins of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ruins_of_ahnqiraj.h" enum Yells diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index d4549242a4c..2dbd52f7e42 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "ruins_of_ahnqiraj.h" class instance_ruins_of_ahnqiraj : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index 36b1871c96e..0b78b5f9ab2 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" #define SPELL_CLEAVE 26350 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 11efccd14b7..92fd27a5680 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -23,7 +23,8 @@ SDComment: Darkglare tracking issue SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" /* diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index 613bc91182b..5ebce2f04e2 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -23,7 +23,8 @@ SDComment: sound not implemented SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SOUND_SENTENCE_YOU 8588 #define SOUND_SERVE_TO 8589 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index 53fac3ee3ec..83af40c57f2 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define EMOTE_GENERIC_FRENZY_KILL -1000001 #define EMOTE_GENERIC_BERSERK -1000004 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index 81205780e7d..f7acf28dba3 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -23,7 +23,8 @@ SDComment: No model for submerging. Currently just invisible. SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" #define SPELL_SWEEP 26103 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp index 8c6c0fa0ad0..02554bbe6b3 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_AGGRO -1531008 #define SAY_SLAY -1531009 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 4df4bf73330..36388cfbe9c 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -23,7 +23,8 @@ SDComment: Mind Control buggy. SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" #include "Group.h" diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index abaab9d830e..b85999042dd 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" #include "WorldPacket.h" diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp index 7b30200b0b3..d0e97bc36c8 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp @@ -23,7 +23,8 @@ SDComment: place holder SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_POISON_SHOCK 25993 #define SPELL_POISONBOLT_VOLLEY 25991 diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index f1cc0b401c3..887ca4f3ad5 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "temple_of_ahnqiraj.h" class instance_temple_of_ahnqiraj : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index 556247d85af..5bb65454e0a 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -23,7 +23,8 @@ SDComment: Shadow storm is not properly implemented in core it should only targe SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "WorldPacket.h" #include "Item.h" diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index e61e20c35bc..1bb5c1180bd 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -23,7 +23,8 @@ SDComment: Everything seems to work, still need some checking SDCategory: Wailing Caverns EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "wailing_caverns.h" #define MAX_ENCOUNTER 9 diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 7e93cc7e4c7..0d4efac4321 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -26,7 +26,9 @@ EndScriptData */ /* ContentData EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "wailing_caverns.h" diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index b6c69584358..6c0d43b053e 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "zulfarrak.h" #define NPC_GAHZRILLA 7273 diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 9e3d9240321..03e3756f964 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -28,7 +28,9 @@ npc_sergeant_bly npc_weegli_blastfuse EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "zulfarrak.h" /*###### diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp index 8f34fa56525..89064a5d18c 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp @@ -19,7 +19,8 @@ * Comment: Find correct mushrooms spell to make them visible - buffs of the mushrooms not ever applied to the users... */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ahnkahet.h" enum Spells diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp index ea757e86f4d..7f4da5666ff 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ahnkahet.h" //not in db diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp index f1eaa0c87c5..e81d58b4ef3 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp @@ -19,7 +19,8 @@ * Comment: Missing AI for Twisted Visages */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ahnkahet.h" enum Spells diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index d6e50097765..7c167fb9c27 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -19,7 +19,8 @@ * Comment: Complete - BUT THE TRIGGER NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE ! */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ahnkahet.h" enum Yells diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp index cf3c4274e48..f8e2fc0f99f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ahnkahet.h" enum Spells diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index 74643e58e30..f870c61dd5f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "ahnkahet.h" /* Ahn'kahet encounters: diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index ca71d8c313e..dcf1338bc74 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "azjol_nerub.h" enum Spells diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 6587631f249..2690ea13ab1 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -28,7 +28,8 @@ * Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn. */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "azjol_nerub.h" enum Spells diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index 4d83be53c93..1acc3b77a61 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -19,7 +19,8 @@ * Comment: Find in the future best timers and the event is not implemented. */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "azjol_nerub.h" enum Spells diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index 12622174e29..4e06ac0ba3a 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "azjol_nerub.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index b115a4ee827..a9d6d9d91ba 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -15,7 +15,12 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" #include "obsidian_sanctum.h" enum eEnums diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index 91d67697ebb..7d4438ed7c7 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "obsidian_sanctum.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index b2cf755c7af..41eb31d815d 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ruby_sanctum.h" diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp index 5a7809dbe70..c4008564029 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ruby_sanctum.h" enum Texts diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index f9e302d7634..5678bbbeb83 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "ruby_sanctum.h" diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp index 19ae66b6a60..273c860a2ad 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ruby_sanctum.h" enum Texts diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index e96408acc09..76d5949eb44 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -22,7 +22,9 @@ SDComment: AI for Argent Soldiers are not implemented. AI from bosses need more SDCategory: Trial of the Champion EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" #include "trial_of_the_champion.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp index 9768b50b214..c56d44ceb08 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp @@ -22,7 +22,8 @@ SDComment: missing yells. not sure about timers. SDCategory: Trial of the Champion EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "trial_of_the_champion.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index 18c972b966c..f3b6078d536 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -23,7 +23,8 @@ SDComment: Is missing the ai to make the npcs look for a new mount and use it. SDCategory: Trial Of the Champion EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Vehicle.h" #include "trial_of_the_champion.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 9ccd136731a..310dd1003c3 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -21,7 +21,9 @@ SDComment: SDCategory: Trial Of the Champion EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "trial_of_the_champion.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index c8236ace88c..a2488513d63 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -26,7 +26,9 @@ EndScriptData */ npc_announcer_toc5 EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "trial_of_the_champion.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index e4dcf978574..b3b9801fd00 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -31,7 +31,8 @@ EndScriptData */ // Scarab - Kill credit isn't crediting? // FrostSph - often they are casting Permafrost a little above the ground -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "trial_of_the_crusader.h" enum Yells diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index a7328b43826..4e791dfc22f 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -30,7 +30,8 @@ EndScriptData */ // Redone summon's scripts in SAI // Add immunities to the boss and summons -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "trial_of_the_crusader.h" enum Yells diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 5bda32941c2..6c69ccbc72d 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -29,7 +29,8 @@ EndScriptData */ // Snakes - miss the 1-hitkill from emerging // - visual changes between mobile and stationary models seems not to work sometimes -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "trial_of_the_crusader.h" enum Yells diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index cf84abb482f..4cfe4f61dbb 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -27,7 +27,15 @@ EndScriptData */ // - They should be floating but they aren't respecting the floor =( // - Hardcoded bullets spawner -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" #include "trial_of_the_crusader.h" enum Yells diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 1966e26b128..1fd1fdf094d 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -23,7 +23,8 @@ SDComment: by /dev/rsa SDCategory: Trial of the Crusader EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "trial_of_the_crusader.h" class instance_trial_of_the_crusader : public InstanceMapScript 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 2643b8d60c7..4ad93c0afe1 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -27,7 +27,9 @@ EndScriptData */ // - Need better implementation of Gossip and correct gossip text and option // - Misses Dalaran Teleport at the end. -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "trial_of_the_crusader.h" enum eYells diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index 95acc79231d..8b39fc51766 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -19,7 +19,8 @@ * Comment: MAYBE need more improve the "Raptor Call". */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "drak_tharon_keep.h" enum Spells diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index 9ff8ee9c9ed..5d9acf4fca7 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "drak_tharon_keep.h" enum Spells diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index b1d588a0d0d..969ccf4a059 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "drak_tharon_keep.h" enum Spells diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index 26e4e9db99e..b6a4c40abdd 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -19,7 +19,9 @@ * Comment: TODO: spawn troll waves */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuras.h" #include "drak_tharon_keep.h" enum Spells diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index aff3f1b8e36..7778a79a816 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "drak_tharon_keep.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index 5b6bf14c29e..b790ed518d5 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellAuraEffects.h" #include "forge_of_souls.h" diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index ad49f6cbce8..4fdcf96192b 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "forge_of_souls.h" /* diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index 1469e26fd20..c23479eea22 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "forge_of_souls.h" enum Events diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index bad4b8e38b2..618b2b6a9a6 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "forge_of_souls.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp index 9cfcb78f6f1..4df13d32bf8 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp index a9bfb603794..8334a199791 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 2abb60d5de2..26ec9e53213 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index 3c4d05854bb..e3604890e39 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "halls_of_reflection.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 114bc69741c..a12bd96f6df 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuras.h" #include "pit_of_saron.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index fa260cb298d..57d99908bfb 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "pit_of_saron.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index 8d015adf4a4..ef4d9182f82 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "pit_of_saron.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index 1301acf4c99..a6537c45d6f 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "pit_of_saron.h" // positions for Martin Victus (37591) and Gorkun Ironskull (37592) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp index b6c821ef66a..eba19403517 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "pit_of_saron.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index b66c3d795f3..fd1aba79e83 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -19,7 +19,8 @@ * Comment: The event with the Living Mojos is not implemented, just is done that when one of the mojos around the boss take damage will make the boss enter in combat! */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "gundrak.h" enum Spells diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index 3e803c24d61..b75c5cbc2a9 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "gundrak.h" enum Spells diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index be9b09a1263..0d89c402054 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "gundrak.h" //Spells diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index 1085e993322..c1301dbd2d0 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "gundrak.h" enum eSpells diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index b827f43dc99..251c9ec2b83 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuras.h" #include "gundrak.h" //Spells diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index c22a0e17cd5..15315c721d7 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "gundrak.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index 1671eab0b32..8901a61e79d 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" #define SAY_GREET RAND(-1533000, -1533004, -1533005, -1533006, -1533007) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 058c5b35e3a..636f2318712 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" enum Yells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index 47dfaa7f772..69443b2824e 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" #define SPELL_MORTAL_WOUND 25646 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index 039b9b1e007..5a55a4f1c4b 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" #define SPELL_BOMBARD_SLIME 28280 diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index d84cfb8949e..93eab5df237 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" #include "naxxramas.h" #define SAY_AGGRO RAND(-1533109, -1533110, -1533111) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 38c22a93ac4..10b40b490c4 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -23,7 +23,10 @@ SDComment: VERIFY SCRIPT SDCategory: Naxxramas EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "naxxramas.h" enum Yells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 58d3a4240b2..71623cb1959 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "naxxramas.h" enum Spells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp index 3c258f08030..8ec9bac7e86 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" #include "naxxramas.h" enum Spells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index 75be596fd77..d106b99ace0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" #define SAY_AGGRO RAND(-1533075, -1533076, -1533077) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index b826a530719..b1b57836a89 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" enum Spells diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp index e06aa6b03c5..d733cac001c 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" //Razuvious - NO TEXT sound only diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index 37fb5f3f4a9..a2acf8a64da 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "naxxramas.h" #define EMOTE_BREATH -1533082 diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 50eb52cc4c2..e806b60c848 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "naxxramas.h" const DoorData doorData[] = diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index ac5520b025a..9f5eb8d879a 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -27,7 +27,11 @@ Script Data End */ // Remove hack that re-adds targets to the aggro list after they enter to a vehicle when it works as expected // Improve whatever can be improved :) -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" +#include "PassiveAI.h" #include "eye_of_eternity.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index fcb54985357..f6a12eee519 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "eye_of_eternity.h" class instance_eye_of_eternity : public InstanceMapScript diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index 7552ba4f389..5e6dcbcd66e 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "nexus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index 5c1dee1d4e4..9e6930118f7 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -16,7 +16,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "nexus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index ad188738c12..9602d1bc876 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "nexus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index c70db7d4ebc..9f9223f0161 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "nexus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp index 5ea3eb32c1d..5463f6c9045 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp @@ -23,7 +23,8 @@ SDComment: Only Alliance Heroic SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_BATTLE_SHOUT 31403 #define SPELL_CHARGE 60067 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp index da4b49740c1..38808bc718d 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp @@ -23,7 +23,8 @@ SDComment: Only Horde Heroic SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_BATTLE_SHOUT 31403 #define SPELL_CHARGE 60067 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index 5af982bb694..152f0b2d647 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "nexus.h" #define NUMBER_OF_ENCOUNTERS 4 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp index bb75b789fff..035e1a9a6df 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "oculus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index ab814a2ca22..708ed600933 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "oculus.h" //Types of drake mounts: Ruby(Tank), Amber(DPS), Emerald(Healer) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index b96d7c4aa84..791bc0180e5 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -22,7 +22,8 @@ SDComment: Is not working SPELL_ARCANE_SHIELD. SPELL_FROSTBOMB has some issues, SDCategory: Instance Script EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "oculus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index d200e8bf4bf..6d9450daf21 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "oculus.h" #include "MapManager.h" diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 46498a69c6f..ca4ae883747 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "oculus.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index 0eafd7a7fea..1d8b5b986f6 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -15,7 +15,11 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "oculus.h" #define GOSSIP_ITEM_DRAKES "So where do we go from here?" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index 9f39cecbb23..72ab5259693 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -23,7 +23,8 @@ SDComment: Waypoint needed, we expect boss to always have 2x Stormforged Lieuten SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_lightning.h" enum eEnums diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index abdf5ecb1e1..d964f619a6e 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -20,7 +20,8 @@ * Comment: Timer check pending */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_lightning.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 5c7bf0d1c1e..fe41e7a12dc 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -23,7 +23,8 @@ SDComment: Event should be pretty close minus a few visual flaws SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_lightning.h" enum eEnums diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index f25be6dae0d..93b246e9ddc 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -23,7 +23,8 @@ SDComment: All ready. SDCategory: Halls of Lightning EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "halls_of_lightning.h" /* Halls of Lightning encounters: diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp index 65711643827..8d113bce226 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_stone.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index c2a8e905950..28052a57576 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "halls_of_stone.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp index a608de5fcf3..a90c346e470 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index ee5cb87dd85..869cf46e74d 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "halls_of_stone.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index a7853a07e22..191f4530e65 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -22,7 +22,8 @@ SDComment: Some Problems with Annhylde Movement, Blizzlike Timers (just shadow a SDCategory: Udgarde Keep EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "utgarde_keep.h" enum Yells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index 93cc94923db..f53020a72c4 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -22,7 +22,10 @@ SDComment: SDCategory: Utgarde Keep EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "utgarde_keep.h" enum KelsethEncounter diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index 915d1c71bb2..be8d60fbeb9 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -22,7 +22,8 @@ SDComment: Needs adjustments to blizzlike timers, Yell Text + Sound to DB SDCategory: Utgarde Keep EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "utgarde_keep.h" enum eEnums diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index fda4767e16b..cf3bc2d8607 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -22,7 +22,8 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter SDCategory: Utgarde Keep EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "utgarde_keep.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 95d2cb1709e..2d53e7062eb 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "utgarde_keep.h" uint32 entry_search[3] = diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index e2943f491f6..8cbfe4bafb4 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "utgarde_pinnacle.h" enum Spells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 5132dd0f046..f0d64bb8344 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -25,7 +25,8 @@ SDComment: SDCategory: Utgarde Pinnacle Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "utgarde_pinnacle.h" //Yell diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index 7969accc28c..f2f03ff602b 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -15,7 +15,10 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "utgarde_pinnacle.h" enum Spells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index f9251c637ba..5dacaff2d6b 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "utgarde_pinnacle.h" enum Spells diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index 26fbbf4d717..c5d50d4e7fd 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "utgarde_pinnacle.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index bffc6af2a3a..96e0bc66bd1 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "vault_of_archavon.h" #define EMOTE_BERSERK -1590002 diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp index 4980ed36ec3..903280d317a 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuras.h" #include "vault_of_archavon.h" //Emalon spells diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index dd9db1c0a99..31003addf1f 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "vault_of_archavon.h" enum Events diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index 100f1fccac8..9c60673522c 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "vault_of_archavon.h" enum Spells diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index ec0de41ed6d..d1209b40a19 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "vault_of_archavon.h" /* Vault of Archavon encounters: diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp index 37ef8bf2788..b4ce402e7de 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index 31902acfc46..bd59b731c3c 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index a191d9349f2..f6d918e0493 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp index 7a8254ad2b6..510e9874dd7 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp index 1a70846e1b6..f368b07077a 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" //Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index ac165ac39ef..a01b41bfbcf 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index 4569741e459..d1c65259738 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "violet_hold.h" enum Spells diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 37a13388b5f..4b6fed181e4 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "violet_hold.h" #define MAX_ENCOUNTER 3 diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index e9d2c85e13e..122d051f1dd 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 8b51618eedd..9b207c257fc 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -37,7 +37,9 @@ npc_lurgglbr npc_nexus_drake_hatchling EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp index d48903696ec..7b8eb331702 100644 --- a/src/server/scripts/Northrend/crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/crystalsong_forest.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: CrystalsongForest Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /******************************************************* * npc_warmage_violetstand diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp index e7b92732066..c19effbab1b 100644 --- a/src/server/scripts/Northrend/dalaran.cpp +++ b/src/server/scripts/Northrend/dalaran.cpp @@ -23,7 +23,9 @@ SDComment: For what is 63990+63991? Same function but don't work correct... SDCategory: Dalaran Script Data End */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /******************************************************* * npc_mageguard_dalaran diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index 1b339b24549..ecc012eb25d 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -27,7 +27,11 @@ EndScriptData */ npc_alexstrasza_wr_gate EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "ScriptedEscortAI.h" enum eEnums diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 2da84dd3fdb..1a0f6b57375 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp index 88cc297868b..ffe38d6aade 100644 --- a/src/server/scripts/Northrend/howling_fjord.cpp +++ b/src/server/scripts/Northrend/howling_fjord.cpp @@ -27,7 +27,9 @@ npc_plaguehound_tracker npc_apothecary_hanes EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index 85b34523893..5989b5bad2e 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -27,7 +27,10 @@ EndScriptData */ npc_arete EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellAuras.h" /*###### ## npc_arete diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 6d76e348980..1cf8f54b4fe 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" #include "BattlegroundIC.h" // TO-DO: This should be done with SmartAI, but yet it does not correctly support vehicles's AIs. diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index afab9b90a4a..56ef25c5753 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -28,8 +28,11 @@ npc_vekjik avatar_of_freya EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "SpellScript.h" /*###### ## npc_injured_rainspeaker_oracle diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 15239e9f836..6bf342e4643 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index 369f47cfb1c..6af96f3fdfd 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -15,7 +15,9 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*#### diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index 1db4fb4dfc9..2a94ddb3134 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ScriptMgr.h" #include "OutdoorPvPEP.h" #include "WorldPacket.h" #include "Player.h" @@ -26,7 +27,6 @@ #include "Language.h" #include "World.h" #include "GossipDef.h" -#include "ScriptPCH.h" OPvPCapturePointEP_EWT::OPvPCapturePointEP_EWT(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_UnitsSummonedSide(0) diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index 06c1813d1dc..a4b506e9271 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ScriptMgr.h" #include "OutdoorPvPHP.h" #include "OutdoorPvP.h" #include "OutdoorPvPMgr.h" @@ -23,7 +24,6 @@ #include "World.h" #include "ObjectMgr.h" #include "Language.h" -#include "ScriptPCH.h" const uint32 HP_LANG_LOSE_A[HP_TOWER_NUM] = {LANG_OPVP_HP_LOSE_BROKENHILL_A, LANG_OPVP_HP_LOSE_OVERLOOK_A, LANG_OPVP_HP_LOSE_STADIUM_A}; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index f912f25d87f..abf807327e3 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ScriptMgr.h" #include "OutdoorPvPNA.h" #include "Player.h" #include "ObjectMgr.h" @@ -22,7 +23,6 @@ #include "WorldPacket.h" #include "Language.h" #include "World.h" -#include "ScriptPCH.h" OutdoorPvPNA::OutdoorPvPNA() { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index a69dd3ed874..c70e4168826 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ScriptMgr.h" #include "OutdoorPvPSI.h" #include "WorldPacket.h" #include "Player.h" @@ -24,7 +25,6 @@ #include "OutdoorPvPMgr.h" #include "Language.h" #include "World.h" -#include "ScriptPCH.h" OutdoorPvPSI::OutdoorPvPSI() { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index ec0c10f4afe..9572125a4bd 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ScriptMgr.h" #include "OutdoorPvPTF.h" #include "OutdoorPvPMgr.h" #include "OutdoorPvP.h" @@ -23,7 +24,6 @@ #include "ObjectMgr.h" #include "Language.h" #include "World.h" -#include "ScriptPCH.h" OutdoorPvPTF::OutdoorPvPTF() { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index 38fed30f542..6644dd3f47f 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ScriptMgr.h" #include "OutdoorPvPZM.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" @@ -24,7 +25,6 @@ #include "WorldPacket.h" #include "GossipDef.h" #include "World.h" -#include "ScriptPCH.h" OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N) diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index ae1a7296de6..a8b4b1797cb 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -29,7 +29,8 @@ boss_exarch_maladaar mob_avatar_of_martyred EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_MOONFIRE 37328 #define SPELL_FIREBALL 37329 diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp index 5fc912f2a01..f678cf9c198 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp @@ -23,7 +23,8 @@ Comment: InhibitMagic should stack slower far from the boss, proper Visual for F Category: Auchindoun, Auchenai Crypts EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_INHIBITMAGIC 32264 #define SPELL_ATTRACTMAGIC 32265 diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp index a4bba5f28fb..351f30c926f 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp @@ -28,7 +28,8 @@ boss_nexusprince_shaffar mob_ethereal_beacon EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum ePrince { diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp index 487a1dd41ea..459ba3a8f86 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp @@ -23,7 +23,8 @@ SDComment: Not known how void blast is done (amount of rapid cast seems to be re SDCategory: Auchindoun, Mana Tombs EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_AGGRO_1 -1557008 #define SAY_AGGRO_2 -1557009 diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp index 37544f9377b..0a85cf1dc5b 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp @@ -23,7 +23,8 @@ SDComment: Shock spells/times need more work. Heroic partly implemented. SDCategory: Auchindoun, Sethekk Halls EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SAY_SUMMON -1556000 diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp index 768c4bf12d3..ec35d6c80b3 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp @@ -23,7 +23,8 @@ SDComment: Heroic supported. Some details missing, but most are spell related. SDCategory: Auchindoun, Sethekk Halls EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "sethekk_halls.h" #define SAY_INTRO -1556007 diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index 02c5a035375..f57bed1207b 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -23,7 +23,8 @@ SDComment: Instance Data for Sethekk Halls instance SDCategory: Auchindoun, Sethekk Halls EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "sethekk_halls.h" enum eEnums diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp index d92e76685d1..a109e3738b1 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp @@ -23,7 +23,8 @@ SDComment: Enrage spell missing/not known SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "shadow_labyrinth.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index 6eac36f71c8..e7063e479ee 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -23,7 +23,8 @@ SDComment: Incite Chaos not functional since core lacks Mind Control support SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "shadow_labyrinth.h" #define SPELL_INCITE_CHAOS 33676 diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index 8d971c37559..c1850ee821c 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "shadow_labyrinth.h" #define SAY_INTRO -1555028 diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 99661d8818c..4f8fc917424 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -23,7 +23,8 @@ SDComment: Timers may be incorrect SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "shadow_labyrinth.h" #define EMOTE_SONIC_BOOM -1555036 diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 846669552ba..326d214e886 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -23,7 +23,8 @@ SDComment: Some cleanup left along with save SDCategory: Auchindoun, Shadow Labyrinth EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "shadow_labyrinth.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp index 546f9ee1e7d..5fe5b8aab0c 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp @@ -27,7 +27,9 @@ EndScriptData */ npc_spirit_of_olum EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + #include "ScriptedGossip.h" #include "black_temple.h" /*### diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index caac89da765..fd775df3392 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -23,7 +23,8 @@ SDComment: Bloodboil not working correctly, missing enrage SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "black_temple.h" //Speech'n'Sound diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 1926929c97c..52704cb8f49 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -23,7 +23,10 @@ SDComment: Somewhat of a workaround for Parasitic Shadowfiend, unable to summon SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "PassiveAI.h" #include "black_temple.h" #define GETGO(obj, guid) GameObject* obj = instance->instance->GetGameObject(guid) diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 4e4607a7d44..1b2fe61e87c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -23,7 +23,8 @@ SDComment: Saber Lash missing, Fatal Attraction slightly incorrect; need to dama SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "black_temple.h" //Speech'n'Sounds diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index c5e78f2fa7b..44c37fc9753 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "black_temple.h" #include "Spell.h" diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 630e44429fa..81be46a197c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -23,7 +23,9 @@ SDComment: Seems to be complete. SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "black_temple.h" #define SAY_DEATH -1564013 diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index ce1732433c8..e34a229eea5 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -23,7 +23,9 @@ SDComment: Need to implement molten punch SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" #include "black_temple.h" #define EMOTE_NEW_TARGET -1564010 diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index bc12a6c1c6c..524992b3c44 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -23,7 +23,8 @@ SDComment: Requires Mind Control support for Ghosts. SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "black_temple.h" //Speech'n'sound diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 5b2bb8e7bf5..e8bee95865f 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "black_temple.h" enum eEnums diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index 0742f174ccf..9197492fbf1 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -23,7 +23,10 @@ SDComment: Circle of Healing not working properly. SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" #include "black_temple.h" //Speech'n'Sounds diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 49bce6d82c0..310bb6da651 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -23,7 +23,8 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter SDCategory: Black Temple EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "black_temple.h" #define MAX_ENCOUNTER 9 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 3937b213e7e..a5737714e71 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -23,7 +23,8 @@ SDComment: Cyclone workaround SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "serpent_shrine.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index 7abd2bbc8a8..bad10752db3 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -23,7 +23,8 @@ SDComment: Some details and adjustments left to do, probably nothing major. Spaw SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "serpent_shrine.h" #define SAY_AGGRO -1548000 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 18d8b2b5a1e..539974a0a91 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -23,7 +23,8 @@ SDComment: Missing blizzlike Shield Generators coords SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "serpent_shrine.h" #include "Spell.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 4876410890c..81e03a19c1f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -23,7 +23,8 @@ SDComment: Possesion Support SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "serpent_shrine.h" // --- Spells used by Leotheras The Blind diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 00de1802bc9..b9e530996af 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -23,7 +23,8 @@ SDComment: Coilfang Frenzy, find out how could we fishing in the strangepool SDCategory: The Lurker Below EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "serpent_shrine.h" #include "Spell.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 865fb143800..32f03d4d1f9 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -23,7 +23,8 @@ SDComment: Water globules don't explode properly, remove hacks SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "serpent_shrine.h" enum eEnums diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 3ed3d1a82de..87053d1de1c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -23,7 +23,8 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "serpent_shrine.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index 48c5a360619..038300213a4 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -28,7 +28,8 @@ boss_hydromancer_thespia mob_coilfang_waterelemental EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "steam_vault.h" #define SAY_SUMMON -1545000 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp index 739168863f4..50cc913c669 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp @@ -28,7 +28,8 @@ boss_mekgineer_steamrigger mob_steamrigger_mechanic EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "steam_vault.h" #define SAY_MECHANICS -1545007 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index cae1117805a..d81a021c4bc 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -23,7 +23,8 @@ SDComment: Contains workarounds regarding warlord's rage spells not acting as ex SDCategory: Coilfang Resevoir, The Steamvault EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "steam_vault.h" #define SAY_INTRO -1545016 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index 51032fd70ed..63fd935751d 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -23,7 +23,8 @@ SDComment: Instance script and access panel GO SDCategory: Coilfang Resevoir, The Steamvault EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "steam_vault.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp index 42d617992ed..54823687e5e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp @@ -23,7 +23,8 @@ SDComment: Need confirmation if spell data are same in both modes. Summons shoul SDCategory: Coilfang Resevoir, Underbog EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_FOUL_SPORES 31673 #define SPELL_ACID_GEYSER 38739 diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp index f7079e5c664..4006e756ca2 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp @@ -23,7 +23,8 @@ SDComment: Timers may be incorrect SDCategory: Coilfang Resevoir, Underbog EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #define SPELL_LEVITATE 31704 #define SPELL_SUSPENSION 31719 diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index 0f42b1b7e53..03089d646f9 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -23,7 +23,8 @@ SDComment: Correct timers, after whirlwind melee attack bug, prayer of healing SDCategory: Gruul's Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "gruuls_lair.h" #define SAY_AGGRO -1565000 diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index 3514732b53a..fdb386372d4 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Gruul's Lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "gruuls_lair.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp index f6b7518661e..3a2e0834fed 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp @@ -23,7 +23,8 @@ SDComment: pre-event not made SDCategory: Hellfire Citadel, Blood Furnace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "blood_furnace.h" enum eEnums diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 01873afeaa9..a0bcc396fdb 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -28,7 +28,9 @@ boss_kelidan_the_breaker mob_shadowmoon_channeler EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuras.h" #include "blood_furnace.h" enum eKelidan diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp index dc9f83b073d..df9aefabe15 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp @@ -23,7 +23,8 @@ SDComment: Mind control no support SDCategory: Hellfire Citadel, Blood Furnace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "blood_furnace.h" enum eEnums diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index d9f6b7e303e..4c434feb4ec 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Hellfire Citadel, Blood Furnace EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "blood_furnace.h" #define ENTRY_SEWER1 181823 diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 2ab2b2b5b2e..714ea275471 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -23,7 +23,8 @@ SDComment: Temporary solution for orbital/shadow whip-ability. Needs more core s SDCategory: Hellfire Citadel, Hellfire Ramparts EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index a5cdebea754..3bb0858d2be 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -23,7 +23,8 @@ Comment: Category: Hellfire Citadel, Hellfire Ramparts EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSpells { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index 2c00a68321a..1d2ecccf3c7 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -23,7 +23,8 @@ SDComment: Missing adds to heal him. Surge should be used on target furthest awa SDCategory: Hellfire Citadel, Hellfire Ramparts EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index 3dab24eab1b..c100fa204e2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Hellfire Ramparts EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "hellfire_ramparts.h" class instance_ramparts : public InstanceMapScript diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 1b29abf1afc..bbf03e39f9b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -23,7 +23,8 @@ SDComment: In Development SDCategory: Hellfire Citadel, Magtheridon's lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "magtheridons_lair.h" struct Yell diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index cb55d627f7d..640e4439593 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -23,7 +23,9 @@ SDComment: SDCategory: Hellfire Citadel, Magtheridon's lair EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "InstanceScript.h" #include "magtheridons_lair.h" enum eSpells diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 7dfdc40a787..c6434d9a989 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -29,7 +29,8 @@ mob_fel_orc_convert mob_lesser_shadow_fissure EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "shattered_halls.h" struct Say diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index 5371473e21e..3d2d39e9817 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -28,7 +28,8 @@ mob_omrogg_heads boss_warbringer_omrogg EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "shattered_halls.h" enum eEnums diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index c1489671292..99f7c69aff2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -27,7 +27,8 @@ EndScriptData */ boss_warchief_kargath_bladefist EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index cc36bf9a385..4105a7d5821 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -23,7 +23,8 @@ SDComment: currently missing info about door. instance not complete SDCategory: Hellfire Citadel, Shattered Halls EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "shattered_halls.h" #define MAX_ENCOUNTER 2 diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 25207073708..3770ac3ba09 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Tempest Keep, The Eye EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "the_eye.h" enum eSpells diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 1d8c7e71bef..e5dd1c923d9 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -23,7 +23,8 @@ SDComment: SQL, weapon scripts, mind control, need correct spells(interruptible/ SDCategory: Tempest Keep, The Eye EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "the_eye.h" #include "WorldPacket.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index 275a72e75ac..2c778485131 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -23,7 +23,8 @@ SDComment: Should reset if raid are out of room. SDCategory: Tempest Keep, The Eye EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "the_eye.h" enum eEnums diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index f25b6749055..78ffddca4d8 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Tempest Keep, The Eye EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "the_eye.h" #define MAX_ENCOUNTER 5 diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp index 421f9f2f545..a38ad1d734e 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp @@ -27,7 +27,8 @@ EndScriptData */ mob_crystalcore_devastator EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "the_eye.h" enum eSpells diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp index 4d579ac8c16..1d816f1eee3 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp @@ -23,7 +23,8 @@ SDComment: Place Holder SDCategory: Tempest Keep, The Mechanar EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" //not used #define SAY_AGGRO -1554000 diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index a1287a57402..83acc1258be 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Tempest Keep, The Mechanar EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 1cd67065af1..d2b0475fa77 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -18,6 +18,7 @@ //! TODO - Boss not scripted, just ported required spellscript from core #include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "SpellScript.h" enum Spells diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index 59837fdbed1..02be844711d 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -23,7 +23,8 @@ SDComment: Need adjustments to initial summons SDCategory: Tempest Keep, The Mechanar EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "mechanar.h" enum eSays diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 3a4d449707d..622e6e6d7e6 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -23,7 +23,8 @@ SDComment: Event missing. Script for himself 99% blizzlike. SDCategory: Tempest Keep, The Mechanar EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index ad3c899237f..a96666705d1 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -23,7 +23,8 @@ SDComment: SDCategory: Mechanar EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "mechanar.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index d675b438968..f45ece47220 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -29,7 +29,8 @@ npc_warden_mellichar mob_zerekethvoidzone EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "arcatraz.h" /*##### diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index c2eeaf9fe7a..730bab7e626 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -28,7 +28,8 @@ boss_harbinger_skyriss boss_harbinger_skyriss_illusion EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "arcatraz.h" enum eSays diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index ffe96fb7bd1..d5b61b87fc2 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -23,7 +23,8 @@ SDComment: Mainly Harbringer Skyriss event SDCategory: Tempest Keep, The Arcatraz EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "InstanceScript.h" #include "arcatraz.h" #define MAX_ENCOUNTER 9 diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index ba61a1bfb12..a53f62c96f4 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -23,7 +23,8 @@ SDComment: some strange visual related to tree form(if aura lost before normal d SDCategory: Tempest Keep, The Botanica EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp index e8188f892b3..ed04c42edc7 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp @@ -23,7 +23,8 @@ SDComment: Immunities are wrong, must be adjusted to use resistance from creatur SDCategory: Tempest Keep, The Botanica EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSpells { diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index 3acde2455db..e3b1a7e94e1 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -23,7 +23,8 @@ SDComment: Includes Sapling (need some better control with these). SDCategory: Tempest Keep, The Botanica EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum eSays { diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp index c46757a3956..c263ac85ef5 100644 --- a/src/server/scripts/Outland/blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp @@ -33,7 +33,13 @@ go_legion_obelisk go_thunderspike EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" //Support for quest: You're Fired! (10821) bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five; diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp index 67834601d6f..ae3bd283db4 100644 --- a/src/server/scripts/Outland/boss_doomwalker.cpp +++ b/src/server/scripts/Outland/boss_doomwalker.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" enum Texts { diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp index b0e19f0e322..6825d859332 100644 --- a/src/server/scripts/Outland/hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/hellfire_peninsula.cpp @@ -33,7 +33,9 @@ npc_trollbane npc_wounded_blood_elf EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 871a2f200bb..977ec57e2df 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -28,8 +28,9 @@ npc_greatmother_geyah npc_maghar_captive npc_creditmarker_visit_with_ancestors EndContentData */ - -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 16dac13d1a9..e5795383ede 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -32,7 +32,9 @@ npc_maxx_a_million go_captain_tyralius_prison EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index 340049ba4fa..c79bf74aab6 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -40,7 +40,9 @@ go_crystal_prison npc_enraged_spirit EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Group.h" diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp index 79cce47e16c..8ad2c311fc5 100644 --- a/src/server/scripts/Outland/shattrath_city.cpp +++ b/src/server/scripts/Outland/shattrath_city.cpp @@ -34,7 +34,9 @@ npc_ishanah npc_khadgar EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index 6c2214cde37..707cabfcf0c 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -33,7 +33,9 @@ npc_isla_starmane npc_slim EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Group.h" diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp index 90ce070ecc7..aa51b532c27 100644 --- a/src/server/scripts/Outland/zangarmarsh.cpp +++ b/src/server/scripts/Outland/zangarmarsh.cpp @@ -32,7 +32,9 @@ npc_kayra_longmane npc_timothy_daniels EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" /*###### diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index dabe978b58c..c147a548eda 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -20,7 +20,11 @@ * Scriptnames in this file should be prefixed with "spell_#holidayname_". */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" +#include "GridNotifiers.h" // 45102 Romantic Picnic enum SpellsPicnic diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index daf0ef213d9..f302009a4f3 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -35,7 +35,8 @@ at_brewfest at_area_52_entrance EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" /*###### ## at_coilfang_waterfall diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 2a5d814bfde..aaeb8a13acd 100755 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" #include "Channel.h" #include "Guild.h" #include "Group.h" diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 21a852ae9ed..ad870b155f3 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -50,7 +50,9 @@ go_large_gjalerbron_cage go_veil_skith_cage EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /*###### ## go_cat_figurine diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index e3100522fbe..4b0433fe0c7 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -29,7 +29,8 @@ guard_shattrath_aldor guard_shattrath_scryer EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "GuardAI.h" enum GuardGeneric diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index ae69744ea2b..d888e6cb56b 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -30,7 +30,8 @@ item_gor_dreks_ointment(i30175) Protecting Our Own(q10488) item_only_for_flight Items which should only useable while flying EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" #include "Spell.h" /*##### diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index 208effee61b..be409670f5d 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -23,7 +23,9 @@ SDComment: Should be replaced with core based AI SDCategory: Creatures EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" #define GENERIC_CREATURE_COOLDOWN 5000 diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index fb7c0833d22..f57af517db2 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -23,7 +23,10 @@ SDComment: Complete SDCategory: NPCs EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "GameEventMgr.h" #define HALLOWEEN_EVENTID 12 #define SPELL_TRICK_OR_TREATED 24755 diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 2afa80dd42c..9126e268260 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -23,7 +23,9 @@ SDComment: Provides learn/unlearn/relearn-options for professions. Not supported SDCategory: NPCs EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /* A few notes for future developement: diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp index ceda8e0f6ac..6241978fbd2 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -24,7 +24,9 @@ SDCategory: NPCs EndScriptData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #define GOSSIP_SUSURRUS "I am ready." #define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!" diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 57a65423b6f..4eea4999b0b 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -42,12 +42,22 @@ npc_locksmith 75% list of keys needs to be confirmed npc_firework 100% NPC's summoned by rockets and rocket clusters, for making them cast visual EndContentData */ -#include "ScriptPCH.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "ObjectMgr.h" #include "ScriptMgr.h" #include "World.h" #include "PetAI.h" +#include "PassiveAI.h" +#include "CombatAI.h" +#include "GameEventMgr.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Cell.h" +#include "CellImpl.h" +#include "SpellAuras.h" /*######## # npc_air_force_bots -- cgit v1.2.3 From 55ce180f2867700b28921d99f9a0cb9c83330c91 Mon Sep 17 00:00:00 2001 From: Spp Date: Fri, 3 Aug 2012 14:20:18 +0200 Subject: Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged. - Logging System is asyncronous to improve performance. - Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type - Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel. - There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel. - Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level' Explanation of use with Sample config: Appender.Console.Type=1 (1 = Console) Appender.Console.Level=2 (2 = Debug) Appender.Server.Type=2 (2 = File) Appender.Server.Level=3 (3 = Info) Appender.Server.File=Server.log Appender.SQL.Type=2 (2 = File) Appender.SQL.Level=1 (1 = Trace) Appender.SQL.File=sql.log Appenders=Console Server (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list) Logger.root.Type=0 (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED) Logger.root.Level=5 (5 = Error) Logger.root.Appenders=Console Logger.SQL.Type=26 (26 = SQL) Logger.SQL.Level=3 (2 = Debug) Logger.SQL.Appenders=Console Server SQL Logger.SomeRandomName.Type=24 (24 = Guild) Logger.SomeRandomName.Level=5 (5 = Error) Loggers=root SQL SomeRandomName * At loading Appender SQL will be ignored, as it's not present on "Appenders" * sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds") - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged * sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds") - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged * sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs") - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL - Appender Console has lower Log Level: Msg is logged to Console - Appender Server has higher Log Level: Msg is not logged to file - Appender SQL has lower Log Level: Msg is logged to file sql.log * sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds") - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender * sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds") - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console - Appender Console has lower LogLevel: Msg is logged to Console --- src/server/authserver/Main.cpp | 71 +- src/server/authserver/Realms/RealmList.cpp | 4 +- src/server/authserver/Server/AuthSocket.cpp | 76 +- src/server/authserver/Server/RealmAcceptor.h | 4 +- src/server/authserver/Server/RealmSocket.cpp | 2 +- src/server/authserver/authserver.conf.dist | 222 ++-- src/server/collision/Management/VMapManager2.cpp | 4 +- src/server/collision/Maps/MapTree.cpp | 10 +- src/server/collision/Models/GameObjectModel.cpp | 10 +- src/server/game/AI/CoreAI/CombatAI.cpp | 4 +- src/server/game/AI/CoreAI/PassiveAI.h | 1 - src/server/game/AI/CoreAI/PetAI.cpp | 5 +- src/server/game/AI/CoreAI/UnitAI.cpp | 2 +- src/server/game/AI/CreatureAI.cpp | 4 +- src/server/game/AI/CreatureAIRegistry.cpp | 1 - src/server/game/AI/CreatureAISelector.cpp | 1 - src/server/game/AI/EventAI/CreatureEventAI.cpp | 61 +- src/server/game/AI/EventAI/CreatureEventAI.h | 1 - src/server/game/AI/EventAI/CreatureEventAIMgr.cpp | 248 ++-- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 8 +- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 36 +- src/server/game/AI/ScriptedAI/ScriptedEscortAI.h | 1 - .../game/AI/ScriptedAI/ScriptedFollowerAI.cpp | 20 +- src/server/game/AI/SmartScripts/SmartAI.cpp | 23 +- src/server/game/AI/SmartScripts/SmartScript.cpp | 36 +- src/server/game/AI/SmartScripts/SmartScript.h | 6 +- src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 112 +- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 28 +- src/server/game/Achievements/AchievementMgr.cpp | 138 +- src/server/game/Addons/AddonMgr.cpp | 8 +- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 43 +- src/server/game/Battlegrounds/ArenaTeam.cpp | 18 +- src/server/game/Battlegrounds/ArenaTeamMgr.cpp | 10 +- src/server/game/Battlegrounds/Battleground.cpp | 48 +- src/server/game/Battlegrounds/BattlegroundMgr.cpp | 42 +- .../game/Battlegrounds/BattlegroundQueue.cpp | 14 +- .../game/Battlegrounds/Zones/BattlegroundAB.cpp | 10 +- .../game/Battlegrounds/Zones/BattlegroundAV.cpp | 50 +- .../game/Battlegrounds/Zones/BattlegroundBE.cpp | 6 +- .../game/Battlegrounds/Zones/BattlegroundDS.cpp | 6 +- .../game/Battlegrounds/Zones/BattlegroundEY.cpp | 24 +- .../game/Battlegrounds/Zones/BattlegroundIC.cpp | 20 +- .../game/Battlegrounds/Zones/BattlegroundNA.cpp | 6 +- .../game/Battlegrounds/Zones/BattlegroundRL.cpp | 6 +- .../game/Battlegrounds/Zones/BattlegroundRV.cpp | 6 +- .../game/Battlegrounds/Zones/BattlegroundSA.cpp | 6 +- .../game/Battlegrounds/Zones/BattlegroundWS.cpp | 14 +- src/server/game/Calendar/CalendarMgr.cpp | 18 +- src/server/game/Chat/Channels/Channel.cpp | 6 +- src/server/game/Chat/Channels/ChannelMgr.h | 1 - src/server/game/Chat/Chat.cpp | 8 +- src/server/game/Combat/HostileRefManager.h | 1 - src/server/game/Combat/ThreatManager.cpp | 1 - src/server/game/Combat/UnitEvents.h | 2 - src/server/game/Conditions/ConditionMgr.cpp | 294 ++--- src/server/game/Conditions/DisableMgr.cpp | 62 +- src/server/game/DataStores/DBCStores.cpp | 14 +- src/server/game/DungeonFinding/LFGMgr.cpp | 28 +- src/server/game/Entities/Corpse/Corpse.cpp | 6 +- src/server/game/Entities/Creature/Creature.cpp | 44 +- .../game/Entities/Creature/CreatureGroups.cpp | 12 +- src/server/game/Entities/Creature/GossipDef.cpp | 2 +- .../game/Entities/Creature/TemporarySummon.cpp | 4 +- .../game/Entities/DynamicObject/DynamicObject.cpp | 2 +- src/server/game/Entities/GameObject/GameObject.cpp | 22 +- src/server/game/Entities/Item/Container/Bag.cpp | 2 +- src/server/game/Entities/Item/Item.cpp | 12 +- .../game/Entities/Item/ItemEnchantmentMgr.cpp | 10 +- src/server/game/Entities/Object/Object.cpp | 64 +- .../game/Entities/Object/Updates/UpdateData.cpp | 10 +- src/server/game/Entities/Pet/Pet.cpp | 22 +- src/server/game/Entities/Player/Player.cpp | 266 ++-- src/server/game/Entities/Transport/Transport.cpp | 46 +- src/server/game/Entities/Unit/Unit.cpp | 217 +-- src/server/game/Events/GameEventMgr.cpp | 236 ++-- src/server/game/Globals/ObjectAccessor.cpp | 2 +- src/server/game/Globals/ObjectAccessor.h | 4 +- src/server/game/Globals/ObjectMgr.cpp | 1394 ++++++++++---------- src/server/game/Globals/ObjectMgr.h | 8 +- src/server/game/Grids/GridStates.h | 2 +- src/server/game/Grids/ObjectGridLoader.cpp | 2 +- src/server/game/Groups/Group.cpp | 4 +- src/server/game/Groups/GroupMgr.cpp | 38 +- src/server/game/Guilds/Guild.cpp | 49 +- src/server/game/Guilds/GuildMgr.cpp | 88 +- src/server/game/Handlers/AddonHandler.cpp | 2 +- src/server/game/Handlers/AuctionHouseHandler.cpp | 12 +- src/server/game/Handlers/BattleGroundHandler.cpp | 16 +- src/server/game/Handlers/CalendarHandler.cpp | 8 +- src/server/game/Handlers/CharacterHandler.cpp | 54 +- src/server/game/Handlers/ChatHandler.cpp | 6 +- src/server/game/Handlers/CombatHandler.cpp | 2 +- src/server/game/Handlers/DuelHandler.cpp | 4 +- src/server/game/Handlers/GroupHandler.cpp | 8 +- src/server/game/Handlers/ItemHandler.cpp | 14 +- src/server/game/Handlers/MailHandler.cpp | 6 +- src/server/game/Handlers/MiscHandler.cpp | 36 +- src/server/game/Handlers/MovementHandler.cpp | 18 +- src/server/game/Handlers/PetHandler.cpp | 46 +- src/server/game/Handlers/PetitionsHandler.cpp | 4 +- src/server/game/Handlers/QueryHandler.cpp | 2 +- src/server/game/Handlers/QuestHandler.cpp | 14 +- src/server/game/Handlers/SpellHandler.cpp | 16 +- src/server/game/Handlers/TradeHandler.cpp | 12 +- src/server/game/Handlers/VehicleHandler.cpp | 20 +- src/server/game/Instances/InstanceSaveMgr.cpp | 16 +- src/server/game/Instances/InstanceScript.cpp | 10 +- src/server/game/Instances/InstanceScript.h | 11 +- src/server/game/Loot/LootMgr.cpp | 124 +- src/server/game/Mails/Mail.cpp | 2 +- src/server/game/Maps/Map.cpp | 92 +- src/server/game/Maps/MapInstanced.cpp | 4 +- src/server/game/Maps/MapManager.cpp | 4 +- src/server/game/Miscellaneous/Formulas.h | 2 +- src/server/game/Movement/MotionMaster.cpp | 64 +- .../WaypointMovementGenerator.cpp | 6 +- src/server/game/Movement/Spline/MoveSpline.cpp | 6 +- .../game/Movement/Waypoints/WaypointManager.cpp | 8 +- src/server/game/OutdoorPvP/OutdoorPvP.cpp | 4 +- src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp | 16 +- src/server/game/Pools/PoolMgr.cpp | 85 +- src/server/game/Reputation/ReputationMgr.cpp | 4 +- src/server/game/Scripting/MapScripts.cpp | 102 +- src/server/game/Scripting/ScriptMgr.cpp | 34 +- src/server/game/Scripting/ScriptMgr.h | 2 +- src/server/game/Scripting/ScriptSystem.cpp | 58 +- src/server/game/Server/Protocol/PacketLog.cpp | 62 - src/server/game/Server/Protocol/PacketLog.h | 50 - src/server/game/Server/WorldSession.cpp | 63 +- src/server/game/Server/WorldSocket.cpp | 126 +- src/server/game/Server/WorldSocketAcceptor.h | 4 +- src/server/game/Server/WorldSocketMgr.cpp | 18 +- src/server/game/Skills/SkillDiscovery.cpp | 20 +- src/server/game/Skills/SkillExtraItems.cpp | 16 +- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 28 +- src/server/game/Spells/Auras/SpellAuras.cpp | 10 +- src/server/game/Spells/Spell.cpp | 44 +- src/server/game/Spells/SpellEffects.cpp | 50 +- src/server/game/Spells/SpellInfo.cpp | 6 +- src/server/game/Spells/SpellMgr.cpp | 290 ++-- src/server/game/Spells/SpellScript.cpp | 82 +- src/server/game/Texts/CreatureTextMgr.cpp | 26 +- src/server/game/Tickets/TicketMgr.cpp | 12 +- src/server/game/Tools/CharacterDatabaseCleaner.cpp | 8 +- src/server/game/Tools/PlayerDump.cpp | 8 +- src/server/game/Warden/Warden.cpp | 2 +- src/server/game/Warden/WardenCheckMgr.cpp | 28 +- src/server/game/Warden/WardenMac.cpp | 2 +- src/server/game/Warden/WardenWin.cpp | 8 +- src/server/game/Weather/Weather.cpp | 6 +- src/server/game/Weather/WeatherMgr.cpp | 14 +- src/server/game/World/World.cpp | 486 ++++--- src/server/scripts/Commands/cs_account.cpp | 22 +- src/server/scripts/Commands/cs_debug.cpp | 4 +- src/server/scripts/Commands/cs_gobject.cpp | 2 +- src/server/scripts/Commands/cs_misc.cpp | 6 +- src/server/scripts/Commands/cs_modify.cpp | 6 +- src/server/scripts/Commands/cs_npc.cpp | 8 +- src/server/scripts/Commands/cs_reload.cpp | 192 +-- src/server/scripts/Commands/cs_reset.cpp | 2 +- src/server/scripts/Commands/cs_server.cpp | 37 +- .../BlackrockDepths/blackrock_depths.cpp | 2 +- .../BlackrockDepths/instance_blackrock_depths.cpp | 4 +- .../BlackwingLair/boss_victor_nefarius.cpp | 2 +- .../EasternKingdoms/Karazhan/bosses_opera.cpp | 6 +- .../scripts/EasternKingdoms/Karazhan/karazhan.cpp | 8 +- .../scripts/EasternKingdoms/Karazhan/karazhan.h | 2 +- .../MagistersTerrace/boss_selin_fireheart.cpp | 8 +- .../instance_magisters_terrace.cpp | 2 +- .../EasternKingdoms/ScarletEnclave/chapter1.cpp | 10 +- .../Stratholme/instance_stratholme.cpp | 14 +- .../SunwellPlateau/boss_brutallus.cpp | 2 +- .../SunwellPlateau/boss_kalecgos.cpp | 2 +- .../SunwellPlateau/boss_kiljaeden.cpp | 2 +- .../SunwellPlateau/instance_sunwell_plateau.cpp | 2 +- .../EasternKingdoms/ZulAman/boss_janalai.cpp | 4 +- .../EasternKingdoms/ZulAman/instance_zulaman.cpp | 8 +- .../EasternKingdoms/ZulGurub/boss_arlokk.cpp | 2 +- .../scripts/EasternKingdoms/silverpine_forest.cpp | 2 +- src/server/scripts/Examples/example_spell.cpp | 46 +- .../CavernsOfTime/BattleForMountHyjal/hyjal.cpp | 4 +- .../CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp | 8 +- .../BattleForMountHyjal/instance_hyjal.cpp | 2 +- .../CavernsOfTime/DarkPortal/dark_portal.cpp | 4 +- .../DarkPortal/instance_dark_portal.cpp | 10 +- .../instance_old_hillsbrad.cpp | 20 +- .../RazorfenKraul/instance_razorfen_kraul.cpp | 2 +- .../Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 4 +- src/server/scripts/Kalimdor/azuremyst_isle.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 2 +- .../scripts/Northrend/Naxxramas/boss_gothik.cpp | 2 +- .../UtgardeKeep/instance_utgarde_keep.cpp | 2 +- .../ShadowLabyrinth/instance_shadow_labyrinth.cpp | 8 +- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 2 +- .../Outland/BlackTemple/boss_shade_of_akama.cpp | 16 +- .../Outland/BlackTemple/illidari_council.cpp | 6 +- .../Outland/BlackTemple/instance_black_temple.cpp | 2 +- .../SteamVault/instance_steam_vault.cpp | 4 +- .../instance_hellfire_ramparts.cpp | 2 +- .../Outland/TempestKeep/Eye/boss_kaelthas.cpp | 4 +- src/server/scripts/Outland/hellfire_peninsula.cpp | 2 +- src/server/scripts/Outland/netherstorm.cpp | 2 +- src/server/scripts/Spells/spell_rogue.cpp | 2 +- src/server/scripts/Spells/spell_warlock.cpp | 2 +- src/server/scripts/World/chat_log.cpp | 42 +- src/server/scripts/World/go_scripts.cpp | 2 +- src/server/scripts/World/npc_professions.cpp | 2 +- src/server/scripts/World/npcs_special.cpp | 8 +- src/server/shared/Configuration/Config.cpp | 8 +- src/server/shared/Configuration/Config.h | 1 - .../shared/Cryptography/Authentication/AuthCrypt.h | 1 - src/server/shared/DataStores/DBCStore.h | 10 +- src/server/shared/Database/DatabaseWorkerPool.h | 16 +- src/server/shared/Database/Field.h | 24 +- src/server/shared/Database/MySQLConnection.cpp | 108 +- src/server/shared/Database/MySQLThreading.h | 4 +- src/server/shared/Database/PreparedStatement.cpp | 4 +- src/server/shared/Database/QueryHolder.cpp | 8 +- src/server/shared/Database/QueryResult.cpp | 4 +- src/server/shared/Debugging/Errors.h | 8 +- src/server/shared/Logging/Appender.cpp | 153 +++ src/server/shared/Logging/Appender.h | 115 ++ src/server/shared/Logging/AppenderConsole.cpp | 174 +++ src/server/shared/Logging/AppenderConsole.h | 42 + src/server/shared/Logging/AppenderDB.cpp | 30 + src/server/shared/Logging/AppenderDB.h | 19 + src/server/shared/Logging/AppenderFile.cpp | 54 + src/server/shared/Logging/AppenderFile.h | 22 + src/server/shared/Logging/Log.cpp | 1135 ++++------------ src/server/shared/Logging/Log.h | 209 +-- src/server/shared/Logging/LogOperation.cpp | 14 + src/server/shared/Logging/LogOperation.h | 24 + src/server/shared/Logging/LogWorker.cpp | 33 + src/server/shared/Logging/LogWorker.h | 30 + src/server/shared/Logging/Logger.cpp | 67 + src/server/shared/Logging/Logger.h | 29 + src/server/shared/Packets/ByteBuffer.h | 80 +- src/server/shared/Utilities/ServiceWin32.cpp | 2 +- src/server/worldserver/CommandLine/CliRunnable.cpp | 2 +- src/server/worldserver/Main.cpp | 22 +- src/server/worldserver/Master.cpp | 86 +- src/server/worldserver/RemoteAccess/RARunnable.cpp | 6 +- src/server/worldserver/RemoteAccess/RASocket.cpp | 30 +- src/server/worldserver/TCSoap/TCSoap.cpp | 6 +- src/server/worldserver/worldserver.conf.dist | 478 +++---- 245 files changed, 5127 insertions(+), 5408 deletions(-) delete mode 100644 src/server/game/Server/Protocol/PacketLog.cpp delete mode 100644 src/server/game/Server/Protocol/PacketLog.h create mode 100644 src/server/shared/Logging/Appender.cpp create mode 100644 src/server/shared/Logging/Appender.h create mode 100644 src/server/shared/Logging/AppenderConsole.cpp create mode 100644 src/server/shared/Logging/AppenderConsole.h create mode 100644 src/server/shared/Logging/AppenderDB.cpp create mode 100644 src/server/shared/Logging/AppenderDB.h create mode 100644 src/server/shared/Logging/AppenderFile.cpp create mode 100644 src/server/shared/Logging/AppenderFile.h create mode 100644 src/server/shared/Logging/LogOperation.cpp create mode 100644 src/server/shared/Logging/LogOperation.h create mode 100644 src/server/shared/Logging/LogWorker.cpp create mode 100644 src/server/shared/Logging/LogWorker.h create mode 100644 src/server/shared/Logging/Logger.cpp create mode 100644 src/server/shared/Logging/Logger.h (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 01a33d836d6..b2828b3ffac 100755 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -63,7 +63,7 @@ public: /// Print out the usage string for this program on the console. void usage(const char *prog) { - sLog->outString("Usage: \n %s []\n" + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Usage: \n %s []\n" " -c config_file use config_file as configuration file\n\r", prog); } @@ -71,7 +71,6 @@ void usage(const char *prog) // Launch the auth server extern int main(int argc, char **argv) { - sLog->SetLogDB(false); // Command line parsing to get the configuration file name char const* cfg_file = _TRINITY_REALM_CONFIG; int c = 1; @@ -81,7 +80,7 @@ extern int main(int argc, char **argv) { if (++c >= argc) { - sLog->outError("Runtime-Error: -c option requires an input argument"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Runtime-Error: -c option requires an input argument"); usage(argv[0]); return 1; } @@ -93,17 +92,16 @@ extern int main(int argc, char **argv) if (!ConfigMgr::Load(cfg_file)) { - sLog->outError("Invalid or missing configuration file : %s", cfg_file); - sLog->outError("Verify that the file exists and has \'[authserver]\' written in the top of the file!"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Invalid or missing configuration file : %s", cfg_file); + sLog->outError(LOG_FILTER_AUTHSERVER, "Verify that the file exists and has \'[authserver]\' written in the top of the file!"); return 1; } - sLog->Initialize(); - sLog->outString("%s (authserver)", _FULLVERSION); - sLog->outString(" to stop.\n"); - sLog->outString("Using configuration file %s.", cfg_file); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "%s (authserver)", _FULLVERSION); + sLog->outInfo(LOG_FILTER_AUTHSERVER, " to stop.\n"); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Using configuration file %s.", cfg_file); - sLog->outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + sLog->outWarn(LOG_FILTER_AUTHSERVER, "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); #if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL) ACE_Reactor::instance(new ACE_Reactor(new ACE_Dev_Poll_Reactor(ACE::max_handles(), 1), 1), true); @@ -111,7 +109,7 @@ extern int main(int argc, char **argv) ACE_Reactor::instance(new ACE_Reactor(new ACE_TP_Reactor(), true), true); #endif - sLog->outBasic("Max allowed open files is %d", ACE::max_handles()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Max allowed open files is %d", ACE::max_handles()); // authserver PID file creation std::string pidfile = ConfigMgr::GetStringDefault("PidFile", ""); @@ -120,27 +118,23 @@ extern int main(int argc, char **argv) uint32 pid = CreatePIDFile(pidfile); if (!pid) { - sLog->outError("Cannot create PID file %s.\n", pidfile.c_str()); + sLog->outError(LOG_FILTER_AUTHSERVER, "Cannot create PID file %s.\n", pidfile.c_str()); return 1; } - - sLog->outString("Daemon PID: %u\n", pid); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Daemon PID: %u\n", pid); } // Initialize the database connection if (!StartDB()) return 1; - // Initialize the log database - sLog->SetLogDBLater(ConfigMgr::GetBoolDefault("EnableLogDB", false)); // set var to enable DB logging once startup finished. - sLog->SetLogDB(false); sLog->SetRealmID(0); // ensure we've set realm to 0 (authserver realmid) // Get the list of realms for the server sRealmList->Initialize(ConfigMgr::GetIntDefault("RealmsStateUpdateDelay", 20)); if (sRealmList->size() == 0) { - sLog->outError("No valid realms specified."); + sLog->outError(LOG_FILTER_AUTHSERVER, "No valid realms specified."); return 1; } @@ -154,7 +148,7 @@ extern int main(int argc, char **argv) if (acceptor.open(bind_addr, ACE_Reactor::instance(), ACE_NONBLOCK) == -1) { - sLog->outError("Auth server can not bind to %s:%d", bind_ip.c_str(), rmport); + sLog->outError(LOG_FILTER_AUTHSERVER, "Auth server can not bind to %s:%d", bind_ip.c_str(), rmport); return 1; } @@ -182,13 +176,13 @@ extern int main(int argc, char **argv) ULONG_PTR curAff = Aff & appAff; // remove non accessible processors if (!curAff) - sLog->outError("Processors marked in UseProcessors bitmask (hex) %x not accessible for authserver. Accessible processors bitmask (hex): %x", Aff, appAff); + sLog->outError(LOG_FILTER_AUTHSERVER, "Processors marked in UseProcessors bitmask (hex) %x not accessible for authserver. Accessible processors bitmask (hex): %x", Aff, appAff); else if (SetProcessAffinityMask(hProcess, curAff)) - sLog->outString("Using processors (bitmask, hex): %x", curAff); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Using processors (bitmask, hex): %x", curAff); else - sLog->outError("Can't set used processors (hex): %x", curAff); + sLog->outError(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x", curAff); } - sLog->outString(); + } bool Prio = ConfigMgr::GetBoolDefault("ProcessPriority", false); @@ -196,10 +190,10 @@ extern int main(int argc, char **argv) if (Prio) { if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS)) - sLog->outString("The auth server process priority class has been set to HIGH"); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "The auth server process priority class has been set to HIGH"); else - sLog->outError("Can't set auth server process priority class."); - sLog->outString(); + sLog->outError(LOG_FILTER_AUTHSERVER, "Can't set auth server process priority class."); + } } #endif @@ -208,17 +202,6 @@ extern int main(int argc, char **argv) uint32 numLoops = (ConfigMgr::GetIntDefault("MaxPingTime", 30) * (MINUTE * 1000000 / 100000)); uint32 loopCounter = 0; - // possibly enable db logging; avoid massive startup spam by doing it here. - if (sLog->GetLogDBLater()) - { - sLog->outString("Enabling database logging..."); - sLog->SetLogDBLater(false); - // login db needs thread for logging - sLog->SetLogDB(true); - } - else - sLog->SetLogDB(false); - // Wait for termination signal while (!stopEvent) { @@ -231,7 +214,7 @@ extern int main(int argc, char **argv) if ((++loopCounter) == numLoops) { loopCounter = 0; - sLog->outDetail("Ping MySQL to keep connection alive"); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Ping MySQL to keep connection alive"); LoginDatabase.KeepAlive(); } } @@ -239,7 +222,7 @@ extern int main(int argc, char **argv) // Close the Database Pool and library StopDB(); - sLog->outString("Halting process..."); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Halting process..."); return 0; } @@ -251,31 +234,33 @@ bool StartDB() std::string dbstring = ConfigMgr::GetStringDefault("LoginDatabaseInfo", ""); if (dbstring.empty()) { - sLog->outError("Database not specified"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Database not specified"); return false; } uint8 worker_threads = ConfigMgr::GetIntDefault("LoginDatabase.WorkerThreads", 1); if (worker_threads < 1 || worker_threads > 32) { - sLog->outError("Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1."); + sLog->outError(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1."); worker_threads = 1; } uint8 synch_threads = ConfigMgr::GetIntDefault("LoginDatabase.SynchThreads", 1); if (synch_threads < 1 || synch_threads > 32) { - sLog->outError("Improper value specified for LoginDatabase.SynchThreads, defaulting to 1."); + sLog->outError(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1."); synch_threads = 1; } // NOTE: While authserver is singlethreaded you should keep synch_threads == 1. Increasing it is just silly since only 1 will be used ever. if (!LoginDatabase.Open(dbstring.c_str(), worker_threads, synch_threads)) { - sLog->outError("Cannot connect to database"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Cannot connect to database"); return false; } + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Started auth database connection pool."); + sLog->EnableDBAppenders(); return true; } diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp index d988b940809..453efd5bf72 100755 --- a/src/server/authserver/Realms/RealmList.cpp +++ b/src/server/authserver/Realms/RealmList.cpp @@ -68,7 +68,7 @@ void RealmList::UpdateIfNeed() void RealmList::UpdateRealms(bool init) { - sLog->outDetail("Updating Realm List..."); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Updating Realm List..."); PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST); PreparedQueryResult result = LoginDatabase.Query(stmt); @@ -93,7 +93,7 @@ void RealmList::UpdateRealms(bool init) UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build); if (init) - sLog->outString("Added realm \"%s\".", fields[1].GetCString()); + sLog->outInfo(LOG_FILTER_AUTHSERVER, "Added realm \"%s\".", fields[1].GetCString()); } while (result->NextRow()); } diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 15555e4d607..0794d9a802a 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -210,12 +210,12 @@ AuthSocket::~AuthSocket(void) {} // Accept the connection and set the s random value for SRP6 void AuthSocket::OnAccept(void) { - sLog->outBasic("'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort()); } void AuthSocket::OnClose(void) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "AuthSocket::OnClose"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "AuthSocket::OnClose"); } // Read the packet from the client @@ -234,11 +234,11 @@ void AuthSocket::OnRead() { if ((uint8)table[i].cmd == _cmd && (table[i].status == STATUS_CONNECTED || (_authed && table[i].status == STATUS_AUTHED))) { - sLog->outStaticDebug("[Auth] got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len()); if (!(*this.*table[i].handler)()) { - sLog->outStaticDebug("Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len()); return; } break; @@ -248,7 +248,7 @@ void AuthSocket::OnRead() // Report unknown packets in the error log if (i == AUTH_TOTAL_COMMANDS) { - sLog->outError("[Auth] got unknown packet from '%s'", socket().getRemoteAddress().c_str()); + sLog->outError(LOG_FILTER_AUTHSERVER, "Got unknown packet from '%s'", socket().getRemoteAddress().c_str()); socket().shutdown(); return; } @@ -297,7 +297,7 @@ void AuthSocket::_SetVSFields(const std::string& rI) // Logon Challenge command handler bool AuthSocket::_HandleLogonChallenge() { - sLog->outStaticDebug("Entering _HandleLogonChallenge"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleLogonChallenge"); if (socket().recv_len() < sizeof(sAuthLogonChallenge_C)) return false; @@ -312,7 +312,7 @@ bool AuthSocket::_HandleLogonChallenge() #endif uint16 remaining = ((sAuthLogonChallenge_C *)&buf[0])->size; - sLog->outStaticDebug("[AuthChallenge] got header, body is %#04x bytes", remaining); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] got header, body is %#04x bytes", remaining); if ((remaining < sizeof(sAuthLogonChallenge_C) - buf.size()) || (socket().recv_len() < remaining)) return false; @@ -324,8 +324,8 @@ bool AuthSocket::_HandleLogonChallenge() // Read the remaining of the packet socket().recv((char *)&buf[4], remaining); - sLog->outStaticDebug("[AuthChallenge] got full packet, %#04x bytes", ch->size); - sLog->outStaticDebug("[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] got full packet, %#04x bytes", ch->size); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I); // BigEndian code, nop in little endian case // size already converted @@ -365,7 +365,7 @@ bool AuthSocket::_HandleLogonChallenge() if (result) { pkt << (uint8)WOW_FAIL_BANNED; - sLog->outBasic("'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort()); } else { @@ -383,20 +383,20 @@ bool AuthSocket::_HandleLogonChallenge() bool locked = false; if (fields[2].GetUInt8() == 1) // if ip is locked { - sLog->outStaticDebug("[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[3].GetCString()); - sLog->outStaticDebug("[AuthChallenge] Player address is '%s'", ip_address.c_str()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[3].GetCString()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Player address is '%s'", ip_address.c_str()); if (strcmp(fields[3].GetCString(), ip_address.c_str())) { - sLog->outStaticDebug("[AuthChallenge] Account IP differs"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account IP differs"); pkt << (uint8) WOW_FAIL_SUSPENDED; locked = true; } else - sLog->outStaticDebug("[AuthChallenge] Account IP matches"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account IP matches"); } else - sLog->outStaticDebug("[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); if (!locked) { @@ -412,12 +412,12 @@ bool AuthSocket::_HandleLogonChallenge() if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64()) { pkt << (uint8)WOW_FAIL_BANNED; - sLog->outBasic("'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); } else { pkt << (uint8)WOW_FAIL_SUSPENDED; - sLog->outBasic("'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); } } else @@ -488,7 +488,7 @@ bool AuthSocket::_HandleLogonChallenge() for (int i = 0; i < 4; ++i) _localizationName[i] = ch->country[4-i-1]; - sLog->outBasic("'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(), + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName) ); } @@ -505,7 +505,7 @@ bool AuthSocket::_HandleLogonChallenge() // Logon Proof command handler bool AuthSocket::_HandleLogonProof() { - sLog->outStaticDebug("Entering _HandleLogonProof"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleLogonProof"); // Read the packet sAuthLogonProof_C lp; @@ -600,7 +600,7 @@ bool AuthSocket::_HandleLogonProof() // Check if SRP6 results match (password is correct), else send an error if (!memcmp(M.AsByteArray(), lp.M1, 20)) { - sLog->outBasic("'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); // Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account // No SQL injection (escaped user name) and IP address as received by socket @@ -649,7 +649,7 @@ bool AuthSocket::_HandleLogonProof() char data[4] = { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0 }; socket().send(data, sizeof(data)); - sLog->outBasic("'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ()); uint32 MaxWrongPassCount = ConfigMgr::GetIntDefault("WrongPass.MaxCount", 0); if (MaxWrongPassCount > 0) @@ -679,7 +679,7 @@ bool AuthSocket::_HandleLogonProof() stmt->setUInt32(1, WrongPassBanTime); LoginDatabase.Execute(stmt); - sLog->outBasic("'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins); } else @@ -689,7 +689,7 @@ bool AuthSocket::_HandleLogonProof() stmt->setUInt32(1, WrongPassBanTime); LoginDatabase.Execute(stmt); - sLog->outBasic("'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times", + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times", socket().getRemoteAddress().c_str(), socket().getRemotePort(), socket().getRemoteAddress().c_str(), WrongPassBanTime, _login.c_str(), failed_logins); } } @@ -703,7 +703,7 @@ bool AuthSocket::_HandleLogonProof() // Reconnect Challenge command handler bool AuthSocket::_HandleReconnectChallenge() { - sLog->outStaticDebug("Entering _HandleReconnectChallenge"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectChallenge"); if (socket().recv_len() < sizeof(sAuthLogonChallenge_C)) return false; @@ -718,7 +718,7 @@ bool AuthSocket::_HandleReconnectChallenge() #endif uint16 remaining = ((sAuthLogonChallenge_C *)&buf[0])->size; - sLog->outStaticDebug("[ReconnectChallenge] got header, body is %#04x bytes", remaining); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] got header, body is %#04x bytes", remaining); if ((remaining < sizeof(sAuthLogonChallenge_C) - buf.size()) || (socket().recv_len() < remaining)) return false; @@ -730,8 +730,8 @@ bool AuthSocket::_HandleReconnectChallenge() // Read the remaining of the packet socket().recv((char *)&buf[4], remaining); - sLog->outStaticDebug("[ReconnectChallenge] got full packet, %#04x bytes", ch->size); - sLog->outStaticDebug("[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] got full packet, %#04x bytes", ch->size); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I); _login = (const char*)ch->I; @@ -742,7 +742,7 @@ bool AuthSocket::_HandleReconnectChallenge() // Stop if the account is not found if (!result) { - sLog->outError("'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); + sLog->outError(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); socket().shutdown(); return false; } @@ -778,7 +778,7 @@ bool AuthSocket::_HandleReconnectChallenge() // Reconnect Proof command handler bool AuthSocket::_HandleReconnectProof() { - sLog->outStaticDebug("Entering _HandleReconnectProof"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectProof"); // Read the packet sAuthReconnectProof_C lp; if (!socket().recv((char *)&lp, sizeof(sAuthReconnectProof_C))) @@ -809,7 +809,7 @@ bool AuthSocket::_HandleReconnectProof() } else { - sLog->outError("'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); + sLog->outError(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); socket().shutdown(); return false; } @@ -818,7 +818,7 @@ bool AuthSocket::_HandleReconnectProof() // Realm List command handler bool AuthSocket::_HandleRealmList() { - sLog->outStaticDebug("Entering _HandleRealmList"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleRealmList"); if (socket().recv_len() < 5) return false; @@ -831,7 +831,7 @@ bool AuthSocket::_HandleRealmList() PreparedQueryResult result = LoginDatabase.Query(stmt); if (!result) { - sLog->outError("'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); + sLog->outError(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str()); socket().shutdown(); return false; } @@ -927,11 +927,11 @@ bool AuthSocket::_HandleRealmList() // Resume patch transfer bool AuthSocket::_HandleXferResume() { - sLog->outStaticDebug("Entering _HandleXferResume"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleXferResume"); // Check packet length and patch existence if (socket().recv_len() < 9 || !pPatch) { - sLog->outError("Error while resuming patch transfer (wrong packet)"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Error while resuming patch transfer (wrong packet)"); return false; } @@ -948,7 +948,7 @@ bool AuthSocket::_HandleXferResume() // Cancel patch transfer bool AuthSocket::_HandleXferCancel() { - sLog->outStaticDebug("Entering _HandleXferCancel"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleXferCancel"); // Close and delete the socket socket().recv_skip(1); //clear input buffer @@ -960,12 +960,12 @@ bool AuthSocket::_HandleXferCancel() // Accept patch transfer bool AuthSocket::_HandleXferAccept() { - sLog->outStaticDebug("Entering _HandleXferAccept"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleXferAccept"); // Check packet length and patch existence if (!pPatch) { - sLog->outError("Error while accepting patch transfer (wrong packet)"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Error while accepting patch transfer (wrong packet)"); return false; } @@ -1050,7 +1050,7 @@ void Patcher::LoadPatchMD5(char *szFileName) if (!pPatch) { - sLog->outError("Error loading patch %s\n", path.c_str()); + sLog->outError(LOG_FILTER_AUTHSERVER, "Error loading patch %s\n", path.c_str()); return; } diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h index 32f4f3e4122..b764e4d2494 100755 --- a/src/server/authserver/Server/RealmAcceptor.h +++ b/src/server/authserver/Server/RealmAcceptor.h @@ -48,7 +48,7 @@ protected: virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/) { - sLog->outBasic("Resuming acceptor"); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "Resuming acceptor"); reactor()->cancel_timer(this, 1); return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK); } @@ -58,7 +58,7 @@ protected: #if defined(ENFILE) && defined(EMFILE) if (errno == ENFILE || errno == EMFILE) { - sLog->outError("Out of file descriptors, suspending incoming connections for 10 seconds"); + sLog->outError(LOG_FILTER_AUTHSERVER, "Out of file descriptors, suspending incoming connections for 10 seconds"); reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL); reactor()->schedule_timer(this, NULL, ACE_Time_Value(10)); } diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp index e839457d1c9..c868bb43777 100755 --- a/src/server/authserver/Server/RealmSocket.cpp +++ b/src/server/authserver/Server/RealmSocket.cpp @@ -59,7 +59,7 @@ int RealmSocket::open(void * arg) if (peer().get_remote_addr(addr) == -1) { - sLog->outError("Error %s while opening realm socket!", ACE_OS::strerror(errno)); + sLog->outError(LOG_FILTER_AUTHSERVER, "Error %s while opening realm socket!", ACE_OS::strerror(errno)); return -1; } diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist index e9ed4bd752d..875d952b14c 100644 --- a/src/server/authserver/authserver.conf.dist +++ b/src/server/authserver/authserver.conf.dist @@ -69,114 +69,124 @@ BindIP = "0.0.0.0" PidFile = "" # -# LogLevel -# Description: Server console level of logging -# Default: 0 - (Minimum) -# 1 - (Basic) -# 2 - (Detail) -# 3 - (Full/Debug) - -LogLevel = 0 - -# -# LogFile -# Description: Log file for main server log. -# Default: "Auth.log" - (Enabled) -# "" - (Disabled) - -LogFile = "Auth.log" - -# -# Debug Log Mask -# Description: Bitmask that determines which debug log output (level 3) -# will be logged. -# Possible flags: -# -# 64 - Anything related to network input/output, -# such as packet handlers and netcode logs -# -# Simply add the values together to create a bitmask. -# For more info see enum DebugLogFilters in Log.h -# -# Default: 0 (nothing) - -DebugLogMask = 64 - -# -# SQLDriverLogFile -# Description: Log file for SQL driver events. -# Example: "SQLDriver.log" - (Enabled) -# Default: "" - (Disabled) - -SQLDriverLogFile = "" - -# -# SQLDriverQueryLogging -# Description: Log SQL queries to the SQLDriverLogFile and console. -# Default: 0 - (Disabled, Query errors only) -# 1 - (Enabled, Full query logging - may have performance impact) - -SQLDriverQueryLogging = 0 - -# -# LogTimestamp -# Description: Append timestamp to the server log file name. -# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext +# Appender config values: Given a appender "name" the following options +# can be read: +# +# Appender.name.Type +# Description: Type of appender. Extra appender config options +# will be read depending on this value +# Default: 0 - (None) +# 1 - (Console) +# 2 - (File) +# 3 - (DB) +# +# Appender.name.Level +# Description: Appender level of logging # Default: 0 - (Disabled) -# 1 - (Enabled) - -LogTimestamp = 0 - -# -# LogFileLevel -# Description: Server file level of logging -# Default: 0 - (Minimum) -# 1 - (Basic) -# 2 - (Detail) -# 3 - (Full/Debug) - -LogFileLevel = 0 - -# -# LogColors -# Description: Colors for log messages (Format: "normal basic detail debug"). -# Colors: 0 - Black -# 1 - Red -# 2 - Green -# 3 - Brown -# 4 - Blue -# 5 - Magenta -# 6 - Cyan -# 7 - Grey -# 8 - Yellow -# 9 - Lred -# 10 - Lgreen -# 11 - Lblue -# 12 - Lmagenta -# 13 - Lcyan -# 14 - White -# Example: "13 11 9 5" - (Enabled) -# Default: "" - (Disabled) - -LogColors = "" - -# -# EnableLogDB -# Description: Write log messages to database (LogDatabaseInfo). +# 1 - (Trace) +# 2 - (Debug) +# 3 - (Info) +# 4 - (Warn) +# 5 - (Error) +# 6 - (Fatal) +# +# Appender.name.Colors +# Description: Colors for log messages +# (Format: "fatal error warn info debug trace"). +# (Only used with Type = 1) +# Default: "" - no colors +# Colors: 0 - BLACK +# 1 - RED +# 2 - GREEN +# 3 - BROWN +# 4 - BLUE +# 5 - MAGENTA +# 6 - CYAN +# 7 - GREY +# 8 - YELLOW +# 9 - LRED +# 10 - LGREEN +# 11 - LBLUE +# 12 - LMAGENTA +# 13 - LCYAN +# 14 - WHITE +# Example: "13 11 9 5 3 1" +# +# Appender.name.File +# Description: Name of the file +# Allows to use one "%u" to create dynamic files +# (Only used with Type = 2) +# +# Appender.name.Mode +# Description: Mode to open the file +# (Only used with Type = 2) +# Default: a - (Append) +# w - (Overwrite) +# +# Appender.name.Backup +# Description: Make a backup of existing file before overwrite +# (Only used with Mode = w) +# Default: 0 - false +# 1 - true +# +# Appender.name.Timestamp +# Description: Append timestamp to the log file name. +# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext +# (Only used with Type = 2) +# +# Logger config values: Given a logger "name" the following options +# can be read: +# +# Logger.name.Type +# Description: Type of logger. Logs anything related to... +# If no logger with type = 0 exists core will create +# it but disabled. Logger with type = 0 is the +# default one, used when there is no other specific +# logger configured for other logger types +# Default: 0 - Default. Each type that has no config will +# rely on this one. Core will create this logger +# (disabled) if it's not configured +# 7 - Network input/output, +# 30 - Authserver +# +# Logger.name.Level +# Description: Logger level of logging # Default: 0 - (Disabled) -# 1 - (Enabled) - -EnableLogDB = 0 - -# -# DBLogLevel -# Description: Log level of databases logging. -# Default: 1 - (Basic) -# 0 - (Minimum) -# 2 - (Detail) -# 3 - (Full/Debug) - -DBLogLevel = 1 +# 1 - (Trace) +# 2 - (Debug) +# 3 - (Info) +# 4 - (Warn) +# 5 - (Error) +# 6 - (Fatal) +# +# Logger.name.Appenders +# Description: List of appenders linked to logger +# (Using spaces as separator). +# +# Appenders +# Description: List of Appenders to read from config +# (Using spaces as separator). +# Default: "Console Auth" +# +# Loggers +# Description: List of Loggers to read from config +# (Using spaces as separator). +# Default: "root" + +Loggers=root +Appenders=Console Auth + +Appender.Console.Type=1 +Appender.Console.Level=2 + +Appender.Auth.Type=2 +Appender.Auth.Level=2 +Appender.Auth.File=Auth.log +Appender.Auth.Mode=w + +Logger.root.Type=0 +Logger.root.Level=3 +Logger.root.Appenders=Console Auth # # UseProcessors diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index b9f0f25c2f9..81328d31d7b 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -257,7 +257,7 @@ namespace VMAP WorldModel* worldmodel = new WorldModel(); if (!worldmodel->readFile(basepath + filename + ".vmo")) { - sLog->outError("VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str()); delete worldmodel; return NULL; } @@ -277,7 +277,7 @@ namespace VMAP ModelFileMap::iterator model = iLoadedModelFiles.find(filename); if (model == iLoadedModelFiles.end()) { - sLog->outError("VMapManager2: trying to unload non-loaded file '%s'", filename.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str()); return; } if (model->second.decRefCount() == 0) diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index f4a3f1c7b30..6489ddd7a4f 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -320,7 +320,7 @@ namespace VMAP else { success = false; - sLog->outError("StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str()); } } @@ -356,7 +356,7 @@ namespace VMAP } if (!iTreeValues) { - sLog->outError("StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY); + sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY); return false; } bool result = true; @@ -382,7 +382,7 @@ namespace VMAP // acquire model instance WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name); if (!model) - sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY); + sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY); // update tree uint32 referencedVal; @@ -432,7 +432,7 @@ namespace VMAP loadedTileMap::iterator tile = iLoadedTiles.find(tileID); if (tile == iLoadedTiles.end()) { - sLog->outError("StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY); + sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY); return; } if (tile->second) // file associated with tile @@ -466,7 +466,7 @@ namespace VMAP else { if (!iLoadedSpawns.count(referencedNode)) - sLog->outError("StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID); + sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID); else if (--iLoadedSpawns[referencedNode] == 0) { iTreeValues[referencedNode].setUnloaded(); diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 8b63620e783..63c42e25035 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -53,7 +53,7 @@ void LoadGameObjectModelList() FILE* model_list_file = fopen((sWorld->GetDataPath() + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb"); if (!model_list_file) { - sLog->outError("Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS); + sLog->outError(LOG_FILTER_GENERAL, "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS); return; } @@ -72,7 +72,7 @@ void LoadGameObjectModelList() || fread(&v1, sizeof(Vector3), 1, model_list_file) != 1 || fread(&v2, sizeof(Vector3), 1, model_list_file) != 1) { - sLog->outError("File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS); + sLog->outError(LOG_FILTER_GENERAL, "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS); break; } @@ -83,8 +83,8 @@ void LoadGameObjectModelList() } fclose(model_list_file); - sLog->outString(">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime)); + } GameObjectModel::~GameObjectModel() @@ -103,7 +103,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn // ignore models with no bounds if (mdl_box == G3D::AABox::zero()) { - sLog->outError("GameObject model %s has zero bounds, loading skipped", it->second.name.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str()); return false; } diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 86f2c6a28b7..7d7a27fce13 100755 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -182,7 +182,7 @@ void CasterAI::UpdateAI(const uint32 diff) ArcherAI::ArcherAI(Creature* c) : CreatureAI(c) { if (!me->m_spells[0]) - sLog->outError("ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry()); SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->m_spells[0]); m_minRange = spellInfo ? spellInfo->GetMinRange(false) : 0; @@ -231,7 +231,7 @@ void ArcherAI::UpdateAI(const uint32 /*diff*/) TurretAI::TurretAI(Creature* c) : CreatureAI(c) { if (!me->m_spells[0]) - sLog->outError("TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry()); SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->m_spells[0]); m_minRange = spellInfo ? spellInfo->GetMinRange(false) : 0; diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h index d7bf8656f23..b4fd579d693 100755 --- a/src/server/game/AI/CoreAI/PassiveAI.h +++ b/src/server/game/AI/CoreAI/PassiveAI.h @@ -20,7 +20,6 @@ #define TRINITY_PASSIVEAI_H #include "CreatureAI.h" -//#include "CreatureAIImpl.h" class PassiveAI : public CreatureAI { diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 97ae0581a18..99cf1cda4fc 100755 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -61,7 +61,7 @@ void PetAI::_stopAttack() { if (!me->isAlive()) { - sLog->outStaticDebug("Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow()); me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); me->CombatStop(); @@ -100,7 +100,7 @@ void PetAI::UpdateAI(const uint32 diff) if (_needToStop()) { - sLog->outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Pet AI stopped attacking [guid=%u]", me->GetGUIDLow()); _stopAttack(); return; } @@ -430,7 +430,6 @@ void PetAI::HandleReturnMovement() } } } - } void PetAI::DoAttack(Unit* target, bool chase) diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index bf50909eeee..e159c1a7d9b 100755 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -130,7 +130,7 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered) void UnitAI::DoCast(uint32 spellId) { Unit* target = NULL; - //sLog->outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target); + //sLog->outError(LOG_FILTER_GENERAL, "aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target); switch (AISpellInfo[spellId].target) { default: diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 9c236cbd039..17cef3ec1a1 100755 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -54,7 +54,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN Map* map = creature->GetMap(); if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated { - sLog->outError("DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0); + sLog->outError(LOG_FILTER_GENERAL, "DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0); return; } @@ -77,7 +77,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim()) { - sLog->outError("DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry()); return; } diff --git a/src/server/game/AI/CreatureAIRegistry.cpp b/src/server/game/AI/CreatureAIRegistry.cpp index e4cb62c56de..e5c689da339 100755 --- a/src/server/game/AI/CreatureAIRegistry.cpp +++ b/src/server/game/AI/CreatureAIRegistry.cpp @@ -30,7 +30,6 @@ #include "CreatureAIFactory.h" #include "SmartAI.h" -//#include "CreatureAIImpl.h" namespace AIRegistry { void Initialize() diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 1a0c6652e74..2d69f1e0243 100755 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -125,7 +125,6 @@ namespace FactorySelector }*/ return (mv_factory == NULL ? NULL : mv_factory->Create(creature)); - } GameObjectAI* SelectGameObjectAI(GameObject* go) diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 835705a0d7c..aa14bc1b56e 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -40,7 +40,7 @@ bool CreatureEventAIHolder::UpdateRepeatTimer(Creature* creature, uint32 repeatM Time = urand(repeatMin, repeatMax); else { - sLog->outErrorDb("CreatureEventAI: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", creature->GetEntry(), Event.event_id, Event.event_type); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", creature->GetEntry(), Event.event_id, Event.event_type); Enabled = false; return false; } @@ -64,7 +64,6 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c) std::vector::const_iterator i; for (i = (*CreatureEvents).second.begin(); i != (*CreatureEvents).second.end(); ++i) { - //Debug check #ifndef TRINITY_DEBUG if ((*i).event_flags & EFLAG_DEBUG_ONLY) @@ -83,10 +82,10 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c) } //EventMap had events but they were not added because they must be for instance if (m_CreatureEventAIList.empty()) - sLog->outError("CreatureEventAI: Creature %u has events but no events added to list because of instance flags.", me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "CreatureEventAI: Creature %u has events but no events added to list because of instance flags.", me->GetEntry()); } else - sLog->outError("CreatureEventAI: EventMap for Creature %u is empty but creature is using CreatureEventAI.", me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "CreatureEventAI: EventMap for Creature %u is empty but creature is using CreatureEventAI.", me->GetEntry()); m_bEmptyList = m_CreatureEventAIList.empty(); m_Phase = 0; @@ -319,7 +318,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& holder, Unit* actionIn break; } default: - sLog->outErrorDb("CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", me->GetEntry(), holder.Event.event_id, holder.Event.event_type); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", me->GetEntry(), holder.Event.event_id, holder.Event.event_type); break; } @@ -492,10 +491,9 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 caster->CastSpell(target, action.cast.spellId, (action.cast.castFlags & CAST_TRIGGERED)); } - } else - sLog->outErrorDb("CreatureEventAI: event %d creature %d attempt to cast spell that doesn't exist %d", eventId, me->GetEntry(), action.cast.spellId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: event %d creature %d attempt to cast spell that doesn't exist %d", eventId, me->GetEntry(), action.cast.spellId); } break; } @@ -511,7 +509,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 creature = me->SummonCreature(action.summon.creatureId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0); if (!creature) - sLog->outErrorDb("CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatureId, eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatureId, eventId, me->GetEntry()); else if (action.summon.target != TARGET_T_SELF && target) creature->AI()->AttackStart(target); break; @@ -607,12 +605,12 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 int32 new_phase = int32(m_Phase)+action.set_inc_phase.step; if (new_phase < 0) { - sLog->outErrorDb("CreatureEventAI: Event %d decrease m_Phase under 0. CreatureEntry = %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d decrease m_Phase under 0. CreatureEntry = %d", eventId, me->GetEntry()); m_Phase = 0; } else if (new_phase >= MAX_PHASE) { - sLog->outErrorDb("CreatureEventAI: Event %d incremented m_Phase above %u. m_Phase mask cannot be used with phases past %u. CreatureEntry = %d", eventId, MAX_PHASE-1, MAX_PHASE-1, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d incremented m_Phase above %u. m_Phase mask cannot be used with phases past %u. CreatureEntry = %d", eventId, MAX_PHASE-1, MAX_PHASE-1, me->GetEntry()); m_Phase = MAX_PHASE-1; } else @@ -663,7 +661,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 if (action.random_phase_range.phaseMin <= action.random_phase_range.phaseMax) m_Phase = urand(action.random_phase_range.phaseMin, action.random_phase_range.phaseMax); else - sLog->outErrorDb("CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry()); break; case ACTION_T_SUMMON_ID: { @@ -672,7 +670,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 CreatureEventAI_Summon_Map::const_iterator i = sEventAIMgr->GetCreatureEventAISummonMap().find(action.summon_id.spawnId); if (i == sEventAIMgr->GetCreatureEventAISummonMap().end()) { - sLog->outErrorDb("CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, eventId, me->GetEntry()); return; } @@ -683,7 +681,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 creature = me->SummonCreature(action.summon_id.creatureId, (*i).second.position_x, (*i).second.position_y, (*i).second.position_z, (*i).second.orientation, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0); if (!creature) - sLog->outErrorDb("CreatureEventAI: failed to spawn creature %u. EventId %d.Creature %d", action.summon_id.creatureId, eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. EventId %d.Creature %d", action.summon_id.creatureId, eventId, me->GetEntry()); else if (action.summon_id.target != TARGET_T_SELF && target) creature->AI()->AttackStart(target); @@ -703,10 +701,10 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 break; case ACTION_T_SET_INST_DATA: { - InstanceScript* instance = (InstanceScript*)me->GetInstanceScript(); + InstanceScript* instance = me->GetInstanceScript(); if (!instance) { - sLog->outErrorDb("CreatureEventAI: Event %d attempt to set instance data without instance script. Creature %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data without instance script. Creature %d", eventId, me->GetEntry()); return; } @@ -718,14 +716,14 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 Unit* target = GetTargetByType(action.set_inst_data64.target, actionInvoker); if (!target) { - sLog->outErrorDb("CreatureEventAI: Event %d attempt to set instance data64 but Target == NULL. Creature %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data64 but Target == NULL. Creature %d", eventId, me->GetEntry()); return; } - InstanceScript* instance = (InstanceScript*)me->GetInstanceScript(); + InstanceScript* instance = me->GetInstanceScript(); if (!instance) { - sLog->outErrorDb("CreatureEventAI: Event %d attempt to set instance data64 without instance script. Creature %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data64 without instance script. Creature %d", eventId, me->GetEntry()); return; } @@ -735,8 +733,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 case ACTION_T_UPDATE_TEMPLATE: if (me->GetEntry() == action.update_template.creatureId) { - - sLog->outErrorDb("CreatureEventAI: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", eventId, me->GetEntry()); return; } @@ -745,8 +742,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 case ACTION_T_DIE: if (me->isDead()) { - - sLog->outErrorDb("CreatureEventAI: Event %d ACTION_T_DIE on dead creature. Creature %d", eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d ACTION_T_DIE on dead creature. Creature %d", eventId, me->GetEntry()); return; } me->Kill(me); @@ -798,7 +794,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 object = me->SummonGameObject(action.raw.param1, x, y, z, 0, 0, 0, 0, 0, action.raw.param2); if (!object) { - sLog->outErrorDb("TSCR: EventAI failed to spawn object %u. Spawn event %d is on creature %d", action.raw.param1, eventId, me->GetEntry()); + sLog->outError(LOG_FILTER_TSCR, "EventAI failed to spawn object %u. Spawn event %d is on creature %d", action.raw.param1, eventId, me->GetEntry()); } break; } @@ -843,6 +839,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 break; } + default: + break; } } @@ -1048,7 +1046,6 @@ void CreatureEventAI::MoveInLineOfSight(Unit* who) void CreatureEventAI::SpellHit(Unit* unit, const SpellInfo* spell) { - if (m_bEmptyList) return; @@ -1111,6 +1108,8 @@ void CreatureEventAI::UpdateAI(const uint32 diff) if (me->IsInRange(me->getVictim(), (float)(*i).Event.range.minDist, (float)(*i).Event.range.maxDist)) ProcessEvent(*i); break; + default: + break; } } @@ -1230,13 +1229,13 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t { if (!source) { - sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i, invalid Source pointer.", textEntry); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i, invalid Source pointer.", textEntry); return; } if (textEntry >= 0) { - sLog->outErrorDb("CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry); return; } @@ -1244,7 +1243,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t if (i == sEventAIMgr->GetCreatureEventAITextMap().end()) { - sLog->outErrorDb("CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry); return; } @@ -1255,7 +1254,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t if (sSoundEntriesStore.LookupEntry((*i).second.SoundId)) source->PlayDirectSound((*i).second.SoundId); else - sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId); } if ((*i).second.Emote) @@ -1265,7 +1264,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t ((Unit*)source)->HandleEmoteCommand((*i).second.Emote); } else - sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId()); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId()); } switch ((*i).second.Type) @@ -1286,13 +1285,13 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t { if (target && target->GetTypeId() == TYPEID_PLAYER) source->MonsterWhisper(textEntry, target->GetGUID()); - else sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry); + else sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry); }break; case CHAT_TYPE_BOSS_WHISPER: { if (target && target->GetTypeId() == TYPEID_PLAYER) source->MonsterWhisper(textEntry, target->GetGUID(), true); - else sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry); + else sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry); }break; case CHAT_TYPE_ZONE_YELL: source->MonsterYellToZone(textEntry, (*i).second.Language, target ? target->GetGUID() : 0); diff --git a/src/server/game/AI/EventAI/CreatureEventAI.h b/src/server/game/AI/EventAI/CreatureEventAI.h index 3d2bcf888c8..b9e1ae32be4 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.h +++ b/src/server/game/AI/EventAI/CreatureEventAI.h @@ -589,7 +589,6 @@ struct CreatureEventAIHolder class CreatureEventAI : public CreatureAI { - public: explicit CreatureEventAI(Creature* c); ~CreatureEventAI() diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index a863f2f89cf..2d7c64bf5df 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -38,13 +38,13 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts() // Load EventAI Text sObjectMgr->LoadTrinityStrings("creature_ai_texts", MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID); - // Gather Additional data from EventAI Texts 0 1 2 3 4 + // Gather Additional data from EventAI Texts 0 1 2 3 4 QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM creature_ai_texts"); if (!result) { - sLog->outString(">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty."); + return; } @@ -64,33 +64,33 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts() // range negative if (i > MIN_CREATURE_AI_TEXT_STRING_ID || i <= MAX_CREATURE_AI_TEXT_STRING_ID) { - sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` is not in valid range(%d-%d)", i, MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` is not in valid range(%d-%d)", i, MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID); continue; } // range negative (must not happen, loaded from same table) if (!sObjectMgr->GetTrinityStringLocale(i)) { - sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` not found", i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` not found", i); continue; } if (temp.SoundId) { if (!sSoundEntriesStore.LookupEntry(temp.SoundId)) - sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` has Sound %u but sound does not exist.", i, temp.SoundId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Sound %u but sound does not exist.", i, temp.SoundId); } if (!GetLanguageDescByID(temp.Language)) - sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.", i, temp.Language); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.", i, temp.Language); if (temp.Type > CHAT_TYPE_ZONE_YELL) - sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.", i, temp.Type); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.", i, temp.Type); if (temp.Emote) { if (!sEmotesStore.LookupEntry(temp.Emote)) - sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` has Emote %u but emote does not exist.", i, temp.Emote); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Emote %u but emote does not exist.", i, temp.Emote); } m_CreatureEventAI_TextMap[i] = temp; @@ -98,11 +98,10 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts() } while (result->NextRow()); - sLog->outString(">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } -// ------------------- void CreatureEventAIMgr::LoadCreatureEventAI_Summons() { uint32 oldMSTime = getMSTime(); @@ -115,8 +114,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons() if (!result) { - sLog->outString(">> Loaded 0 CreatureEventAI Summon definitions. DB table `creature_ai_summons` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 CreatureEventAI Summon definitions. DB table `creature_ai_summons` is empty."); + return; } @@ -137,7 +136,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons() if (!Trinity::IsValidMapCoord(temp.position_x, temp.position_y, temp.position_z, temp.orientation)) { - sLog->outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f, %f, %f, %f), skipping.", i, temp.position_x, temp.position_y, temp.position_z, temp.orientation); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Summon id %u have wrong coordinates (%f, %f, %f, %f), skipping.", i, temp.position_x, temp.position_y, temp.position_z, temp.orientation); continue; } @@ -147,11 +146,10 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons() } while (result->NextRow()); - sLog->outString(">> Loaded %u CreatureEventAI summon definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u CreatureEventAI summon definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } -// ------------------- void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { uint32 oldMSTime = getMSTime(); @@ -169,8 +167,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() if (!result) { - sLog->outString(">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty."); + return; } @@ -191,7 +189,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() //Report any errors in event if (e_type >= EVENT_T_END) { - sLog->outErrorDb("CreatureEventAI: Event %u have wrong type (%u), skipping.", i, e_type); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u have wrong type (%u), skipping.", i, e_type); continue; } temp.event_type = EventAI_Type(e_type); @@ -208,21 +206,21 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() //Creature does not exist in database if (!cInfo) { - sLog->outErrorDb("CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id); continue; } // Only on the first script if (cInfo->AIName != "EventAI" && m_CreatureEventAI_Event_Map[creature_id].empty()) - sLog->outErrorDb("Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id); + sLog->outError(LOG_FILTER_SQL, "Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id); //No chance of this event occuring if (temp.event_chance == 0) - sLog->outErrorDb("CreatureEventAI: Event %u has 0 percent chance. Event will never trigger!", i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u has 0 percent chance. Event will never trigger!", i); //Chance above 100, force it to be 100 else if (temp.event_chance > 100) { - sLog->outErrorDb("CreatureEventAI: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i); temp.event_chance = 100; } @@ -232,23 +230,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() case EVENT_T_TIMER: case EVENT_T_TIMER_OOC: if (temp.timer.initialMax < temp.timer.initialMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i); if (temp.timer.repeatMax < temp.timer.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_HP: case EVENT_T_MANA: case EVENT_T_TARGET_HP: case EVENT_T_TARGET_MANA: if (temp.percent_range.percentMax > 100) - sLog->outErrorDb("CreatureEventAI: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i); if (temp.percent_range.percentMax <= temp.percent_range.percentMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i); if (temp.event_flags & EFLAG_REPEATABLE && !temp.percent_range.repeatMin && !temp.percent_range.repeatMax) { - sLog->outErrorDb("CreatureEventAI: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i); temp.event_flags &= ~EFLAG_REPEATABLE; } break; @@ -258,29 +256,29 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.spell_hit.spellId); if (!spell) { - sLog->outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i); continue; } if ((temp.spell_hit.schoolMask & spell->SchoolMask) != spell->SchoolMask) - sLog->outErrorDb("CreatureEventAI: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.spell_hit.schoolMask, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.spell_hit.schoolMask, i); } if (!temp.spell_hit.schoolMask) - sLog->outErrorDb("CreatureEventAI: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.spell_hit.schoolMask, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.spell_hit.schoolMask, i); if (temp.spell_hit.repeatMax < temp.spell_hit.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_RANGE: if (temp.range.maxDist < temp.range.minDist) - sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (MaxDist < MinDist). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (MaxDist < MinDist). Event will never repeat.", temp.creature_id, i); if (temp.range.repeatMax < temp.range.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_OOC_LOS: if (temp.ooc_los.repeatMax < temp.ooc_los.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_SPAWNED: switch (temp.spawned.condition) @@ -289,55 +287,55 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() break; case SPAWNED_EVENT_MAP: if (!sMapStore.LookupEntry(temp.spawned.conditionValue1)) - sLog->outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); break; case SPAWNED_EVENT_ZONE: if (!GetAreaEntryByAreaID(temp.spawned.conditionValue1)) - sLog->outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); default: - sLog->outErrorDb("CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition); break; } break; case EVENT_T_FRIENDLY_HP: if (temp.friendly_hp.repeatMax < temp.friendly_hp.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_FRIENDLY_IS_CC: if (temp.friendly_is_cc.repeatMax < temp.friendly_is_cc.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_FRIENDLY_MISSING_BUFF: { SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.spell_hit.spellId); if (!spell) { - sLog->outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i); continue; } if (temp.friendly_buff.repeatMax < temp.friendly_buff.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; } case EVENT_T_KILL: if (temp.kill.repeatMax < temp.kill.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_TARGET_CASTING: if (temp.target_casting.repeatMax < temp.target_casting.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_SUMMONED_UNIT: if (!sObjectMgr->GetCreatureTemplate(temp.summon_unit.creatureId)) - sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with not existed creature template id (%u) in param1, skipped.", temp.creature_id, i, temp.summon_unit.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with not existed creature template id (%u) in param1, skipped.", temp.creature_id, i, temp.summon_unit.creatureId); if (temp.summon_unit.repeatMax < temp.summon_unit.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; case EVENT_T_QUEST_ACCEPT: case EVENT_T_QUEST_COMPLETE: if (!sObjectMgr->GetQuestTemplate(temp.quest.questId)) - sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId); - sLog->outErrorDb("CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i); continue; case EVENT_T_AGGRO: @@ -347,7 +345,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (temp.event_flags & EFLAG_REPEATABLE) { - sLog->outErrorDb("CreatureEventAI: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i); temp.event_flags &= ~EFLAG_REPEATABLE; } @@ -358,7 +356,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (!sEmotesTextStore.LookupEntry(temp.receive_emote.emoteId)) { - sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: param1 (EmoteTextId: %u) are not valid.", temp.creature_id, i, temp.receive_emote.emoteId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: param1 (EmoteTextId: %u) are not valid.", temp.creature_id, i, temp.receive_emote.emoteId); continue; } if (temp.receive_emote.condition) @@ -369,14 +367,14 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() cond.ConditionValue2 = temp.receive_emote.conditionValue2; if (!sConditionMgr->isConditionTypeValid(&cond)) { - sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition); continue; } } if (!(temp.event_flags & EFLAG_REPEATABLE)) { - sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: EFLAG_REPEATABLE not set. Event must always be repeatable. Flag applied.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: EFLAG_REPEATABLE not set. Event must always be repeatable. Flag applied.", temp.creature_id, i); temp.event_flags |= EFLAG_REPEATABLE; } @@ -389,16 +387,16 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.buffed.spellId); if (!spell) { - sLog->outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i); continue; } if (temp.buffed.repeatMax < temp.buffed.repeatMin) - sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; } default: - sLog->outErrorDb("CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i); break; } @@ -407,7 +405,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() uint16 action_type = fields[10+(j*4)].GetUInt8(); if (action_type >= ACTION_T_END) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u has incorrect action type (%u), replace by ACTION_T_NONE.", i, j+1, action_type); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has incorrect action type (%u), replace by ACTION_T_NONE.", i, j+1, action_type); temp.action[j].type = ACTION_T_NONE; continue; } @@ -429,30 +427,30 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() if (action.text.TextId1 < 0) { if (m_CreatureEventAI_TextMap.find(action.text.TextId1) == m_CreatureEventAI_TextMap.end()) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1); } if (action.text.TextId2 < 0) { if (m_CreatureEventAI_TextMap.find(action.text.TextId2) == m_CreatureEventAI_TextMap.end()) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1); if (!action.text.TextId1) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1); } if (action.text.TextId3 < 0) { if (m_CreatureEventAI_TextMap.find(action.text.TextId3) == m_CreatureEventAI_TextMap.end()) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1); if (!action.text.TextId1 || !action.text.TextId2) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1); } break; } case ACTION_T_SET_FACTION: if (action.set_faction.factionId !=0 && !sFactionStore.LookupEntry(action.set_faction.factionId)) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent FactionId %u.", i, j+1, action.set_faction.factionId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent FactionId %u.", i, j+1, action.set_faction.factionId); action.set_faction.factionId = 0; } break; @@ -461,7 +459,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (action.morph.creatureId && !sObjectMgr->GetCreatureTemplate(action.morph.creatureId)) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId); action.morph.creatureId = 0; } @@ -469,12 +467,12 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (action.morph.creatureId) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId, action.morph.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId, action.morph.creatureId); action.morph.modelId = 0; } else if (!sCreatureDisplayInfoStore.LookupEntry(action.morph.modelId)) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant ModelId %u.", i, j+1, action.morph.modelId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant ModelId %u.", i, j+1, action.morph.modelId); action.morph.modelId = 0; } } @@ -482,33 +480,33 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() break; case ACTION_T_SOUND: if (!sSoundEntriesStore.LookupEntry(action.sound.soundId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId); break; case ACTION_T_EMOTE: if (!sEmotesStore.LookupEntry(action.emote.emoteId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.emote.emoteId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.emote.emoteId); break; case ACTION_T_RANDOM_SOUND: if (!sSoundEntriesStore.LookupEntry(action.random_sound.soundId1)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId1); if (action.random_sound.soundId2 >= 0 && !sSoundEntriesStore.LookupEntry(action.random_sound.soundId2)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId2); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId2); if (action.random_sound.soundId3 >= 0 && !sSoundEntriesStore.LookupEntry(action.random_sound.soundId3)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId3); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId3); break; case ACTION_T_RANDOM_EMOTE: if (!sEmotesStore.LookupEntry(action.random_emote.emoteId1)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId1); if (action.random_emote.emoteId2 >= 0 && !sEmotesStore.LookupEntry(action.random_emote.emoteId2)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param2 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId2); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId2); if (action.random_emote.emoteId3 >= 0 && !sEmotesStore.LookupEntry(action.random_emote.emoteId3)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param3 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId3); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId3); break; case ACTION_T_CAST: { const SpellInfo* spell = sSpellMgr->GetSpellInfo(action.cast.spellId); if (!spell) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast.spellId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast.spellId); /* FIXME: temp.raw.param3 not have event tipes with recovery time in it.... else { @@ -526,143 +524,143 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() action.cast.castFlags |= CAST_TRIGGERED; if (action.cast.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; } case ACTION_T_SUMMON: if (!sObjectMgr->GetCreatureTemplate(action.summon.creatureId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId); if (action.summon.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_THREAT_SINGLE_PCT: if (std::abs(action.threat_single_pct.percent) > 100) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_single_pct.percent); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_single_pct.percent); if (action.threat_single_pct.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_THREAT_ALL_PCT: if (std::abs(action.threat_all_pct.percent) > 100) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent); break; case ACTION_T_QUEST_EVENT: if (Quest const* qid = sObjectMgr->GetQuestTemplate(action.quest_event.questId)) { if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId); } else - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event.questId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event.questId); if (action.quest_event.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_CAST_EVENT: if (!sObjectMgr->GetCreatureTemplate(action.cast_event.creatureId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event.creatureId); if (!sSpellMgr->GetSpellInfo(action.cast_event.spellId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event.spellId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event.spellId); if (action.cast_event.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_SET_UNIT_FIELD: if (action.set_unit_field.field < OBJECT_END || action.set_unit_field.field >= UNIT_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1); if (action.set_unit_field.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_SET_UNIT_FLAG: case ACTION_T_REMOVE_UNIT_FLAG: if (action.unit_flag.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_SET_PHASE: if (action.set_phase.phase >= MAX_PHASE) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); break; case ACTION_T_INC_PHASE: if (action.set_inc_phase.step == 0) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1); else if (std::abs(action.set_inc_phase.step) > MAX_PHASE-1) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step); break; case ACTION_T_QUEST_EVENT_ALL: if (Quest const* qid = sObjectMgr->GetQuestTemplate(action.quest_event_all.questId)) { if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId); } else - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event_all.questId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event_all.questId); break; case ACTION_T_CAST_EVENT_ALL: if (!sObjectMgr->GetCreatureTemplate(action.cast_event_all.creatureId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event_all.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event_all.creatureId); if (!sSpellMgr->GetSpellInfo(action.cast_event_all.spellId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event_all.spellId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event_all.spellId); break; case ACTION_T_REMOVEAURASFROMSPELL: if (!sSpellMgr->GetSpellInfo(action.remove_aura.spellId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.remove_aura.spellId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.remove_aura.spellId); if (action.remove_aura.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_RANDOM_PHASE: //PhaseId1, PhaseId2, PhaseId3 if (action.random_phase.phase1 >= MAX_PHASE) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase1 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase1 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); if (action.random_phase.phase2 >= MAX_PHASE) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase2 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase2 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); if (action.random_phase.phase3 >= MAX_PHASE) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase3 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase3 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); break; case ACTION_T_RANDOM_PHASE_RANGE: //PhaseMin, PhaseMax if (action.random_phase_range.phaseMin >= MAX_PHASE) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phaseMin >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMin >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); if (action.random_phase_range.phaseMin >= MAX_PHASE) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phaseMax >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMax >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1); if (action.random_phase_range.phaseMin >= action.random_phase_range.phaseMax) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phaseMax <= phaseMin.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMax <= phaseMin.", i, j+1); std::swap(action.random_phase_range.phaseMin, action.random_phase_range.phaseMax); // equal case processed at call } break; case ACTION_T_SUMMON_ID: if (!sObjectMgr->GetCreatureTemplate(action.summon_id.creatureId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.summon_id.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.summon_id.creatureId); if (action.summon_id.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); if (m_CreatureEventAI_Summon_Map.find(action.summon_id.spawnId) == m_CreatureEventAI_Summon_Map.end()) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u summons missing CreatureEventAI_Summon %u", i, j+1, action.summon_id.spawnId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u summons missing CreatureEventAI_Summon %u", i, j+1, action.summon_id.spawnId); break; case ACTION_T_KILLED_MONSTER: if (!sObjectMgr->GetCreatureTemplate(action.killed_monster.creatureId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId); if (action.killed_monster.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_SET_INST_DATA: if (!(temp.event_flags & EFLAG_DIFFICULTY_ALL)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1); if (action.set_inst_data.value > 4/*SPECIAL*/) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1); break; case ACTION_T_SET_INST_DATA64: if (!(temp.event_flags & EFLAG_DIFFICULTY_ALL)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1); if (action.set_inst_data64.target >= TARGET_T_END) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1); break; case ACTION_T_UPDATE_TEMPLATE: if (!sObjectMgr->GetCreatureTemplate(action.update_template.creatureId)) - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId); break; case ACTION_T_SET_SHEATH: if (action.set_sheath.sheath >= MAX_SHEATH_STATE) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath); action.set_sheath.sheath = SHEATH_STATE_UNARMED; } break; @@ -671,7 +669,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (action.invincibility_hp_level.hp_level > 100) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level); action.invincibility_hp_level.hp_level = 100; } } @@ -681,7 +679,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (action.mount.creatureId && !sObjectMgr->GetCreatureTemplate(action.mount.creatureId)) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses nonexistent Creature entry %u.", i, j+1, action.mount.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses nonexistent Creature entry %u.", i, j+1, action.mount.creatureId); action.morph.creatureId = 0; } @@ -689,12 +687,12 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() { if (action.mount.creatureId) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.mount.modelId, action.mount.creatureId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.mount.modelId, action.mount.creatureId); action.mount.modelId = 0; } else if (!sCreatureDisplayInfoStore.LookupEntry(action.mount.modelId)) { - sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses nonexistent ModelId %u.", i, j+1, action.mount.modelId); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses nonexistent ModelId %u.", i, j+1, action.mount.modelId); action.mount.modelId = 0; } } @@ -714,7 +712,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() case ACTION_T_RANDOM_SAY: case ACTION_T_RANDOM_YELL: case ACTION_T_RANDOM_TEXTEMOTE: - sLog->outErrorDb("CreatureEventAI: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1); break; case ACTION_T_MOVE_RANDOM_POINT: @@ -728,7 +726,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() break; default: - sLog->outErrorDb("CreatureEventAI: Event %u Action %u have currently not checked at load action type (%u). Need check code update?", i, j+1, action.type); + sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have currently not checked at load action type (%u). Need check code update?", i, j+1, action.type); break; } } @@ -740,6 +738,6 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() } while (result->NextRow()); - sLog->outString(">> Loaded %u CreatureEventAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u CreatureEventAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index a5f957c352c..76bb3aaa76a 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -157,7 +157,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* source, uint32 soundId) if (!sSoundEntriesStore.LookupEntry(soundId)) { - sLog->outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow()); + sLog->outError(LOG_FILTER_TSCR, "Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow()); return; } @@ -250,7 +250,7 @@ void ScriptedAI::DoResetThreat() { if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty()) { - sLog->outError("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry()); + sLog->outError(LOG_FILTER_TSCR, "DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry()); return; } @@ -299,7 +299,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* unit, float x, float y, float z, float o if (Player* player = unit->ToPlayer()) player->TeleportTo(unit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); else - sLog->outError("TSCR: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), unit->GetTypeId(), unit->GetGUID(), x, y, z, o); + sLog->outError(LOG_FILTER_TSCR, "Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), unit->GetTypeId(), unit->GetGUID(), x, y, z, o); } void ScriptedAI::DoTeleportAll(float x, float y, float z, float o) @@ -431,7 +431,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const diff) return false; break; default: // For most of creatures that certain area is their home area. - sLog->outDetail("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry()); + sLog->outInfo(LOG_FILTER_GENERAL, "TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry()); uint32 homeAreaId = me->GetMap()->GetAreaId(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ()); if (me->GetAreaId() == homeAreaId) return false; diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index d6da6a91bf1..003c9ac9d1c 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -175,7 +175,7 @@ void npc_escortAI::EnterEvadeMode() { AddEscortState(STATE_ESCORT_RETURNING); ReturnToLastPoint(); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has left combat and is now returning to last point"); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI has left combat and is now returning to last point"); } else { @@ -216,7 +216,7 @@ void npc_escortAI::UpdateAI(uint32 const diff) { if (DespawnAtEnd) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI reached end of waypoints"); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI reached end of waypoints"); if (m_bCanReturnToStart) { @@ -227,7 +227,7 @@ void npc_escortAI::UpdateAI(uint32 const diff) m_uiWPWaitTimer = 0; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); return; } @@ -243,7 +243,7 @@ void npc_escortAI::UpdateAI(uint32 const diff) } else { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI reached end of waypoints with Despawn off"); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI reached end of waypoints with Despawn off"); return; } @@ -252,7 +252,7 @@ void npc_escortAI::UpdateAI(uint32 const diff) if (!HasEscortState(STATE_ESCORT_PAUSED)) { me->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); WaypointStart(CurrentWP->id); @@ -270,7 +270,7 @@ void npc_escortAI::UpdateAI(uint32 const diff) { if (DespawnAtFar && !IsPlayerOrGroupInRange()) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI failed because player/group was to far away or not found"); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI failed because player/group was to far away or not found"); if (m_bCanInstantRespawn) { @@ -308,7 +308,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId) //Combat start position reached, continue waypoint movement if (pointId == POINT_LAST_POINT) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has returned to original position before combat"); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI has returned to original position before combat"); me->SetWalk(!m_bIsRunning); RemoveEscortState(STATE_ESCORT_RETURNING); @@ -318,7 +318,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId) } else if (pointId == POINT_HOME) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list."); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI has returned to original home location and will continue from beginning of waypoint list."); CurrentWP = WaypointList.begin(); m_uiWPWaitTimer = 1; @@ -328,11 +328,11 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId) //Make sure that we are still on the right waypoint if (CurrentWP->id != pointId) { - sLog->outError("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", pointId, CurrentWP->id, me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", pointId, CurrentWP->id, me->GetEntry()); return; } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI Waypoint %u reached", CurrentWP->id); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI Waypoint %u reached", CurrentWP->id); //Call WP function WaypointReached(CurrentWP->id); @@ -401,14 +401,14 @@ void npc_escortAI::SetRun(bool on) if (!m_bIsRunning) me->SetWalk(false); else - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI attempt to set run mode, but is already running."); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI attempt to set run mode, but is already running."); } else { if (m_bIsRunning) me->SetWalk(true); else - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI attempt to set walk mode, but is already walking."); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI attempt to set walk mode, but is already walking."); } m_bIsRunning = on; @@ -419,13 +419,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false { if (me->getVictim()) { - sLog->outError("TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry()); return; } if (HasEscortState(STATE_ESCORT_ESCORTING)) { - sLog->outError("TSCR: EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry()); + sLog->outError(LOG_FILTER_TSCR, "EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry()); return; } @@ -438,7 +438,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false if (WaypointList.empty()) { - sLog->outErrorDb("TSCR: EscortAI (script: %s, creature entry: %u) starts with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", + sLog->outError(LOG_FILTER_SQL, "TSCR: EscortAI (script: %s, creature entry: %u) starts with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", me->GetScriptName().c_str(), me->GetEntry(), quest ? quest->GetQuestId() : 0); return; } @@ -454,13 +454,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false m_bCanReturnToStart = canLoopPath; if (m_bCanReturnToStart && m_bCanInstantRespawn) - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn."); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn."); if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) { me->GetMotionMaster()->MovementExpired(); me->GetMotionMaster()->MoveIdle(); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); } //disable npcflags @@ -471,7 +471,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC); } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); + sLog->outDebug(LOG_FILTER_TSCR, "EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); CurrentWP = WaypointList.begin(); diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h index 7a7fab014dc..4b4f3656a8d 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h @@ -123,4 +123,3 @@ struct npc_escortAI : public ScriptedAI bool HasImmuneToNPCFlags; }; #endif - diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 4a71184442d..1e83c203553 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -165,7 +165,7 @@ void FollowerAI::EnterEvadeMode() if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI left combat, returning to CombatStartPosition."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI left combat, returning to CombatStartPosition."); if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { @@ -191,7 +191,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) { if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT)) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is set completed, despawns."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI is set completed, despawns."); me->DespawnOrUnsummon(); return; } @@ -202,7 +202,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) { if (HasFollowState(STATE_FOLLOW_RETURNING)) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is returning to leader."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI is returning to leader."); RemoveFollowState(STATE_FOLLOW_RETURNING); me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); @@ -231,7 +231,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) if (bIsMaxRangeExceeded) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI failed because player/group was to far away or not found"); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI failed because player/group was to far away or not found"); me->DespawnOrUnsummon(); return; } @@ -274,13 +274,13 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu { if (me->getVictim()) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI attempt to StartFollow while in combat."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while in combat."); return; } if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - sLog->outError("TSCR: FollowerAI attempt to StartFollow while already following."); + sLog->outError(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while already following."); return; } @@ -296,7 +296,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu { me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); } me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); @@ -305,7 +305,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName(), m_uiLeaderGUID); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName(), m_uiLeaderGUID); } Player* FollowerAI::GetLeaderForFollower() @@ -324,7 +324,7 @@ Player* FollowerAI::GetLeaderForFollower() if (member && member->isAlive() && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE)) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader changed and returned new leader."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI GetLeader changed and returned new leader."); m_uiLeaderGUID = member->GetGUID(); return member; } @@ -333,7 +333,7 @@ Player* FollowerAI::GetLeaderForFollower() } } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader can not find suitable leader."); + sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI GetLeader can not find suitable leader."); return NULL; } diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 629998e3579..0b8236908a0 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -107,7 +107,7 @@ WayPoint* SmartAI::GetNextWayPoint() mLastWP = (*itr).second; if (mLastWP->id != mCurrentWPID) { - sLog->outError("SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID); + sLog->outError(LOG_FILTER_GENERAL, "SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID); } return (*itr).second; } @@ -118,7 +118,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/) { if (me->isInCombat())// no wp movement in combat { - sLog->outError("SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry()); return; } if (HasEscortState(SMART_ESCORT_ESCORTING)) @@ -134,8 +134,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/) SetRun(run); - WayPoint* wp = GetNextWayPoint(); - if (wp) + if (WayPoint* wp = GetNextWayPoint()) { me->GetPosition(&mLastOOCPos); me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z); @@ -163,7 +162,7 @@ void SmartAI::PausePath(uint32 delay, bool forced) return; if (HasEscortState(SMART_ESCORT_PAUSED)) { - sLog->outError("SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry()); + sLog->outError(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry()); return; } mForcedPaused = forced; @@ -301,7 +300,6 @@ void SmartAI::UpdatePath(const uint32 diff) mWPPauseTimer = 0; } else { mWPPauseTimer -= diff; - } } if (HasEscortState(SMART_ESCORT_RETURNING)) @@ -323,15 +321,12 @@ void SmartAI::UpdatePath(const uint32 diff) if (mCurrentWPID == GetWPCount()) { EndPath(); - } else { - WayPoint* wp = GetNextWayPoint(); - if (wp) - { - SetRun(mRun); - me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z); - } } - + else if (WayPoint* wp = GetNextWayPoint()) + { + SetRun(mRun); + me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z); + } } } diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 82d0945874c..6e5a34e8c33 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -910,7 +910,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u InstanceScript* instance = obj->GetInstanceScript(); if (!instance) { - sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid); break; } @@ -931,7 +931,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u InstanceScript* instance = obj->GetInstanceScript(); if (!instance) { - sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid); break; } @@ -1438,7 +1438,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(e.action.equip.entry); if (!einfo) { - sLog->outErrorDb("SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry); + sLog->outError(LOG_FILTER_SQL, "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry); return; } npc->SetCurrentEquipmentId(e.action.equip.entry); @@ -1563,7 +1563,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { if (e.GetTargetType() == SMART_TARGET_NONE) { - sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); break; } @@ -1687,7 +1687,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u uint32 id = temp[urand(0, count)]; if (e.GetTargetType() == SMART_TARGET_NONE) { - sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); break; } @@ -1717,7 +1717,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u uint32 id = urand(e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2); if (e.GetTargetType() == SMART_TARGET_NONE) { - sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); break; } @@ -1909,14 +1909,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI())) ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list else - sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping"); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping"); } else if (IsGameObject(*itr)) { if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI())) ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list else - sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping"); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping"); } } @@ -1950,7 +1950,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; } default: - sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); break; } @@ -1960,7 +1960,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK) ProcessEvent(linked, unit, var0, var1, bvar, spell, gob); else - sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); + sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); } } @@ -1970,7 +1970,7 @@ void SmartScript::InstallTemplate(SmartScriptHolder const& e) return; if (mTemplate) { - sLog->outErrorDb("SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType()); + sLog->outError(LOG_FILTER_SQL, "SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType()); return; } mTemplate = (SMARTAI_TEMPLATE)e.action.installTtemplate.id; @@ -2227,7 +2227,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* { if (!trigger && !GetBaseObject()) { - sLog->outErrorDb("SMART_TARGET_CREATURE_GUID can not be used without invoker and without entry"); + sLog->outError(LOG_FILTER_SQL, "SMART_TARGET_CREATURE_GUID can not be used without invoker and without entry"); break; } @@ -2250,7 +2250,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* { if (!trigger && !GetBaseObject()) { - sLog->outErrorDb("SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker and without entry"); + sLog->outError(LOG_FILTER_SQL, "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker and without entry"); break; } @@ -2787,7 +2787,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui break; } default: - sLog->outErrorDb("SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType()); + sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType()); break; } } @@ -2984,9 +2984,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn mEvents.push_back((*i));//NOTE: 'world(0)' events still get processed in ANY instance mode } if (mEvents.empty() && obj) - sLog->outErrorDb("SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry()); if (mEvents.empty() && at) - sLog->outErrorDb("SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id); + sLog->outError(LOG_FILTER_SQL, "SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id); } void SmartScript::GetScript() @@ -3030,7 +3030,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at) sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry()); break; default: - sLog->outError("SmartScript::OnInitialize: Unhandled TypeID !WARNING!"); + sLog->outError(LOG_FILTER_GENERAL, "SmartScript::OnInitialize: Unhandled TypeID !WARNING!"); return; } } else if (at) @@ -3041,7 +3041,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at) } else { - sLog->outError("SmartScript::OnInitialize: !WARNING! Initialized objects are NULL."); + sLog->outError(LOG_FILTER_GENERAL, "SmartScript::OnInitialize: !WARNING! Initialized objects are NULL."); return; } diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 03d533e69e5..2a0eceb574a 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -117,7 +117,7 @@ class SmartScript smart = false; if (!smart) - sLog->outErrorDb("SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetEntry() : (me ? me->GetEntry() : 0)); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetEntry() : (me ? me->GetEntry() : 0)); return smart; } @@ -131,7 +131,7 @@ class SmartScript if (!go || go->GetAIName() != "SmartGameObjectAI") smart = false; if (!smart) - sLog->outErrorDb("SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetEntry() : (go ? go->GetEntry() : 0)); + sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetEntry() : (go ? go->GetEntry() : 0)); return smart; } @@ -254,7 +254,6 @@ class SmartScript mStoredEvents.erase(i); return; } - } } } @@ -268,7 +267,6 @@ class SmartScript { return (*i); } - } } SmartScriptHolder s; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index de766d2a7e1..1723e96a08a 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -50,8 +50,8 @@ void SmartWaypointMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty."); + return; } @@ -78,7 +78,7 @@ void SmartWaypointMgr::LoadFromDB() } if (last_id != id) - sLog->outErrorDb("SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id); + sLog->outError(LOG_FILTER_SQL, "SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id); last_id++; (*waypoint_map[entry])[id] = new WayPoint(id, x, y, z); @@ -88,8 +88,8 @@ void SmartWaypointMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime)); + } SmartWaypointMgr::~SmartWaypointMgr() @@ -117,8 +117,8 @@ void SmartAIMgr::LoadSmartAIFromDB() if (!result) { - sLog->outString(">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty."); + return; } @@ -134,7 +134,7 @@ void SmartAIMgr::LoadSmartAIFromDB() SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt8(); if (source_type >= SMART_SCRIPT_TYPE_MAX) { - sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type)); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type)); continue; } if (temp.entryOrGuid >= 0) @@ -145,7 +145,7 @@ void SmartAIMgr::LoadSmartAIFromDB() { if (!sObjectMgr->GetCreatureTemplate((uint32)temp.entryOrGuid)) { - sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid)); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid)); continue; } break; @@ -154,7 +154,7 @@ void SmartAIMgr::LoadSmartAIFromDB() { if (!sObjectMgr->GetGameObjectTemplate((uint32)temp.entryOrGuid)) { - sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid)); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid)); continue; } break; @@ -163,7 +163,7 @@ void SmartAIMgr::LoadSmartAIFromDB() { if (!sAreaTriggerStore.LookupEntry((uint32)temp.entryOrGuid)) { - sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid)); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid)); continue; } break; @@ -171,7 +171,7 @@ void SmartAIMgr::LoadSmartAIFromDB() case SMART_SCRIPT_TYPE_TIMED_ACTIONLIST: break;//nothing to check, really default: - sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type); continue; } } @@ -179,7 +179,7 @@ void SmartAIMgr::LoadSmartAIFromDB() { if (!sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid)))) { - sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid))); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid))); continue; } } @@ -234,8 +234,8 @@ void SmartAIMgr::LoadSmartAIFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) @@ -249,7 +249,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) { if (e.target.unitDistance.creature && !sObjectMgr->GetCreatureTemplate(e.target.unitDistance.creature)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature); return false; } break; @@ -259,7 +259,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) { if (e.target.goDistance.entry && !sObjectMgr->GetGameObjectTemplate(e.target.goDistance.entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry); return false; } break; @@ -281,7 +281,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) { if (e.target.playerDistance.dist == 0) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } break; @@ -305,7 +305,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) case SMART_TARGET_STORED: break; default: - sLog->outErrorDb("SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } return true; @@ -315,28 +315,28 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.event.type >= SMART_EVENT_END) { - sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType()); return false; } // in SMART_SCRIPT_TYPE_TIMED_ACTIONLIST all event types are overriden by core if (e.GetScriptType() != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST && !(SmartAIEventMask[e.event.type][1] & SmartAITypeMask[e.GetScriptType()][1])) { - sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType()); return false; } if (e.action.type <= 0 || e.action.type >= SMART_ACTION_END) { - sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType()); return false; } if (e.event.event_phase_mask > SMART_EVENT_PHASE_ALL) { - sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask); return false; } if (e.event.event_flags > SMART_EVENT_FLAGS_ALL) { - sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags); return false; } if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST) @@ -377,12 +377,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.event.spellHit.spell); if (!spellInfo) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell); return false; } if (e.event.spellHit.school && (e.event.spellHit.school & spellInfo->SchoolMask) != spellInfo->SchoolMask) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell); return false; } } @@ -397,12 +397,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_EVENT_RESPAWN: if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map); return false; } if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !GetAreaEntryByAreaID(e.event.respawn.area)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area); return false; } break; @@ -484,7 +484,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.event.movementInform.type > NULL_MOTION_TYPE) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type); return false; } break; @@ -508,7 +508,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.link && e.link == e.event_id) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id); return false; } break; @@ -540,7 +540,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.event.doAction.eventId > EVENT_CHARGE) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid event id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.doAction.eventId); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid event id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.doAction.eventId); return false; } break; @@ -580,7 +580,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_EVENT_ON_SPELLCLICK: break; default: - sLog->outErrorDb("SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } } @@ -590,7 +590,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SET_FACTION: if (e.action.faction.factionID && !sFactionTemplateStore.LookupEntry(e.action.faction.factionID)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID); return false; } break; @@ -600,7 +600,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.action.morphOrMount.creature > 0 && !sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature); return false; } @@ -608,12 +608,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.action.morphOrMount.creature) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } else if (!sCreatureDisplayInfoStore.LookupEntry(e.action.morphOrMount.model)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model); return false; } } @@ -624,7 +624,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; if (e.action.sound.range > TEXT_RANGE_WORLD) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range); return false; } break; @@ -642,7 +642,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (!sTaxiPathStore.LookupEntry(e.action.taxi.id)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id); return false; } break; @@ -678,13 +678,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest); return false; } } else { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest); return false; } break; @@ -695,24 +695,22 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (!IsSpellValid(e, e.action.castCreatureOrGO.spell)) return false; break; - - case SMART_ACTION_SET_EVENT_PHASE: if (e.action.setEventPhase.phase >= SMART_EVENT_PHASE_MAX) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1); return false; } break; case SMART_ACTION_INC_EVENT_PHASE: if (!e.action.incEventPhase.inc && !e.action.incEventPhase.dec) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } else if (e.action.incEventPhase.inc > SMART_EVENT_PHASE_MAX || e.action.incEventPhase.dec > SMART_EVENT_PHASE_MAX) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } break; @@ -736,7 +734,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) e.action.randomPhase.phase5 >= SMART_EVENT_PHASE_MAX || e.action.randomPhase.phase6 >= SMART_EVENT_PHASE_MAX) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } } @@ -746,7 +744,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (e.action.randomPhaseRange.phaseMin >= SMART_EVENT_PHASE_MAX || e.action.randomPhaseRange.phaseMax >= SMART_EVENT_PHASE_MAX) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } if (!IsMinMaxValid(e, e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax)) @@ -758,7 +756,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; if (e.action.summonCreature.type < TEMPSUMMON_TIMED_OR_DEAD_DESPAWN || e.action.summonCreature.type > TEMPSUMMON_MANUAL_DESPAWN) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type); return false; } break; @@ -773,7 +771,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SET_SHEATH: if (e.action.setSheath.sheath && e.action.setSheath.sheath >= MAX_SHEATH_STATE) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath); return false; } break; @@ -781,7 +779,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (e.action.react.state > REACT_AGGRESSIVE) { - sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state); return false; } break; @@ -801,14 +799,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_TELEPORT: if (!sMapStore.LookupEntry(e.action.teleport.mapID)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID); return false; } break; case SMART_ACTION_INSTALL_AI_TEMPLATE: if (e.action.installTtemplate.id >= SMARTAI_TEMPLATE_END) { - sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id); return false; } break; @@ -820,14 +818,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if (!sSmartWaypointMgr->GetPath(e.action.wpStart.pathID)) { - sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID); return false; } if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest)) return false; if (e.action.wpStart.reactState > REACT_AGGRESSIVE) { - sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState); return false; } break; @@ -908,7 +906,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SEND_TARGET_TO_TARGET: break; default: - sLog->outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id); return false; } @@ -926,7 +924,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) CreatureData const* data = sObjectMgr->GetCreatureData(entry); if (!data) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } else @@ -936,7 +934,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) error = true; if (error) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id); return false; } return true; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index bc390441e04..05965d8ffa0 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -534,7 +534,6 @@ struct SmartAction struct { - uint32 emote1; uint32 emote2; uint32 emote3; @@ -1245,7 +1244,6 @@ struct SmartScriptHolder bool active; bool runOnce; bool enableTimed; - }; typedef UNORDERED_MAP WPPath; @@ -1312,7 +1310,7 @@ class SmartAIMgr { if (target < SMART_TARGET_NONE || target >= SMART_TARGET_END) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target); return false; } return true; @@ -1322,7 +1320,7 @@ class SmartAIMgr { if (max < min) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max); return false; } return true; @@ -1332,7 +1330,7 @@ class SmartAIMgr { if (pct < -100 || pct > 100) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct); return false; } return true; @@ -1342,7 +1340,7 @@ class SmartAIMgr { if (!data) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } return true; @@ -1352,7 +1350,7 @@ class SmartAIMgr { if (!sObjectMgr->GetCreatureTemplate(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1362,7 +1360,7 @@ class SmartAIMgr { if (!sObjectMgr->GetQuestTemplate(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1372,7 +1370,7 @@ class SmartAIMgr { if (!sObjectMgr->GetGameObjectTemplate(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1382,7 +1380,7 @@ class SmartAIMgr { if (!sSpellMgr->GetSpellInfo(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1392,7 +1390,7 @@ class SmartAIMgr { if (!sItemStore.LookupEntry(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1402,7 +1400,7 @@ class SmartAIMgr { if (!sEmotesTextStore.LookupEntry(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1412,7 +1410,7 @@ class SmartAIMgr { if (!sEmotesStore.LookupEntry(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1422,7 +1420,7 @@ class SmartAIMgr { if (!sAreaTriggerStore.LookupEntry(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; @@ -1432,7 +1430,7 @@ class SmartAIMgr { if (!sSoundEntriesStore.LookupEntry(entry)) { - sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); + sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); return false; } return true; diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 450c05329b4..be4ce974f70 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -75,7 +75,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) { if (dataType >= MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE) { - sLog->outErrorDb("Table `achievement_criteria_data` for criteria (Entry: %u) has wrong data type (%u), ignored.", criteria->ID, dataType); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` for criteria (Entry: %u) has wrong data type (%u), ignored.", criteria->ID, dataType); return false; } @@ -107,7 +107,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) default: if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT) { - sLog->outErrorDb("Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->requiredType); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->requiredType); return false; } break; @@ -122,7 +122,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE: if (!creature.id || !sObjectMgr->GetCreatureTemplate(creature.id)) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, creature.id); return false; } @@ -130,19 +130,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE: if (!classRace.class_id && !classRace.race_id) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", criteria->ID, criteria->requiredType, dataType); return false; } if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, classRace.class_id); return false; } if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, classRace.race_id); return false; } @@ -150,7 +150,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH: if (health.percent < 1 || health.percent > 100) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) has wrong percent value in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) has wrong percent value in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, health.percent); return false; } @@ -158,7 +158,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD: if (player_dead.own_team_flag > 1) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD (%u) has wrong boolean value1 (%u).", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD (%u) has wrong boolean value1 (%u).", criteria->ID, criteria->requiredType, dataType, player_dead.own_team_flag); return false; } @@ -169,19 +169,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(aura.spell_id); if (!spellEntry) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell id in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell id in value1 (%u), ignored.", criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id); return false; } if (aura.effect_idx >= 3) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell effect index in value2 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell effect index in value2 (%u), ignored.", criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.effect_idx); return false; } if (!spellEntry->Effects[aura.effect_idx].ApplyAuraName) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has non-aura spell effect (ID: %u Effect: %u), ignores.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has non-aura spell effect (ID: %u Effect: %u), ignores.", criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id, aura.effect_idx); return false; } @@ -190,7 +190,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA: if (!GetAreaEntryByAreaID(area.id)) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA (%u) has wrong area id in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA (%u) has wrong area id in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, area.id); return false; } @@ -198,7 +198,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL: if (level.minlevel > STRONG_MAX_LEVEL) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) has wrong minlevel in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) has wrong minlevel in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, level.minlevel); return false; } @@ -206,7 +206,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER: if (gender.gender > GENDER_NONE) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) has wrong gender in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) has wrong gender in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, gender.gender); return false; } @@ -214,7 +214,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT: if (!ScriptId) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have ScriptName set, ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have ScriptName set, ignored.", criteria->ID, criteria->requiredType, dataType); return false; } @@ -222,7 +222,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY: if (difficulty.difficulty >= MAX_DIFFICULTY) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY (%u) has wrong difficulty in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY (%u) has wrong difficulty in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, difficulty.difficulty); return false; } @@ -230,7 +230,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT: if (map_players.maxcount <= 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) has wrong max players count in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) has wrong max players count in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, map_players.maxcount); return false; } @@ -238,7 +238,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM: if (team.team != ALLIANCE && team.team != HORDE) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) has unknown team in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) has unknown team in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, team.team); return false; } @@ -246,7 +246,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK: if (drunk.state >= MAX_DRUNKEN) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) has unknown drunken state in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) has unknown drunken state in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, drunk.state); return false; } @@ -254,7 +254,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY: if (!sHolidaysStore.LookupEntry(holiday.id)) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) has unknown holiday in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) has unknown holiday in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, holiday.id); return false; } @@ -264,7 +264,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM: if (equipped_item.item_quality >= MAX_ITEM_QUALITY) { - sLog->outErrorDb("Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) has unknown quality state in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) has unknown quality state in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, equipped_item.item_quality); return false; } @@ -272,7 +272,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID: if (!sMapStore.LookupEntry(map_id.mapId)) { - sLog->outErrorDb("Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID (%u) has unknown map id in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID (%u) has unknown map id in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, map_id.mapId); return false; } @@ -280,25 +280,25 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE: if (!classRace.class_id && !classRace.race_id) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.", criteria->ID, criteria->requiredType, dataType); return false; } if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, classRace.class_id); return false; } if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.", criteria->ID, criteria->requiredType, dataType, classRace.race_id); return false; } return true; default: - sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType); return false; } } @@ -391,14 +391,14 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un Map* map = source->GetMap(); if (!map->IsDungeon()) { - sLog->outErrorDb("Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for non-dungeon/non-raid map %u", + sLog->outError(LOG_FILTER_SQL, "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for non-dungeon/non-raid map %u", ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT, criteria_id, map->GetId()); return false; } InstanceScript* instance = ((InstanceMap*)map)->GetInstanceScript(); if (!instance) { - sLog->outErrorDb("Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for map %u but map does not have a instance script", + sLog->outError(LOG_FILTER_SQL, "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for map %u but map does not have a instance script", ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT, criteria_id, map->GetId()); return false; } @@ -653,7 +653,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ if (!criteria) { // we will remove not existed criteria for all characters - sLog->outError("Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id); + sLog->outError(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA); @@ -2029,7 +2029,7 @@ void AchievementMgr::RemoveTimedAchievement(AchievementCriteriaTimedTypes type, void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement) { - sLog->outDetail("AchievementMgr::CompletedAchievement(%u)", achievement->ID); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::CompletedAchievement(%u)", achievement->ID); // disable for gamemasters with GM-mode enabled if (m_player->isGameMaster()) @@ -2201,8 +2201,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() if (sAchievementCriteriaStore.GetNumRows() == 0) { - sLog->outErrorDb(">> Loaded 0 achievement criteria."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement criteria."); + return; } @@ -2219,8 +2219,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() m_AchievementCriteriasByTimedType[criteria->timedType].push_back(criteria); } - sLog->outString(">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime)); + } void AchievementGlobalMgr::LoadAchievementReferenceList() @@ -2229,8 +2229,8 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() if (sAchievementStore.GetNumRows() == 0) { - sLog->outString(">> Loaded 0 achievement references."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement references."); + return; } @@ -2250,8 +2250,8 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() if (AchievementEntry const* achievement = sAchievementStore.LookupEntry(4539)) const_cast(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar) - sLog->outString(">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void AchievementGlobalMgr::LoadAchievementCriteriaData() @@ -2264,8 +2264,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() if (!result) { - sLog->outString(">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty."); + return; } @@ -2280,7 +2280,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() if (!criteria) { - sLog->outErrorDb("Table `achievement_criteria_data` has data for non-existing criteria (Entry: %u), ignore.", criteria_id); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` has data for non-existing criteria (Entry: %u), ignore.", criteria_id); continue; } @@ -2290,7 +2290,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() if (strcmp(scriptName, "")) // not empty { if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT) - sLog->outErrorDb("Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType); else scriptId = sObjectMgr->GetScriptId(scriptName); } @@ -2393,11 +2393,11 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() } if (!GetCriteriaDataSet(criteria) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_ACHIEVEMENT_CRITERIA, entryId, NULL)) - sLog->outErrorDb("Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement); } - sLog->outString(">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void AchievementGlobalMgr::LoadCompletedAchievements() @@ -2408,8 +2408,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements() if (!result) { - sLog->outString(">> Loaded 0 completed achievements. DB table `character_achievement` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty."); + return; } @@ -2422,7 +2422,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() if (!achievement) { // Remove non existent achievements from all characters - sLog->outError("Non-existing achievement %u data removed from table `character_achievement`.", achievementId); + sLog->outError(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement %u data removed from table `character_achievement`.", achievementId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEVMENT); @@ -2436,8 +2436,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements() m_allCompletedAchievements.insert(achievementId); } while (result->NextRow()); - sLog->outString(">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime)); + } void AchievementGlobalMgr::LoadRewards() @@ -2451,8 +2451,8 @@ void AchievementGlobalMgr::LoadRewards() if (!result) { - sLog->outErrorDb(">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty."); + return; } @@ -2465,7 +2465,7 @@ void AchievementGlobalMgr::LoadRewards() const AchievementEntry* pAchievement = sAchievementStore.LookupEntry(entry); if (!pAchievement) { - sLog->outErrorDb("Table `achievement_reward` has wrong achievement (Entry: %u), ignore", entry); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` has wrong achievement (Entry: %u), ignore", entry); continue; } @@ -2480,19 +2480,19 @@ void AchievementGlobalMgr::LoadRewards() // must be title or mail at least if (!reward.titleId[0] && !reward.titleId[1] && !reward.sender) { - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) not have title or item reward data, ignore.", entry); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) not have title or item reward data, ignore.", entry); continue; } if (pAchievement->requiredFaction == ACHIEVEMENT_FACTION_ANY && ((reward.titleId[0] == 0) != (reward.titleId[1] == 0))) - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has title (A: %u H: %u) for only one team.", entry, reward.titleId[0], reward.titleId[1]); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has title (A: %u H: %u) for only one team.", entry, reward.titleId[0], reward.titleId[1]); if (reward.titleId[0]) { CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(reward.titleId[0]); if (!titleEntry) { - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_A`, set to 0", entry, reward.titleId[0]); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_A`, set to 0", entry, reward.titleId[0]); reward.titleId[0] = 0; } } @@ -2502,7 +2502,7 @@ void AchievementGlobalMgr::LoadRewards() CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(reward.titleId[1]); if (!titleEntry) { - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_H`, set to 0", entry, reward.titleId[1]); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_H`, set to 0", entry, reward.titleId[1]); reward.titleId[1] = 0; } } @@ -2512,27 +2512,27 @@ void AchievementGlobalMgr::LoadRewards() { if (!sObjectMgr->GetCreatureTemplate(reward.sender)) { - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender); reward.sender = 0; } } else { if (reward.itemId) - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) does not have sender data but has item reward, item will not be rewarded.", entry); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has item reward, item will not be rewarded.", entry); if (!reward.subject.empty()) - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) does not have sender data but has mail subject.", entry); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has mail subject.", entry); if (!reward.text.empty()) - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) does not have sender data but has mail text.", entry); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has mail text.", entry); } if (reward.itemId) { if (!sObjectMgr->GetItemTemplate(reward.itemId)) { - sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId); + sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId); reward.itemId = 0; } } @@ -2543,8 +2543,8 @@ void AchievementGlobalMgr::LoadRewards() } while (result->NextRow()); - sLog->outString(">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void AchievementGlobalMgr::LoadRewardLocales() @@ -2559,8 +2559,8 @@ void AchievementGlobalMgr::LoadRewardLocales() if (!result) { - sLog->outString(">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty"); + return; } @@ -2572,7 +2572,7 @@ void AchievementGlobalMgr::LoadRewardLocales() if (m_achievementRewards.find(entry) == m_achievementRewards.end()) { - sLog->outErrorDb("Table `locales_achievement_reward` (Entry: %u) has locale strings for non-existing achievement reward.", entry); + sLog->outError(LOG_FILTER_SQL, "Table `locales_achievement_reward` (Entry: %u) has locale strings for non-existing achievement reward.", entry); continue; } @@ -2586,6 +2586,6 @@ void AchievementGlobalMgr::LoadRewardLocales() } } while (result->NextRow()); - sLog->outString(">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime)); + } diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp index 528e682e8d4..2d1d02cf5d1 100755 --- a/src/server/game/Addons/AddonMgr.cpp +++ b/src/server/game/Addons/AddonMgr.cpp @@ -43,8 +43,8 @@ void LoadFromDB() QueryResult result = CharacterDatabase.Query("SELECT name, crc FROM addons"); if (!result) { - sLog->outString(">> Loaded 0 known addons. DB table `addons` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 known addons. DB table `addons` is empty!"); + return; } @@ -63,8 +63,8 @@ void LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SaveAddon(AddonInfo const& addon) diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 889f9d6fb75..57ab63cdd16 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -263,8 +263,8 @@ void AuctionHouseMgr::LoadAuctionItems() if (!result) { - sLog->outString(">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!"); + return; } @@ -272,7 +272,6 @@ void AuctionHouseMgr::LoadAuctionItems() do { - Field* fields = result->Fetch(); uint32 item_guid = fields[11].GetUInt32(); @@ -281,7 +280,7 @@ void AuctionHouseMgr::LoadAuctionItems() ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template); if (!proto) { - sLog->outError("AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template); + sLog->outError(LOG_FILTER_GENERAL, "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template); continue; } @@ -297,8 +296,8 @@ void AuctionHouseMgr::LoadAuctionItems() } while (result->NextRow()); - sLog->outString(">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void AuctionHouseMgr::LoadAuctions() @@ -310,8 +309,8 @@ void AuctionHouseMgr::LoadAuctions() if (!result) { - sLog->outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 auctions. DB table `auctionhouse` is empty."); + return; } @@ -336,8 +335,8 @@ void AuctionHouseMgr::LoadAuctions() CharacterDatabase.CommitTransaction(trans); - sLog->outString(">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void AuctionHouseMgr::AddAItem(Item* it) @@ -605,7 +604,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const Item* item = sAuctionMgr->GetAItem(item_guidlow); if (!item) { - sLog->outError("AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow); + sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow); return false; } data << uint32(Id); @@ -688,14 +687,14 @@ bool AuctionEntry::LoadFromDB(Field* fields) CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer); if (!auctioneerData) { - sLog->outError("Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer); + sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer); return false; } CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id); if (!auctioneerInfo) { - sLog->outError("Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id); + sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id); return false; } @@ -703,7 +702,7 @@ bool AuctionEntry::LoadFromDB(Field* fields) auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(factionTemplateId); if (!auctionHouseEntry) { - sLog->outError("Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId); + sLog->outError(LOG_FILTER_GENERAL, "Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId); return false; } @@ -711,7 +710,7 @@ bool AuctionEntry::LoadFromDB(Field* fields) // and item_template in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems) if (!sAuctionMgr->GetAItem(item_guidlow)) { - sLog->outError("Auction %u has not a existing item : %u", Id, item_guidlow); + sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing item : %u", Id, item_guidlow); return false; } return true; @@ -735,8 +734,8 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup() if (!expAuctions) { - sLog->outString(">> No expired auctions to delete"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> No expired auctions to delete"); + return; } @@ -783,8 +782,8 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup() } while (expAuctions->NextRow()); - sLog->outString(">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime)); + } @@ -810,14 +809,14 @@ bool AuctionEntry::LoadFromFieldList(Field* fields) CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer); if (!auctioneerData) { - sLog->outError("AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer); + sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer); return false; } CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id); if (!auctioneerInfo) { - sLog->outError("AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id); + sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id); return false; } @@ -826,7 +825,7 @@ bool AuctionEntry::LoadFromFieldList(Field* fields) if (!auctionHouseEntry) { - sLog->outError("AuctionEntry::LoadFromFieldList() - Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId); + sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId); return false; } diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 89151b6395c..7c6cabe37ba 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -87,7 +87,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string teamName, uin // Add captain as member AddMember(CaptainGuid); - sLog->outArena("New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid); return true; } @@ -125,7 +125,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid) // Check if player is already in a similar arena team if ((player && player->GetArenaTeamId(GetSlot())) || Player::GetArenaTeamIdFromDB(playerGuid, GetType()) != 0) { - sLog->outError("Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType()); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType()); return false; } @@ -184,7 +184,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid) player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1); } - sLog->outArena("Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId()); return true; } @@ -250,7 +250,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result) // Delete member if character information is missing if (newMember.Name.empty()) { - sLog->outErrorDb("ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid)); + sLog->outError(LOG_FILTER_SQL, "ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid)); this->DelMember(newMember.Guid, true); continue; } @@ -297,7 +297,7 @@ void ArenaTeam::SetCaptain(uint64 guid) newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0); char const* oldCaptainName = oldCaptain ? oldCaptain->GetName() : ""; uint32 oldCaptainLowGuid = oldCaptain ? oldCaptain->GetGUIDLow() : 0; - sLog->outArena("Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].", + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].", oldCaptainName, oldCaptainLowGuid, newCaptain->GetName(), newCaptain->GetGUIDLow(), GetId(), GetType()); } } @@ -321,7 +321,7 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb) // delete all info regarding this team for (uint32 i = 0; i < ARENA_TEAM_END; ++i) player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0); - sLog->outArena("Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId()); } // Only used for single member deletion, for arena team disband we use a single query for more efficiency @@ -346,7 +346,7 @@ void ArenaTeam::Disband(WorldSession* session) BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), ""); if (Player* player = session->GetPlayer()) - sLog->outArena("Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId()); } // Update database @@ -507,7 +507,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun data << str1 << str2 << str3; break; default: - sLog->outError("Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount); return; } @@ -529,7 +529,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type) default: break; } - sLog->outError("FATAL: Unknown arena team type %u for some arena team", type); + sLog->outError(LOG_FILTER_BATTLEGROUND, "FATAL: Unknown arena team type %u for some arena team", type); return 0xFF; } diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index 1c24dfc061d..a36be0e7749 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -81,7 +81,7 @@ uint32 ArenaTeamMgr::GenerateArenaTeamId() { if (NextArenaTeamId >= 0xFFFFFFFE) { - sLog->outError("Arena team ids overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Arena team ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return NextArenaTeamId++; @@ -101,8 +101,8 @@ void ArenaTeamMgr::LoadArenaTeams() if (!result) { - sLog->outString(">> Loaded 0 arena teams. DB table `arena_team` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 arena teams. DB table `arena_team` is empty!"); + return; } @@ -132,8 +132,8 @@ void ArenaTeamMgr::LoadArenaTeams() } while (result->NextRow()); - sLog->outString(">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ArenaTeamMgr::DistributeArenaPoints() diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 456915d1ca4..cfb4aec8525 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -440,7 +440,7 @@ inline void Battleground::_ProcessJoin(uint32 diff) if (!FindBgMap()) { - sLog->outError("Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID); EndNow(); return; } @@ -550,7 +550,7 @@ inline void Battleground::_ProcessJoin(uint32 diff) if (dist >= maxDist) { - sLog->outError("BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", plr->GetName(), GetMapId()); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", plr->GetName(), GetMapId()); plr->TeleportTo(GetMapId(), x, y, z, o); } } @@ -588,7 +588,7 @@ inline Player* Battleground::_GetPlayer(uint64 guid, bool offlineRemove, const c { player = ObjectAccessor::FindPlayer(guid); if (!player) - sLog->outError("Battleground::%s: player (GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::%s: player (GUID: %u) not found for BG (map: %u, instance id: %u)!", context, GUID_LOPART(guid), m_MapId, m_InstanceID); } return player; @@ -771,17 +771,17 @@ void Battleground::EndBattleground(uint32 winner) winner_matchmaker_rating = GetArenaMatchmakerRating(winner); winner_matchmaker_change = winner_arena_team->WonAgainst(winner_matchmaker_rating, loser_matchmaker_rating, winner_change); loser_matchmaker_change = loser_arena_team->LostAgainst(loser_matchmaker_rating, winner_matchmaker_rating, loser_change); - sLog->outArena("match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winner_team_rating, winner_change, winner_matchmaker_rating, + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winner_team_rating, winner_change, winner_matchmaker_rating, winner_matchmaker_change, loser_team_rating, loser_change, loser_matchmaker_rating, loser_matchmaker_change); SetArenaMatchmakerRating(winner, winner_matchmaker_rating + winner_matchmaker_change); SetArenaMatchmakerRating(GetOtherTeam(winner), loser_matchmaker_rating + loser_matchmaker_change); SetArenaTeamRatingChangeForTeam(winner, winner_change); SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change); - sLog->outArena("Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE], winner_arena_team->GetId(), winner_change, loser_change); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE], winner_arena_team->GetId(), winner_change, loser_change); if (sWorld->getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO)) for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(itr->first)) - sLog->outArena("Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows", m_ArenaType, player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows", m_ArenaType, player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows); } // Deduct 16 points from each teams arena-rating if there are no winners after 45+2 minutes else @@ -1055,7 +1055,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac if (Transport) player->TeleportToBGEntryPoint(); - sLog->outDetail("BATTLEGROUND: Removed player %s from Battleground.", player->GetName()); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Removed player %s from Battleground.", player->GetName()); } //battleground object will be deleted next Battleground::Update() call @@ -1075,7 +1075,7 @@ void Battleground::Reset() m_Events = 0; if (m_InvitedAlliance > 0 || m_InvitedHorde > 0) - sLog->outError("Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!", m_InvitedAlliance, m_InvitedHorde, m_MapId, m_InstanceID); m_InvitedAlliance = 0; @@ -1103,7 +1103,7 @@ void Battleground::StartBattleground() // and it doesn't matter if we call StartBattleground() more times, because m_Battlegrounds is a map and instance id never changes sBattlegroundMgr->AddBattleground(GetInstanceID(), GetTypeID(), this); if (m_IsRated) - sLog->outArena("Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE]); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE]); } void Battleground::AddPlayer(Player* player) @@ -1194,7 +1194,7 @@ void Battleground::AddPlayer(Player* player) AddOrSetPlayerToCorrectBgGroup(player, team); // Log - sLog->outDetail("BATTLEGROUND: Player %s joined the battle.", player->GetName()); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Player %s joined the battle.", player->GetName()); } // this method adds player to his team's bg group, or sets his correct group if player is already in bg group @@ -1392,7 +1392,7 @@ void Battleground::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, itr->second->HealingDone += value; break; default: - sLog->outError("Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!", type, m_MapId, m_InstanceID); break; } @@ -1441,9 +1441,9 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, GetBgMap(), PHASEMASK_NORMAL, x, y, z, o, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY)) { - sLog->outErrorDb("Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_SQL, "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!", entry, m_MapId, m_InstanceID); - sLog->outError("Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!", entry, m_MapId, m_InstanceID); delete go; return false; @@ -1494,7 +1494,7 @@ void Battleground::DoorClose(uint32 type) } } else - sLog->outError("Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID); } @@ -1506,7 +1506,7 @@ void Battleground::DoorOpen(uint32 type) obj->SetGoState(GO_STATE_ACTIVE); } else - sLog->outError("Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID); } @@ -1514,7 +1514,7 @@ GameObject* Battleground::GetBGObject(uint32 type) { GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]); if (!obj) - sLog->outError("Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID); return obj; } @@ -1523,7 +1523,7 @@ Creature* Battleground::GetBGCreature(uint32 type) { Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]); if (!creature) - sLog->outError("Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID); return creature; } @@ -1556,7 +1556,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f Creature* creature = new Creature; if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o)) { - sLog->outError("Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!", entry, m_MapId, m_InstanceID); delete creature; return NULL; @@ -1567,7 +1567,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry); if (!cinfo) { - sLog->outError("Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!", entry, m_MapId, m_InstanceID); delete creature; return NULL; @@ -1602,7 +1602,7 @@ bool Battleground::DelCreature(uint32 type) return true; } - sLog->outError("Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID); BgCreatures[type] = 0; return false; @@ -1620,7 +1620,7 @@ bool Battleground::DelObject(uint32 type) BgObjects[type] = 0; return true; } - sLog->outError("Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID); BgObjects[type] = 0; return false; @@ -1646,7 +1646,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float //creature->CastSpell(creature, SPELL_SPIRIT_HEAL_CHANNEL, true); return true; } - sLog->outError("Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!", type, entry, m_MapId, m_InstanceID); EndNow(); return false; @@ -1745,7 +1745,7 @@ void Battleground::HandleTriggerBuff(uint64 go_guid) index--; if (index < 0) { - sLog->outError("Battleground::HandleTriggerBuff: cannot find buff gameobject (GUID: %u, entry: %u, type: %u) in internal data for BG (map: %u, instance id: %u)!", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::HandleTriggerBuff: cannot find buff gameobject (GUID: %u, entry: %u, type: %u) in internal data for BG (map: %u, instance id: %u)!", GUID_LOPART(go_guid), obj->GetEntry(), obj->GetGoType(), m_MapId, m_InstanceID); return; } @@ -1869,7 +1869,7 @@ int32 Battleground::GetObjectType(uint64 guid) for (uint32 i = 0; i < BgObjects.size(); ++i) if (BgObjects[i] == guid) return i; - sLog->outError("Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?", + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?", GUID_LOPART(guid), m_MapId, m_InstanceID); return -1; } diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 2b2265dad84..b2615d3e54c 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -226,7 +226,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battlegro *data << uint8(uiFrame); break; default: - sLog->outError("Unknown BG status!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Unknown BG status!"); break; } } @@ -281,7 +281,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg) itr2 = itr++; if (!bg->IsPlayerInBattleground(itr2->first)) { - sLog->outError("Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true)); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true)); continue; } @@ -391,7 +391,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg) // should never happen if (++scoreCount >= bg->GetMaxPlayers() && itr != bg->GetPlayerScoresEnd()) { - sLog->outError("Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bg->GetTypeID(true), bg->GetPlayerScoresSize(), bg->GetMaxPlayers()); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bg->GetTypeID(true), bg->GetPlayerScoresSize(), bg->GetMaxPlayers()); break; } } @@ -508,7 +508,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId if (!bg_template) { - sLog->outError("Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId); return NULL; } bool isRandom = false; @@ -550,7 +550,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId bg_template = GetBattlegroundTemplate(bgTypeId); if (!bg_template) { - sLog->outError("Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId); return NULL; } } @@ -683,8 +683,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds() if (!result) { - sLog->outErrorDb(">> Loaded 0 battlegrounds. DB table `battleground_template` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty."); + return; } @@ -702,7 +702,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() bl = sBattlemasterListStore.LookupEntry(bgTypeID_); if (!bl) { - sLog->outError("Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeID_); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeID_); continue; } @@ -717,14 +717,14 @@ void BattlegroundMgr::CreateInitialBattlegrounds() // check values from DB if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam) { - sLog->outErrorDb("Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)", + sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)", data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam); continue; } if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax) { - sLog->outErrorDb("Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)", + sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)", data.bgTypeId, data.LevelMin, data.LevelMax); continue; } @@ -746,7 +746,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() } else { - sLog->outErrorDb("Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId); + sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId); continue; } @@ -767,7 +767,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() } else { - sLog->outErrorDb("Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId); + sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId); continue; } @@ -792,8 +792,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds() } while (result->NextRow()); - sLog->outString(">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void BattlegroundMgr::InitAutomaticArenaPointDistribution() @@ -890,12 +890,12 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt team = player->GetTeam(); bg->GetTeamStartLoc(team, x, y, z, O); - sLog->outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", player->GetName(), mapid, x, y, z, O); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", player->GetName(), mapid, x, y, z, O); player->TeleportTo(mapid, x, y, z, O); } else { - sLog->outError("player %u is trying to port to non-existent bg instance %u", player->GetGUIDLow(), instanceId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "player %u is trying to port to non-existent bg instance %u", player->GetGUIDLow(), instanceId); } } @@ -1077,8 +1077,8 @@ void BattlegroundMgr::LoadBattleMastersEntry() if (!result) { - sLog->outString(">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!"); + return; } @@ -1094,7 +1094,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() uint32 bgTypeId = fields[1].GetUInt32(); if (!sBattlemasterListStore.LookupEntry(bgTypeId)) { - sLog->outErrorDb("Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId); + sLog->outError(LOG_FILTER_SQL, "Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId); continue; } @@ -1102,8 +1102,8 @@ void BattlegroundMgr::LoadBattleMastersEntry() } while (result->NextRow()); - sLog->outString(">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId) diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 6f4264c0faf..85d41977d13 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -294,7 +294,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) itr = m_QueuedPlayers.find(guid); if (itr == m_QueuedPlayers.end()) { - sLog->outError("BattlegroundQueue: couldn't find player to remove GUID: %u", GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: couldn't find player to remove GUID: %u", GUID_LOPART(guid)); return; } @@ -328,7 +328,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) //player can't be in queue without group, but just in case if (bracket_id == -1) { - sLog->outError("BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid)); return; } sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id); @@ -780,14 +780,14 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp Battleground* bg_template = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId); if (!bg_template) { - sLog->outError("Battleground: Update: bg template not found for %u", bgTypeId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: Update: bg template not found for %u", bgTypeId); return; } PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id); if (!bracketEntry) { - sLog->outError("Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id); return; } @@ -838,7 +838,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, 0, false); if (!bg2) { - sLog->outError("BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId); return; } //invite those selection pools @@ -864,7 +864,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, false); if (!bg2) { - sLog->outError("BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId); return; } @@ -962,7 +962,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp Battleground* arena = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, true); if (!arena) { - sLog->outError("BattlegroundQueue::Update couldn't create arena instance for rated arena match!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update couldn't create arena instance for rated arena match!"); return; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index d28f5ddfe6a..8b2543f20ff 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -238,7 +238,7 @@ void BattlegroundAB::HandleAreaTrigger(Player* Source, uint32 Trigger) case 4021: // Unk2 //break; default: - //sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + //sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); //Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -356,7 +356,7 @@ void BattlegroundAB::_SendNodeUpdate(uint8 node) void BattlegroundAB::_NodeOccupied(uint8 node, Team team) { if (!AddSpiritGuide(node, BG_AB_SpiritGuidePos[node][0], BG_AB_SpiritGuidePos[node][1], BG_AB_SpiritGuidePos[node][2], BG_AB_SpiritGuidePos[node][3], team)) - sLog->outError("Failed to spawn spirit guide! point: %u, team: %u, ", node, team); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Failed to spawn spirit guide! point: %u, team: %u, ", node, team); uint8 capturedNodes = 0; for (uint8 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) @@ -561,7 +561,7 @@ bool BattlegroundAB::SetupBattleground() || !AddObject(BG_AB_OBJECT_AURA_CONTESTED + 8*i, BG_AB_OBJECTID_AURA_C, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, sin(BG_AB_NodePositions[i][3]/2), cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY) ) { - sLog->outErrorDb("BatteGroundAB: Failed to spawn some object Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn some object Battleground not created!"); return false; } } @@ -569,7 +569,7 @@ bool BattlegroundAB::SetupBattleground() || !AddObject(BG_AB_OBJECT_GATE_H, BG_AB_OBJECTID_GATE_H, BG_AB_DoorPositions[1][0], BG_AB_DoorPositions[1][1], BG_AB_DoorPositions[1][2], BG_AB_DoorPositions[1][3], BG_AB_DoorPositions[1][4], BG_AB_DoorPositions[1][5], BG_AB_DoorPositions[1][6], BG_AB_DoorPositions[1][7], RESPAWN_IMMEDIATELY) ) { - sLog->outErrorDb("BatteGroundAB: Failed to spawn door object Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn door object Battleground not created!"); return false; } //buffs @@ -579,7 +579,7 @@ bool BattlegroundAB::SetupBattleground() || !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 1, Buff_Entries[1], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3]/2), cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY) || !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3]/2), cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY) ) - sLog->outErrorDb("BatteGroundAB: Failed to spawn buff object!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn buff object!"); } return true; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index d2cbab2be54..96fa899a746 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -93,7 +93,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer) { if (!m_CaptainAlive[0]) { - sLog->outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\""); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Killed a Captain twice, please report this bug, if you haven't done \".respawn\""); return; } m_CaptainAlive[0]=false; @@ -112,7 +112,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer) { if (!m_CaptainAlive[1]) { - sLog->outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\""); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Killed a Captain twice, please report this bug, if you haven't done \".respawn\""); return; } m_CaptainAlive[1]=false; @@ -480,7 +480,7 @@ void BattlegroundAV::RemovePlayer(Player* player, uint64 /*guid*/, uint32 /*team { if (!player) { - sLog->outError("bg_AV no player at remove"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "bg_AV no player at remove"); return; } //TODO search more buffs @@ -588,7 +588,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node) if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp]) DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp); else - sLog->outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp); //spawn destroyed aura for (uint8 i=0; i <= 9; i++) SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10), RESPAWN_IMMEDIATELY); @@ -753,7 +753,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node) if (BgCreatures[node]) DelCreature(node); if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], owner)) - sLog->outError("AV: couldn't spawn spiritguide at node %i", node); + sLog->outError(LOG_FILTER_BATTLEGROUND, "AV: couldn't spawn spiritguide at node %i", node); } for (uint8 i=0; i<4; i++) @@ -811,7 +811,7 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object) return BG_AV_Nodes(object - 29); if (object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE) return BG_AV_NODES_SNOWFALL_GRAVE; - sLog->outError("BattlegroundAV: ERROR! GetPlace got a wrong object :("); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundAV: ERROR! GetPlace got a wrong object :("); ASSERT(false); return BG_AV_Nodes(0); } @@ -849,7 +849,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node) } else if (m_Nodes[node].Owner == AV_NEUTRAL_TEAM) return BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE; - sLog->outError("BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node); ASSERT(false); return 0; } @@ -903,7 +903,7 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object) sLog->outDebug(LOG_FILTER_BATTLEGROUND, "player defends point object: %i node: %i", object, node); if (m_Nodes[node].PrevOwner != team) { - sLog->outError("BG_AV: player defends point which doesn't belong to his team %i", node); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_AV: player defends point which doesn't belong to his team %i", node); return; } @@ -1124,7 +1124,7 @@ uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used if (state == POINT_ASSAULTED) return 3; } - sLog->outError("BG_AV: should update a strange worldstate state:%i team:%i", state, team); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_AV: should update a strange worldstate state:%i team:%i", state, team); return 5; //this will crash the game, but i want to know if something is wrong here } @@ -1203,7 +1203,7 @@ bool BattlegroundAV::SetupBattleground() // horde gates || !AddObject(BG_AV_OBJECT_DOOR_H, BG_AV_OBJECTID_GATE_H, BG_AV_DoorPositons[1][0], BG_AV_DoorPositons[1][1], BG_AV_DoorPositons[1][2], BG_AV_DoorPositons[1][3], 0, 0, sin(BG_AV_DoorPositons[1][3]/2), cos(BG_AV_DoorPositons[1][3]/2), RESPAWN_IMMEDIATELY)) { - sLog->outErrorDb("BatteGroundAV: Failed to spawn some object Battleground not created!1"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundAV: Failed to spawn some object Battleground not created!1"); return false; } @@ -1221,7 +1221,7 @@ bool BattlegroundAV::SetupBattleground() || !AddObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+i*3, BG_AV_OBJECTID_AURA_A, BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3]/2), cos(BG_AV_ObjectPos[i][3]/2), RESPAWN_ONE_DAY) || !AddObject(BG_AV_OBJECT_AURA_H_FIRSTAID_STATION+i*3, BG_AV_OBJECTID_AURA_H, BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3]/2), cos(BG_AV_ObjectPos[i][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!2"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!2"); return false; } } @@ -1236,7 +1236,7 @@ bool BattlegroundAV::SetupBattleground() || !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_A, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY) || !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_PH, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!3"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!3"); return false; } } @@ -1249,7 +1249,7 @@ bool BattlegroundAV::SetupBattleground() || !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_PA, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY) || !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_H, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!4"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!4"); return false; } } @@ -1257,7 +1257,7 @@ bool BattlegroundAV::SetupBattleground() { if (!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i); return false; } } @@ -1271,7 +1271,7 @@ bool BattlegroundAV::SetupBattleground() { if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+(i*10)+j, BG_AV_OBJECTID_SMOKE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i); return false; } } @@ -1279,7 +1279,7 @@ bool BattlegroundAV::SetupBattleground() { if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+(i*10)+j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i); return false; } } @@ -1289,7 +1289,7 @@ bool BattlegroundAV::SetupBattleground() { if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN+i, BG_AV_OBJECTID_MINE_N, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i); return false; } } @@ -1297,14 +1297,14 @@ bool BattlegroundAV::SetupBattleground() { if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN+i, BG_AV_OBJECTID_MINE_S, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i); return false; } } if (!AddObject(BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE, BG_AV_OBJECTID_BANNER_SNOWFALL_N, BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][0], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][1], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][2], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3], 0, 0, sin(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!8"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!8"); return false; } for (uint8 i = 0; i < 4; i++) @@ -1314,7 +1314,7 @@ bool BattlegroundAV::SetupBattleground() || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H+i, BG_AV_OBJECTID_SNOWFALL_CANDY_H, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY) || !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)) { - sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i); return false; } } @@ -1402,7 +1402,7 @@ const char* BattlegroundAV::GetNodeName(BG_AV_Nodes node) case BG_AV_NODES_FROSTWOLF_WTOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_FROST_W); case BG_AV_NODES_FROSTWOLF_HUT: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_FROST_HUT); default: - sLog->outError("tried to get name for node %u", node); + sLog->outError(LOG_FILTER_BATTLEGROUND, "tried to get name for node %u", node); break; } @@ -1413,22 +1413,22 @@ void BattlegroundAV::AssaultNode(BG_AV_Nodes node, uint16 team) { if (m_Nodes[node].TotalOwner == team) { - sLog->outCrash("Assaulting team is TotalOwner of node"); + sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Assaulting team is TotalOwner of node"); ASSERT (false); } if (m_Nodes[node].Owner == team) { - sLog->outCrash("Assaulting team is owner of node"); + sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Assaulting team is owner of node"); ASSERT (false); } if (m_Nodes[node].State == POINT_DESTROYED) { - sLog->outCrash("Destroyed node is being assaulted"); + sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Destroyed node is being assaulted"); ASSERT (false); } if (m_Nodes[node].State == POINT_ASSAULTED && m_Nodes[node].TotalOwner) //only assault an assaulted node if no totalowner exists { - sLog->outCrash("Assault on an not assaulted node with total owner"); + sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Assault on an not assaulted node with total owner"); ASSERT (false); } //the timer gets another time, if the previous owner was 0 == Neutral diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp index c7eddbb67a9..78cf6b9863f 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp @@ -89,7 +89,7 @@ void BattlegroundBE::HandleKillPlayer(Player* player, Player* killer) if (!killer) { - sLog->outError("Killer player not found"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Killer player not found"); return; } @@ -122,7 +122,7 @@ void BattlegroundBE::HandleAreaTrigger(Player* Source, uint32 Trigger) //buff_guid = BgObjects[BG_BE_OBJECT_BUFF_2]; break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -154,7 +154,7 @@ bool BattlegroundBE::SetupBattleground() || !AddObject(BG_BE_OBJECT_BUFF_1, BG_BE_OBJECT_TYPE_BUFF_1, 6249.042f, 275.3239f, 11.22033f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120) || !AddObject(BG_BE_OBJECT_BUFF_2, BG_BE_OBJECT_TYPE_BUFF_2, 6228.26f, 249.566f, 11.21812f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120)) { - sLog->outErrorDb("BatteGroundBE: Failed to spawn some object!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundBE: Failed to spawn some object!"); return false; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp index ccc6a2305b4..20eba2a7f67 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -171,7 +171,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer) if (!killer) { - sLog->outError("BattlegroundDS: Killer player not found"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundDS: Killer player not found"); return; } @@ -200,7 +200,7 @@ void BattlegroundDS::HandleAreaTrigger(Player* Source, uint32 Trigger) setPipeKnockBackCount(0); break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -240,7 +240,7 @@ bool BattlegroundDS::SetupBattleground() || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_1, 0, 1369.977f, 817.2882f, 16.08718f, 3.106686f, RESPAWN_IMMEDIATELY) || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_2, 0, 1212.833f, 765.3871f, 16.09484f, 0.0f, RESPAWN_IMMEDIATELY)) { - sLog->outErrorDb("BatteGroundDS: Failed to spawn some object!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundDS: Failed to spawn some object!"); return false; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index 8269a04a383..9bab15d9b5e 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -153,7 +153,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint() Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]); if (!player) { - sLog->outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j])); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j])); ++j; continue; } @@ -193,7 +193,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint() Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]); if (!player) { - sLog->outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j])); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j])); //move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]); m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j); @@ -411,7 +411,7 @@ void BattlegroundEY::HandleAreaTrigger(Player* Source, uint32 Trigger) case 5866: break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -474,7 +474,7 @@ bool BattlegroundEY::SetupBattleground() || !AddObject(BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER, BG_OBJECT_HU_TOWER_CAP_EY_ENTRY, 2282.121582f, 1760.006958f, 1189.707153f, 1.919862f, 0, 0, 0.819152f, 0.573576f, RESPAWN_ONE_DAY) ) { - sLog->outErrorDb("BatteGroundEY: Failed to spawn some object Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn some object Battleground not created!"); return false; } @@ -484,28 +484,28 @@ bool BattlegroundEY::SetupBattleground() AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(m_Points_Trigger[i]); if (!at) { - sLog->outError("BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]); continue; } if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY) ) - sLog->outError("BattlegroundEY: Cannot spawn buff"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Cannot spawn buff"); } WorldSafeLocsEntry const* sg = NULL; sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE); if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE)) { - sLog->outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!"); return false; } sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_HORDE); if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE)) { - sLog->outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!"); return false; } @@ -570,7 +570,7 @@ void BattlegroundEY::RespawnFlagAfterDrop() if (obj) obj->Delete(); else - sLog->outError("BattlegroundEY: Unknown dropped flag guid: %u", GUID_LOPART(GetDroppedFlagGUID())); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Unknown dropped flag guid: %u", GUID_LOPART(GetDroppedFlagGUID())); SetDroppedFlagGUID(0); } @@ -742,7 +742,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* Source, uint32 Point) WorldSafeLocsEntry const* sg = NULL; sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId); if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team)) - sLog->outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u", + sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u", Point, Team, m_CapturingPointTypes[Point].GraveYardId); // SpawnBGCreature(Point, RESPAWN_IMMEDIATELY); @@ -894,7 +894,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player) if (!entry) { - sLog->outError("BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!"); return NULL; } @@ -911,7 +911,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player) { entry = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[i].GraveYardId); if (!entry) - sLog->outError("BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId); else { distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index ccc9493e234..202869567d8 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -275,7 +275,7 @@ void BattlegroundIC::StartingEventOpenDoors() BG_IC_Teleporters[i].x, BG_IC_Teleporters[i].y, BG_IC_Teleporters[i].z, BG_IC_Teleporters[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY)) - sLog->outError("Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry); } } @@ -372,7 +372,7 @@ bool BattlegroundIC::SetupBattleground() BG_IC_ObjSpawnlocs[i].z, BG_IC_ObjSpawnlocs[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY)) { - sLog->outError("Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry); return false; } } @@ -384,7 +384,7 @@ bool BattlegroundIC::SetupBattleground() BG_IC_NpcSpawnlocs[i].z, BG_IC_NpcSpawnlocs[i].o, RESPAWN_ONE_DAY)) { - sLog->outError("Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry); return false; } } @@ -394,7 +394,7 @@ bool BattlegroundIC::SetupBattleground() || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+3, BG_IC_SpiritGuidePos[7][0], BG_IC_SpiritGuidePos[7][1], BG_IC_SpiritGuidePos[7][2], BG_IC_SpiritGuidePos[7][3], ALLIANCE) || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+4, BG_IC_SpiritGuidePos[8][0], BG_IC_SpiritGuidePos[8][1], BG_IC_SpiritGuidePos[8][2], BG_IC_SpiritGuidePos[8][3], HORDE)) { - sLog->outError("Isle of Conquest: Failed to spawn initial spirit guide!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: Failed to spawn initial spirit guide!"); return false; } @@ -403,7 +403,7 @@ bool BattlegroundIC::SetupBattleground() if (!gunshipAlliance || !gunshipHorde) { - sLog->outError("Isle of Conquest: There was an error creating gunships!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error creating gunships!"); return false; } @@ -615,7 +615,7 @@ uint32 BattlegroundIC::GetNextBanner(ICNodePoint* nodePoint, uint32 team, bool r return nodePoint->last_entry; // we should never be here... - sLog->outError("Isle Of Conquest: Unexpected return in GetNextBanner function"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle Of Conquest: Unexpected return in GetNextBanner function"); return 0; } @@ -639,7 +639,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture) BG_IC_SpiritGuidePos[nodePoint->nodeType][0], BG_IC_SpiritGuidePos[nodePoint->nodeType][1], BG_IC_SpiritGuidePos[nodePoint->nodeType][2], BG_IC_SpiritGuidePos[nodePoint->nodeType][3], (nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE))) - sLog->outError("Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction); } switch (nodePoint->gameobject_type) @@ -658,7 +658,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture) 0, 0, 0, 0, RESPAWN_ONE_DAY); } - //sLog->outError("BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction); + //sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction); (nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->BuildStartMovePacket(GetBgMap()); (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->BuildStopMovePacket(GetBgMap()); @@ -908,7 +908,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period) if (!goinfo) { - sLog->outErrorDb("Transport ID: %u will not be loaded, gameobject_template missing", goEntry); + sLog->outError(LOG_FILTER_SQL, "Transport ID: %u will not be loaded, gameobject_template missing", goEntry); delete t; return NULL; } @@ -918,7 +918,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period) if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed)) // skip transports with empty waypoints list { - sLog->outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId); + sLog->outError(LOG_FILTER_SQL, "Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId); delete t; return NULL; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp index 0974c96a991..f39b1ba5540 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp @@ -86,7 +86,7 @@ void BattlegroundNA::HandleKillPlayer(Player* player, Player* killer) if (!killer) { - sLog->outError("BattlegroundNA: Killer player not found"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundNA: Killer player not found"); return; } @@ -115,7 +115,7 @@ void BattlegroundNA::HandleAreaTrigger(Player* Source, uint32 Trigger) case 4537: // buff trigger? break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -147,7 +147,7 @@ bool BattlegroundNA::SetupBattleground() || !AddObject(BG_NA_OBJECT_BUFF_1, BG_NA_OBJECT_TYPE_BUFF_1, 4009.189941f, 2895.250000f, 13.052700f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120) || !AddObject(BG_NA_OBJECT_BUFF_2, BG_NA_OBJECT_TYPE_BUFF_2, 4103.330078f, 2946.350098f, 13.051300f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120)) { - sLog->outErrorDb("BatteGroundNA: Failed to spawn some object!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundNA: Failed to spawn some object!"); return false; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp index 6a626217a4e..7fa9980a77c 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp @@ -86,7 +86,7 @@ void BattlegroundRL::HandleKillPlayer(Player* player, Player* killer) if (!killer) { - sLog->outError("Killer player not found"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "Killer player not found"); return; } @@ -116,7 +116,7 @@ void BattlegroundRL::HandleAreaTrigger(Player* Source, uint32 Trigger) case 4697: // buff trigger? break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -146,7 +146,7 @@ bool BattlegroundRL::SetupBattleground() || !AddObject(BG_RL_OBJECT_BUFF_1, BG_RL_OBJECT_TYPE_BUFF_1, 1328.719971f, 1632.719971f, 36.730400f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120) || !AddObject(BG_RL_OBJECT_BUFF_2, BG_RL_OBJECT_TYPE_BUFF_2, 1243.300049f, 1699.170044f, 34.872601f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120)) { - sLog->outErrorDb("BatteGroundRL: Failed to spawn some object!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundRL: Failed to spawn some object!"); return false; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 6869a899305..561cac54025 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -130,7 +130,7 @@ void BattlegroundRV::HandleKillPlayer(Player* player, Player* killer) if (!killer) { - sLog->outError("BattlegroundRV: Killer player not found"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundRV: Killer player not found"); return; } @@ -162,7 +162,7 @@ void BattlegroundRV::HandleAreaTrigger(Player* Source, uint32 Trigger) case 5474: break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -214,7 +214,7 @@ bool BattlegroundRV::SetupBattleground() ) { - sLog->outErrorDb("BatteGroundRV: Failed to spawn some object!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundRV: Failed to spawn some object!"); return false; } return true; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index d15c7943bab..58f7cabc72d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -162,7 +162,7 @@ bool BattlegroundSA::ResetObjs() if (!sg) { - sLog->outError("SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]); + sLog->outError(LOG_FILTER_BATTLEGROUND, "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]); return false; } @@ -175,7 +175,7 @@ bool BattlegroundSA::ResetObjs() { GraveyardStatus[i] = ((Attackers == TEAM_HORDE)? TEAM_ALLIANCE : TEAM_HORDE); if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((Attackers == TEAM_HORDE)? ALLIANCE : HORDE))) - sLog->outError("SOTA: couldn't spawn GY: %u", i); + sLog->outError(LOG_FILTER_BATTLEGROUND, "SOTA: couldn't spawn GY: %u", i); } } @@ -725,7 +725,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); if (!sg) { - sLog->outError("BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]); return; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index d100dc645a2..483e8ffdaf6 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -251,7 +251,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team) if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team))) obj->Delete(); else - sLog->outError("unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team))); + sLog->outError(LOG_FILTER_BATTLEGROUND, "unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team))); SetDroppedFlagGUID(0, team); _bothFlagsKept = false; @@ -557,7 +557,7 @@ void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/) { if (!player) { - sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundWS: Removing offline player who has the FLAG!!"); this->SetAllianceFlagPicker(0); this->RespawnFlag(ALLIANCE, false); } @@ -568,7 +568,7 @@ void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/) { if (!player) { - sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!"); + sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundWS: Removing offline player who has the FLAG!!"); this->SetHordeFlagPicker(0); this->RespawnFlag(HORDE, false); } @@ -637,7 +637,7 @@ void BattlegroundWS::HandleAreaTrigger(Player* Source, uint32 Trigger) case 4629: // unk4 break; default: - sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -672,21 +672,21 @@ bool BattlegroundWS::SetupBattleground() || !AddObject(BG_WS_OBJECT_DOOR_H_4, BG_OBJECT_DOOR_H_4_WS_ENTRY, 950.7952f, 1459.583f, 342.1523f, 0.05235988f, 0, 0, 0.02617695f, 0.9996573f, RESPAWN_IMMEDIATELY) ) { - sLog->outErrorDb("BatteGroundWS: Failed to spawn some object Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn some object Battleground not created!"); return false; } WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE); if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE)) { - sLog->outErrorDb("BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!"); return false; } sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE); if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE)) { - sLog->outErrorDb("BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!"); + sLog->outError(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!"); return false; } diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index 62bc0ab3205..80de42c0ce2 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -99,7 +99,7 @@ CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId) if (itr != _invites.end()) return &(itr->second); - sLog->outError("CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId); return NULL; } @@ -109,7 +109,7 @@ CalendarEvent* CalendarMgr::GetEvent(uint64 eventId) if (itr != _events.end()) return &(itr->second); - sLog->outError("CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId); return NULL; } @@ -149,7 +149,7 @@ void CalendarMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u calendar events", count); + sLog->outInfo(LOG_FILTER_CALENDAR, ">> Loaded %u calendar events", count); count = 0; // 0 1 2 3 4 5 6 7 @@ -176,7 +176,7 @@ void CalendarMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u calendar Invites", count); + sLog->outInfo(LOG_FILTER_CALENDAR, ">> Loaded %u calendar Invites", count); */ } @@ -442,7 +442,7 @@ bool CalendarMgr::AddEvent(CalendarEvent const& newEvent) uint64 eventId = newEvent.GetEventId(); if (_events.find(eventId) != _events.end()) { - sLog->outError("CalendarMgr::AddEvent: Event [" UI64FMTD "] exists", eventId); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddEvent: Event [" UI64FMTD "] exists", eventId); return false; } @@ -455,7 +455,7 @@ bool CalendarMgr::RemoveEvent(uint64 eventId) CalendarEventMap::iterator itr = _events.find(eventId); if (itr == _events.end()) { - sLog->outError("CalendarMgr::RemoveEvent: Event [" UI64FMTD "] does not exist", eventId); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::RemoveEvent: Event [" UI64FMTD "] does not exist", eventId); return false; } @@ -494,13 +494,13 @@ bool CalendarMgr::AddInvite(CalendarInvite const& newInvite) uint64 inviteId = newInvite.GetInviteId(); if (!inviteId) { - sLog->outError("CalendarMgr::AddInvite: Cant add Invite 0"); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddInvite: Cant add Invite 0"); return false; } if (_invites.find(inviteId) != _invites.end()) { - sLog->outError("CalendarMgr::AddInvite: Invite [" UI64FMTD "] exists", inviteId); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddInvite: Invite [" UI64FMTD "] exists", inviteId); return false; } @@ -516,7 +516,7 @@ uint64 CalendarMgr::RemoveInvite(uint64 inviteId) CalendarInviteMap::iterator itr = _invites.find(inviteId); if (itr == _invites.end()) { - sLog->outError("CalendarMgr::RemoveInvite: Invite [" UI64FMTD "] does not exist", inviteId); + sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::RemoveInvite: Invite [" UI64FMTD "] does not exist", inviteId); return 0; } diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 0e89601e987..c3845f16826 100755 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -36,13 +36,13 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) m_flags |= CHANNEL_FLAG_GENERAL; // for all built-in channels - if (ch->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel + if (ch->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel m_flags |= CHANNEL_FLAG_TRADE; - if (ch->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels + if (ch->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels m_flags |= CHANNEL_FLAG_CITY; - if (ch->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel + if (ch->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel m_flags |= CHANNEL_FLAG_LFG; else // for all other channels m_flags |= CHANNEL_FLAG_NOT_LFG; diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h index ac030ffb73f..887e53f49a5 100755 --- a/src/server/game/Chat/Channels/ChannelMgr.h +++ b/src/server/game/Chat/Channels/ChannelMgr.h @@ -49,4 +49,3 @@ class HordeChannelMgr : public ChannelMgr {}; ChannelMgr* channelMgr(uint32 team); #endif - diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 32a6273abd4..b5bad419c98 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -401,12 +401,12 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, const char* text, // expected subcommand by full name DB content else if (*text) { - sLog->outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str()); + sLog->outError(LOG_FILTER_SQL, "Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str()); return false; } if (table[i].SecurityLevel != security) - sLog->outDetail("Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security); + sLog->outInfo(LOG_FILTER_GENERAL, "Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security); table[i].SecurityLevel = security; table[i].Help = help; @@ -417,9 +417,9 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, const char* text, if (!cmd.empty()) { if (table == getCommandTable()) - sLog->outErrorDb("Table `command` have not existed command '%s', skip.", cmd.c_str()); + sLog->outError(LOG_FILTER_SQL, "Table `command` have not existed command '%s', skip.", cmd.c_str()); else - sLog->outErrorDb("Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str()); + sLog->outError(LOG_FILTER_SQL, "Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str()); } return false; diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h index 8a49d230161..b8991d8faf8 100755 --- a/src/server/game/Combat/HostileRefManager.h +++ b/src/server/game/Combat/HostileRefManager.h @@ -71,4 +71,3 @@ class HostileRefManager : public RefManager }; //================================================= #endif - diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 0c43c9ece0e..87853a53b6c 100755 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -194,7 +194,6 @@ void HostileReference::updateOnlineStatus() } else accessible = true; - } setAccessibleState(accessible); setOnlineOfflineState(online); diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h index 39c79b8273a..de60491de89 100755 --- a/src/server/game/Combat/UnitEvents.h +++ b/src/server/game/Combat/UnitEvents.h @@ -77,7 +77,6 @@ class UnitBaseEvent bool matchesTypeMask(uint32 pMask) const { return iType & pMask; } void setType(uint32 pType) { iType = pType; } - }; //============================================================== @@ -134,4 +133,3 @@ class ThreatManagerEvent : public ThreatRefStatusChangeEvent //============================================================== #endif - diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 9f534ab697d..e6acefcce48 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -16,7 +16,6 @@ * with this program. If not, see . */ - #include "Player.h" #include "SpellAuras.h" #include "SpellMgr.h" @@ -686,7 +685,7 @@ void ConditionMgr::LoadConditions(bool isReload) //must clear all custom handled cases (groupped types) before reload if (isReload) { - sLog->outString("Reseting Loot Conditions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Reseting Loot Conditions..."); LootTemplates_Creature.ResetConditions(); LootTemplates_Fishing.ResetConditions(); LootTemplates_Gameobject.ResetConditions(); @@ -700,10 +699,10 @@ void ConditionMgr::LoadConditions(bool isReload) LootTemplates_Prospecting.ResetConditions(); LootTemplates_Spell.ResetConditions(); - sLog->outString("Re-Loading `gossip_menu` Table for Conditions!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu` Table for Conditions!"); sObjectMgr->LoadGossipMenu(); - sLog->outString("Re-Loading `gossip_menu_option` Table for Conditions!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu_option` Table for Conditions!"); sObjectMgr->LoadGossipMenuItems(); sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists(); } @@ -713,8 +712,8 @@ void ConditionMgr::LoadConditions(bool isReload) if (!result) { - sLog->outErrorDb(">> Loaded 0 conditions. DB table `conditions` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 conditions. DB table `conditions` is empty!"); + return; } @@ -722,7 +721,6 @@ void ConditionMgr::LoadConditions(bool isReload) do { - Field* fields = result->Fetch(); Condition* cond = new Condition(); @@ -750,7 +748,7 @@ void ConditionMgr::LoadConditions(bool isReload) { if (iConditionTypeOrReference == iSourceTypeOrReferenceId)//self referencing, skip { - sLog->outErrorDb("Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId); + sLog->outError(LOG_FILTER_SQL, "Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId); delete cond; continue; } @@ -761,19 +759,19 @@ void ConditionMgr::LoadConditions(bool isReload) rowType = "reference"; //check for useless data if (cond->ConditionTarget) - sLog->outErrorDb("Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget); if (cond->ConditionValue1) - sLog->outErrorDb("Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1); if (cond->ConditionValue2) - sLog->outErrorDb("Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3); if (cond->NegativeCondition) - sLog->outErrorDb("Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition); if (cond->SourceGroup && iSourceTypeOrReferenceId < 0) - sLog->outErrorDb("Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup); if (cond->SourceEntry && iSourceTypeOrReferenceId < 0) - sLog->outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry); } else if (!isConditionTypeValid(cond))//doesn't have reference, validate ConditionType { @@ -804,13 +802,13 @@ void ConditionMgr::LoadConditions(bool isReload) //Grouping is only allowed for some types (loot templates, gossip menus, gossip items) if (cond->SourceGroup && !CanHaveSourceGroupSet(cond->SourceType)) { - sLog->outErrorDb("Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup); delete cond; continue; } if (cond->SourceId && !CanHaveSourceIdSet(cond->SourceType)) { - sLog->outErrorDb("Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId); + sLog->outError(LOG_FILTER_SQL, "Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId); delete cond; continue; } @@ -896,7 +894,7 @@ void ConditionMgr::LoadConditions(bool isReload) if (!valid) { - sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "Not handled grouped condition, SourceGroup %u", cond->SourceGroup); delete cond; } else @@ -928,22 +926,22 @@ void ConditionMgr::LoadConditions(bool isReload) } while (result->NextRow()); - sLog->outString(">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot) { if (!loot) { - sLog->outErrorDb("ConditionMgr: LootTemplate %u not found", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "ConditionMgr: LootTemplate %u not found", cond->SourceGroup); return false; } if (loot->addConditionItem(cond)) return true; - sLog->outErrorDb("ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup); return false; } @@ -963,7 +961,7 @@ bool ConditionMgr::addToGossipMenus(Condition* cond) } } - sLog->outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "addToGossipMenus: GossipMenu %u not found", cond->SourceGroup); return false; } @@ -982,7 +980,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond) } } - sLog->outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry); return false; } @@ -1037,7 +1035,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) // we have overlapping masks in db if (conditionEffMask != *itr) { - sLog->outErrorDb("SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - " + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - " "effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->SourceEntry, cond->SourceGroup); return false; } @@ -1062,7 +1060,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (cond->SourceType == CONDITION_SOURCE_TYPE_NONE || cond->SourceType >= CONDITION_SOURCE_TYPE_MAX) { - sLog->outErrorDb("Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType)); + sLog->outError(LOG_FILTER_SQL, "Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType)); return false; } @@ -1072,7 +1070,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Creature.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1080,7 +1078,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1089,7 +1087,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Disenchant.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1097,7 +1095,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1106,7 +1104,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Fishing.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1114,7 +1112,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1123,7 +1121,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Gameobject.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1131,7 +1129,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1140,7 +1138,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Item.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1148,7 +1146,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1157,7 +1155,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Mail.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1165,7 +1163,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1174,7 +1172,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Milling.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1182,7 +1180,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1191,7 +1189,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Pickpocketing.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1199,7 +1197,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1208,7 +1206,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Prospecting.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1216,7 +1214,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1225,7 +1223,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Reference.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1233,7 +1231,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1242,7 +1240,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Skinning.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1250,7 +1248,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1259,7 +1257,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) { if (!LootTemplates_Spell.HaveLootFor(cond->SourceGroup)) { - sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup); return false; } @@ -1267,7 +1265,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry); if (!pItemProto && !loot->isReference(cond->SourceEntry)) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry); return false; } break; @@ -1277,13 +1275,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cond->SourceEntry); if (!spellInfo) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); return false; } if ((cond->SourceGroup > MAX_EFFECT_MASK) || !cond->SourceGroup) { - sLog->outErrorDb("SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set , ignoring.", cond->SourceEntry, cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set , ignoring.", cond->SourceEntry, cond->SourceGroup); return false; } @@ -1314,7 +1312,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) break; } - sLog->outErrorDb("SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i)); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i)); cond->SourceGroup &= ~(1<GetCreatureTemplate(cond->SourceEntry)) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry); return false; } break; @@ -1336,7 +1334,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry); if (!spellProto) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); return false; } break; @@ -1344,40 +1342,40 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) case CONDITION_SOURCE_TYPE_QUEST_ACCEPT: if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry)) { - sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry); return false; } break; case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK: if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry)) { - sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry); return false; } break; case CONDITION_SOURCE_TYPE_VEHICLE_SPELL: if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup)) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); return false; } if (!sSpellMgr->GetSpellInfo(cond->SourceEntry)) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); return false; } break; case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT: if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup)) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup); return false; } if (!sSpellMgr->GetSpellInfo(cond->SourceEntry)) { - sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry); return false; } break; @@ -1395,13 +1393,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX) { - sLog->outErrorDb("Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry); return false; } if (cond->ConditionTarget >= cond->GetMaxAvailableConditionTargets()) { - sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry); + sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry); return false; } @@ -1411,17 +1409,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1)) { - sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2 > EFFECT_2) { - sLog->outErrorDb("Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("Aura condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Aura condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ITEM: @@ -1429,13 +1427,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1); if (!proto) { - sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Item condition has non existing item (%u), skipped", cond->ConditionValue1); return false; } if (!cond->ConditionValue2) { - sLog->outErrorDb("Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2); return false; } break; @@ -1445,14 +1443,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1); if (!proto) { - sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ZONEID: @@ -1460,20 +1458,20 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1); if (!areaEntry) { - sLog->outErrorDb("ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1); return false; } if (areaEntry->zone != 0) { - sLog->outErrorDb("ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_REPUTATION_RANK: @@ -1481,25 +1479,25 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->ConditionValue1); if (!factionEntry) { - sLog->outErrorDb("Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_TEAM: { if (cond->ConditionValue1 != ALLIANCE && cond->ConditionValue1 != HORDE) { - sLog->outErrorDb("Team condition specifies unknown team (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Team condition specifies unknown team (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("Team condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Team condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Team condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Team condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_SKILL: @@ -1507,17 +1505,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->ConditionValue1); if (!pSkill) { - sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2 < 1 || cond->ConditionValue2 > sWorld->GetConfigMaxSkillValue()) { - sLog->outErrorDb("Skill condition specifies invalid skill value (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Skill condition specifies invalid skill value (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("Skill condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Skill condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_QUESTREWARDED: @@ -1527,14 +1525,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1)) { - sLog->outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Quest condition specifies non-existing quest (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2 > 1) - sLog->outErrorDb("Quest condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Quest condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Quest condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Quest condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ACTIVE_EVENT: @@ -1542,14 +1540,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap(); if (cond->ConditionValue1 >=events.size() || !events[cond->ConditionValue1].isValid()) { - sLog->outErrorDb("ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_ACHIEVEMENT: @@ -1557,42 +1555,42 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1); if (!achievement) { - sLog->outErrorDb("Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_CLASS: { if (!(cond->ConditionValue1 & CLASSMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); + sLog->outError(LOG_FILTER_SQL, "Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("Class condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Class condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Class condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Class condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_RACE: { if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE); + sLog->outError(LOG_FILTER_SQL, "Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("Race condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Race condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Race condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Race condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_MAPID: @@ -1600,77 +1598,77 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1); if (!me) { - sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Map condition has non existing map (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("Map condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Map condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Map condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Map condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_SPELL: { if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1)) { - sLog->outErrorDb("Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("Spell condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Spell condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Spell condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Spell condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_LEVEL: { if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - sLog->outErrorDb("Level condition has invalid option (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Level condition has invalid option (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("Level condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Level condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_DRUNKENSTATE: { if (cond->ConditionValue1 > DRUNKEN_SMASHED) { - sLog->outErrorDb("DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2) { - sLog->outErrorDb("DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_NEAR_CREATURE: { if (!sObjectMgr->GetCreatureTemplate(cond->ConditionValue1)) { - sLog->outErrorDb("NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_NEAR_GAMEOBJECT: { if (!sObjectMgr->GetGameObjectTemplate(cond->ConditionValue1)) { - sLog->outErrorDb("NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_OBJECT_ENTRY: @@ -1680,79 +1678,79 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) case TYPEID_UNIT: if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2)) { - sLog->outErrorDb("ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2); return false; } break; case TYPEID_GAMEOBJECT: if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2)) { - sLog->outErrorDb("ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2); return false; } break; case TYPEID_PLAYER: case TYPEID_CORPSE: if (cond->ConditionValue2) - sLog->outErrorDb("ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2); break; default: - sLog->outErrorDb("ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_TYPE_MASK: { if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE))) { - sLog->outErrorDb("TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue2) - sLog->outErrorDb("TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_RELATION_TO: { if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets()) { - sLog->outErrorDb("RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue1 == cond->ConditionTarget) { - sLog->outErrorDb("RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2 >= RELATION_MAX) { - sLog->outErrorDb("RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_REACTION_TO: { if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets()) { - sLog->outErrorDb("ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue1 == cond->ConditionTarget) { - sLog->outErrorDb("ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); return false; } if (!cond->ConditionValue2) { - sLog->outErrorDb("mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2); return false; } break; @@ -1761,17 +1759,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets()) { - sLog->outErrorDb("DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue1 == cond->ConditionTarget) { - sLog->outErrorDb("DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue3 >= COMP_TYPE_MAX) { - sLog->outErrorDb("DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3); return false; } break; @@ -1779,38 +1777,38 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) case CONDITION_ALIVE: { if (cond->ConditionValue1) - sLog->outErrorDb("Alive condition has useless data in value1 (%u)!", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Alive condition has useless data in value1 (%u)!", cond->ConditionValue1); if (cond->ConditionValue2) - sLog->outErrorDb("Alive condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Alive condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Alive condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Alive condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_HP_VAL: { if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - sLog->outErrorDb("HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_HP_PCT: { if (cond->ConditionValue1 > 100) { - sLog->outErrorDb("HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - sLog->outErrorDb("HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_AREAID: @@ -1820,19 +1818,19 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (!sWorld->getWorldState(cond->ConditionValue1)) { - sLog->outErrorDb("World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1); return false; } if (cond->ConditionValue3) - sLog->outErrorDb("World state condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "World state condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_PHASEMASK: { if (cond->ConditionValue2) - sLog->outErrorDb("Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2); + sLog->outError(LOG_FILTER_SQL, "Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2); if (cond->ConditionValue3) - sLog->outErrorDb("Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3); + sLog->outError(LOG_FILTER_SQL, "Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3); break; } case CONDITION_TITLE: @@ -1840,22 +1838,22 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(cond->ConditionValue1); if (!titleEntry) { - sLog->outErrorDb("Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1); + sLog->outError(LOG_FILTER_SQL, "Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1); return false; } break; } case CONDITION_UNUSED_19: - sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_19 in `conditions` table - ignoring"); + sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_19 in `conditions` table - ignoring"); return false; case CONDITION_UNUSED_20: - sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring"); + sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring"); return false; case CONDITION_UNUSED_21: - sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring"); + sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring"); return false; case CONDITION_UNUSED_24: - sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_24 in `conditions` table - ignoring"); + sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_24 in `conditions` table - ignoring"); return false; default: break; diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index d7a769d3f5c..99a492a224e 100755 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -59,8 +59,8 @@ void LoadDisables() if (!result) { - sLog->outString(">> Loaded 0 disables. DB table `disables` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 disables. DB table `disables` is empty!"); + return; } @@ -71,7 +71,7 @@ void LoadDisables() DisableType type = DisableType(fields[0].GetUInt32()); if (type >= MAX_DISABLE_TYPES) { - sLog->outErrorDb("Invalid type %u specified in `disables` table, skipped.", type); + sLog->outError(LOG_FILTER_SQL, "Invalid type %u specified in `disables` table, skipped.", type); continue; } @@ -88,13 +88,13 @@ void LoadDisables() case DISABLE_TYPE_SPELL: if (!(sSpellMgr->GetSpellInfo(entry) || flags & SPELL_DISABLE_DEPRECATED_SPELL)) { - sLog->outErrorDb("Spell entry %u from `disables` doesn't exist in dbc, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Spell entry %u from `disables` doesn't exist in dbc, skipped.", entry); continue; } if (!flags || flags > MAX_SPELL_DISABLE_TYPE) { - sLog->outErrorDb("Disable flags for spell %u are invalid, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Disable flags for spell %u are invalid, skipped.", entry); continue; } @@ -121,7 +121,7 @@ void LoadDisables() MapEntry const* mapEntry = sMapStore.LookupEntry(entry); if (!mapEntry) { - sLog->outErrorDb("Map entry %u from `disables` doesn't exist in dbc, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry); continue; } bool isFlagInvalid = false; @@ -142,12 +142,12 @@ void LoadDisables() break; case MAP_BATTLEGROUND: case MAP_ARENA: - sLog->outErrorDb("Battleground map %u specified to be disabled in map case, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Battleground map %u specified to be disabled in map case, skipped.", entry); continue; } if (isFlagInvalid) { - sLog->outErrorDb("Disable flags for map %u are invalid, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Disable flags for map %u are invalid, skipped.", entry); continue; } break; @@ -155,64 +155,64 @@ void LoadDisables() case DISABLE_TYPE_BATTLEGROUND: if (!sBattlemasterListStore.LookupEntry(entry)) { - sLog->outErrorDb("Battleground entry %u from `disables` doesn't exist in dbc, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Battleground entry %u from `disables` doesn't exist in dbc, skipped.", entry); continue; } if (flags) - sLog->outErrorDb("Disable flags specified for battleground %u, useless data.", entry); + sLog->outError(LOG_FILTER_SQL, "Disable flags specified for battleground %u, useless data.", entry); break; case DISABLE_TYPE_OUTDOORPVP: if (entry > MAX_OUTDOORPVP_TYPES) { - sLog->outErrorDb("OutdoorPvPTypes value %u from `disables` is invalid, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "OutdoorPvPTypes value %u from `disables` is invalid, skipped.", entry); continue; } if (flags) - sLog->outErrorDb("Disable flags specified for outdoor PvP %u, useless data.", entry); + sLog->outError(LOG_FILTER_SQL, "Disable flags specified for outdoor PvP %u, useless data.", entry); break; case DISABLE_TYPE_ACHIEVEMENT_CRITERIA: if (!sAchievementCriteriaStore.LookupEntry(entry)) { - sLog->outErrorDb("Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry); continue; } if (flags) - sLog->outErrorDb("Disable flags specified for Achievement Criteria %u, useless data.", entry); + sLog->outError(LOG_FILTER_SQL, "Disable flags specified for Achievement Criteria %u, useless data.", entry); break; case DISABLE_TYPE_VMAP: { MapEntry const* mapEntry = sMapStore.LookupEntry(entry); if (!mapEntry) { - sLog->outErrorDb("Map entry %u from `disables` doesn't exist in dbc, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry); continue; } switch (mapEntry->map_type) { case MAP_COMMON: if (flags & VMAP_DISABLE_AREAFLAG) - sLog->outString("Areaflag disabled for world map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "Areaflag disabled for world map %u.", entry); if (flags & VMAP_DISABLE_LIQUIDSTATUS) - sLog->outString("Liquid status disabled for world map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "Liquid status disabled for world map %u.", entry); break; case MAP_INSTANCE: case MAP_RAID: if (flags & VMAP_DISABLE_HEIGHT) - sLog->outString("Height disabled for instance map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "Height disabled for instance map %u.", entry); if (flags & VMAP_DISABLE_LOS) - sLog->outString("LoS disabled for instance map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "LoS disabled for instance map %u.", entry); break; case MAP_BATTLEGROUND: if (flags & VMAP_DISABLE_HEIGHT) - sLog->outString("Height disabled for battleground map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "Height disabled for battleground map %u.", entry); if (flags & VMAP_DISABLE_LOS) - sLog->outString("LoS disabled for battleground map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "LoS disabled for battleground map %u.", entry); break; case MAP_ARENA: if (flags & VMAP_DISABLE_HEIGHT) - sLog->outString("Height disabled for arena map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "Height disabled for arena map %u.", entry); if (flags & VMAP_DISABLE_LOS) - sLog->outString("LoS disabled for arena map %u.", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "LoS disabled for arena map %u.", entry); break; default: break; @@ -228,8 +228,8 @@ void LoadDisables() } while (result->NextRow()); - sLog->outString(">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime)); + } void CheckQuestDisables() @@ -239,8 +239,8 @@ void CheckQuestDisables() uint32 count = m_DisableMap[DISABLE_TYPE_QUEST].size(); if (!count) { - sLog->outString(">> Checked 0 quest disables."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Checked 0 quest disables."); + return; } @@ -250,17 +250,17 @@ void CheckQuestDisables() const uint32 entry = itr->first; if (!sObjectMgr->GetQuestTemplate(entry)) { - sLog->outErrorDb("Quest entry %u from `disables` doesn't exist, skipped.", entry); + sLog->outError(LOG_FILTER_SQL, "Quest entry %u from `disables` doesn't exist, skipped.", entry); m_DisableMap[DISABLE_TYPE_QUEST].erase(itr++); continue; } if (itr->second.flags) - sLog->outErrorDb("Disable flags specified for quest %u, useless data.", entry); + sLog->outError(LOG_FILTER_SQL, "Disable flags specified for quest %u, useless data.", entry); ++itr; } - sLog->outString(">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 4be6c33db79..abf385b1463 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -200,7 +200,7 @@ uint32 DBCFileCount = 0; static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename) { - sLog->outError("Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize); + sLog->outError(LOG_FILTER_GENERAL, "Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize); // ASSERT must fail after function call return false; @@ -457,7 +457,7 @@ void LoadDBCStores(const std::string& dataPath) if (spellDiff->SpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->SpellID[x])) { if (spellDiff->SpellID[x] > 0)//don't show error if spell is <= 0, not all modes have spells and there are unknown negative values - sLog->outErrorDb("spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x); + sLog->outError(LOG_FILTER_SQL, "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x); newEntry.SpellID[x] = 0;//spell was <= 0 or invalid, set to 0 } else @@ -610,7 +610,7 @@ void LoadDBCStores(const std::string& dataPath) // error checks if (bad_dbc_files.size() >= DBCFileCount) { - sLog->outError("Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str()); exit(1); } else if (!bad_dbc_files.empty()) @@ -619,7 +619,7 @@ void LoadDBCStores(const std::string& dataPath) for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i) str += *i + "\n"; - sLog->outError("Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str()); exit(1); } @@ -632,12 +632,12 @@ void LoadDBCStores(const std::string& dataPath) !sMapStore.LookupEntry(724) || // last map added in 3.3.5a !sSpellStore.LookupEntry(80864) ) // last client known item added in 3.3.5a { - sLog->outError("You have _outdated_ DBC files. Please extract correct versions from current using client."); + sLog->outError(LOG_FILTER_GENERAL, "You have _outdated_ DBC files. Please extract correct versions from current using client."); exit(1); } - sLog->outString(">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime)); + } SimpleFactionsList const* GetFactionTeamList(uint32 faction) diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 91f9104b0b1..05385361e1b 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -135,8 +135,8 @@ void LFGMgr::LoadRewards() if (!result) { - sLog->outErrorDb(">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!"); + return; } @@ -157,25 +157,25 @@ void LFGMgr::LoadRewards() if (!sLFGDungeonStore.LookupEntry(dungeonId)) { - sLog->outErrorDb("Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId); + sLog->outError(LOG_FILTER_SQL, "Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId); continue; } if (!maxLevel || maxLevel > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { - sLog->outErrorDb("Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId); + sLog->outError(LOG_FILTER_SQL, "Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId); maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); } if (firstQuestId && !sObjectMgr->GetQuestTemplate(firstQuestId)) { - sLog->outErrorDb("First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId); + sLog->outError(LOG_FILTER_SQL, "First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId); firstQuestId = 0; } if (otherQuestId && !sObjectMgr->GetQuestTemplate(otherQuestId)) { - sLog->outErrorDb("Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId); + sLog->outError(LOG_FILTER_SQL, "Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId); otherQuestId = 0; } @@ -183,8 +183,8 @@ void LFGMgr::LoadRewards() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_LFG, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void LFGMgr::Update(uint32 diff) @@ -310,7 +310,7 @@ void LFGMgr::Update(uint32 diff) LfgQueueInfo* queue = itQueue->second; if (!queue) { - sLog->outError("LFGMgr::Update: [" UI64FMTD "] queued with null queue info!", itQueue->first); + sLog->outError(LOG_FILTER_LFG, "LFGMgr::Update: [" UI64FMTD "] queued with null queue info!", itQueue->first); continue; } uint32 dungeonId = (*queue->dungeons.begin()); @@ -863,7 +863,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) LfgQueueInfoMap::iterator itQueue = m_QueueInfoMap.find(guid); if (itQueue == m_QueueInfoMap.end() || GetState(guid) != LFG_STATE_QUEUED) { - sLog->outError("LFGMgr::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", (*it)); + sLog->outError(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", (*it)); RemoveFromQueue(guid); return false; } @@ -1404,13 +1404,13 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept) LfgProposalPlayer* player = pProposal->players[(*it)->GetGUID()]; uint32 lowgroupguid = (*it)->GetGroup() ? (*it)->GetGroup()->GetLowGUID() : 0; if (player->groupLowGuid != lowgroupguid) - sLog->outError("LFGMgr::UpdateProposal: [" UI64FMTD "] group mismatch: actual (%u) - queued (%u)", (*it)->GetGUID(), lowgroupguid, player->groupLowGuid); + sLog->outError(LOG_FILTER_LFG, "LFGMgr::UpdateProposal: [" UI64FMTD "] group mismatch: actual (%u) - queued (%u)", (*it)->GetGUID(), lowgroupguid, player->groupLowGuid); uint64 guid2 = player->groupLowGuid ? MAKE_NEW_GUID(player->groupLowGuid, 0, HIGHGUID_GROUP) : (*it)->GetGUID(); LfgQueueInfoMap::iterator itQueue = m_QueueInfoMap.find(guid2); if (itQueue == m_QueueInfoMap.end()) { - sLog->outError("LFGMgr::UpdateProposal: Queue info for guid [" UI64FMTD "] not found!", guid); + sLog->outError(LOG_FILTER_LFG, "LFGMgr::UpdateProposal: Queue info for guid [" UI64FMTD "] not found!", guid); waitTimesMap[(*it)->GetGUID()] = -1; } else @@ -1813,7 +1813,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(dungeon->map); if (!at) { - sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty); + sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty); error = LFG_TELEPORTERROR_INVALID_LOCATION; } else @@ -1843,7 +1843,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* else { error = LFG_TELEPORTERROR_INVALID_LOCATION; - sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", player->GetGUID(), mapid); + sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", player->GetGUID(), mapid); } } } diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index 4613a3554db..60c0b7ad394 100755 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -78,7 +78,7 @@ bool Corpse::Create(uint32 guidlow, Player* owner) if (!IsPositionValid()) { - sLog->outError("Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)", + sLog->outError(LOG_FILTER_PLAYER, "Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, owner->GetName(), owner->GetPositionX(), owner->GetPositionY()); return false; } @@ -134,7 +134,7 @@ void Corpse::DeleteBonesFromWorld() if (!corpse) { - sLog->outError("Bones %u not found in world.", GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Bones %u not found in world.", GetGUIDLow()); return; } @@ -194,7 +194,7 @@ bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields) if (!IsPositionValid()) { - sLog->outError("Corpse (guid: %u, owner: %u) is not created, given coordinates are not valid (X: %f, Y: %f, Z: %f)", + sLog->outError(LOG_FILTER_PLAYER, "Corpse (guid: %u, owner: %u) is not created, given coordinates are not valid (X: %f, Y: %f, Z: %f)", GetGUIDLow(), GUID_LOPART(GetOwnerGUID()), posX, posY, posZ); return false; } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 4d54d1599a8..866437d828c 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -173,7 +173,7 @@ Creature::~Creature() i_AI = NULL; //if (m_uint32Values) - // sLog->outError("Deconstruct Creature Entry = %u", GetEntry()); + // sLog->outError(LOG_FILTER_UNITS, "Deconstruct Creature Entry = %u", GetEntry()); } void Creature::AddToWorld() @@ -261,7 +261,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data CreatureTemplate const* normalInfo = sObjectMgr->GetCreatureTemplate(Entry); if (!normalInfo) { - sLog->outErrorDb("Creature::InitEntry creature entry %u does not exist.", Entry); + sLog->outError(LOG_FILTER_SQL, "Creature::InitEntry creature entry %u does not exist.", Entry); return false; } @@ -299,7 +299,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data // Cancel load if no model defined if (!(cinfo->GetFirstValidModelId())) { - sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry); return false; } @@ -307,7 +307,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); if (!minfo) // Cancel load if no model defined { - sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry); return false; } @@ -470,11 +470,11 @@ void Creature::Update(uint32 diff) { case JUST_RESPAWNED: // Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting. - sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUIDLow(), GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUIDLow(), GetEntry()); break; case JUST_DIED: // Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting. - sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_DEAD (1)", GetGUIDLow(), GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Creature (GUID: %u Entry: %u) in wrong state: JUST_DEAD (1)", GetGUIDLow(), GetEntry()); break; case DEAD: { @@ -523,7 +523,7 @@ void Creature::Update(uint32 diff) else if (m_corpseRemoveTime <= time(NULL)) { RemoveCorpse(false); - sLog->outStaticDebug("Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY)); + sLog->outDebug(LOG_FILTER_UNITS, "Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY)); } break; } @@ -755,7 +755,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry); if (!cinfo) { - sLog->outErrorDb("Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry); + sLog->outError(LOG_FILTER_SQL, "Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry); return false; } @@ -769,7 +769,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, if (!IsPositionValid()) { - sLog->outError("Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, Entry, x, y, z, ang); + sLog->outError(LOG_FILTER_UNITS, "Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, Entry, x, y, z, ang); return false; } @@ -836,7 +836,7 @@ bool Creature::isCanTrainingOf(Player* player, bool msg) const if ((!trainer_spells || trainer_spells->spellList.empty()) && GetCreatureTemplate()->trainer_type != TRAINER_TYPE_PETS) { - sLog->outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_TRAINER but have empty trainer spell list.", + sLog->outError(LOG_FILTER_SQL, "Creature %u (Entry: %u) have UNIT_NPC_FLAG_TRAINER but have empty trainer spell list.", GetGUIDLow(), GetEntry()); return false; } @@ -1038,7 +1038,7 @@ void Creature::SaveToDB() CreatureData const* data = sObjectMgr->GetCreatureData(m_DBTableGuid); if (!data) { - sLog->outError("Creature::SaveToDB failed, cannot get creature data!"); + sLog->outError(LOG_FILTER_UNITS, "Creature::SaveToDB failed, cannot get creature data!"); return; } @@ -1252,7 +1252,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3 CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry); if (!cinfo) { - sLog->outErrorDb("Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry); + sLog->outError(LOG_FILTER_SQL, "Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry); return false; } @@ -1278,7 +1278,7 @@ bool Creature::LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap) if (!data) { - sLog->outErrorDb("Creature (GUID: %u) not found in table `creature`, can't load. ", guid); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u) not found in table `creature`, can't load. ", guid); return false; } @@ -1394,7 +1394,7 @@ void Creature::DeleteFromDB() { if (!m_DBTableGuid) { - sLog->outError("Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry()); return; } @@ -1600,7 +1600,7 @@ void Creature::Respawn(bool force) if (m_DBTableGuid) GetMap()->RemoveCreatureRespawnTime(m_DBTableGuid); - sLog->outStaticDebug("Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)", GetName(), GetGUIDLow(), GetGUID(), GetEntry()); + sLog->outDebug(LOG_FILTER_UNITS, "Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)", GetName(), GetGUIDLow(), GetGUID(), GetEntry()); m_respawnTime = 0; lootForPickPocketed = false; lootForBody = false; @@ -1714,7 +1714,7 @@ SpellInfo const* Creature::reachWithSpellAttack(Unit* victim) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]); if (!spellInfo) { - sLog->outError("WORLD: unknown spell id %i", m_spells[i]); + sLog->outError(LOG_FILTER_UNITS, "WORLD: unknown spell id %i", m_spells[i]); continue; } @@ -1762,7 +1762,7 @@ SpellInfo const* Creature::reachWithSpellCure(Unit* victim) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]); if (!spellInfo) { - sLog->outError("WORLD: unknown spell id %i", m_spells[i]); + sLog->outError(LOG_FILTER_UNITS, "WORLD: unknown spell id %i", m_spells[i]); continue; } @@ -1834,7 +1834,7 @@ Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const if (dist > MAX_VISIBILITY_DISTANCE) { - sLog->outError("Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.", GetGUIDLow(), GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.", GetGUIDLow(), GetEntry()); dist = ATTACK_DISTANCE; } @@ -2118,7 +2118,7 @@ bool Creature::LoadCreaturesAddon(bool reload) SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(*itr); if (!AdditionalSpellInfo) { - sLog->outErrorDb("Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.", GetGUIDLow(), GetEntry(), *itr); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.", GetGUIDLow(), GetEntry(), *itr); continue; } @@ -2126,7 +2126,7 @@ bool Creature::LoadCreaturesAddon(bool reload) if (HasAura(*itr)) { if (!reload) - sLog->outErrorDb("Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.", GetGUIDLow(), GetEntry(), *itr); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.", GetGUIDLow(), GetEntry(), *itr); continue; } @@ -2153,7 +2153,7 @@ void Creature::SetInCombatWithZone() { if (!CanHaveThreatList()) { - sLog->outError("Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry()); return; } @@ -2161,7 +2161,7 @@ void Creature::SetInCombatWithZone() if (!map->IsDungeon()) { - sLog->outError("Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId()); + sLog->outError(LOG_FILTER_UNITS, "Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId()); return; } diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 54953ef5420..6468e611b13 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -84,8 +84,8 @@ void FormationMgr::LoadCreatureFormations() if (!result) { - sLog->outErrorDb(">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!"); + return; } @@ -118,14 +118,14 @@ void FormationMgr::LoadCreatureFormations() { if (!sObjectMgr->GetCreatureData(group_member->leaderGUID)) { - sLog->outErrorDb("creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID); + sLog->outError(LOG_FILTER_SQL, "creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID); delete group_member; continue; } if (!sObjectMgr->GetCreatureData(memberGUID)) { - sLog->outErrorDb("creature_formations table member guid %u incorrect (not exist)", memberGUID); + sLog->outError(LOG_FILTER_SQL, "creature_formations table member guid %u incorrect (not exist)", memberGUID); delete group_member; continue; } @@ -136,8 +136,8 @@ void FormationMgr::LoadCreatureFormations() } while (result->NextRow()); - sLog->outString(">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_UNITS, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void CreatureGroup::AddMember(Creature* member) diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 836fbe8c7bf..63e186ffc42 100755 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -177,7 +177,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poiId) const PointOfInterest const* poi = sObjectMgr->GetPointOfInterest(poiId); if (!poi) { - sLog->outErrorDb("Request to send non-existing POI (Id: %u), ignored.", poiId); + sLog->outError(LOG_FILTER_SQL, "Request to send non-existing POI (Id: %u), ignored.", poiId); return; } diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 2af6b4c04fd..43b29c600d6 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -159,7 +159,7 @@ void TempSummon::Update(uint32 diff) } default: UnSummon(); - sLog->outError("Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type); + sLog->outError(LOG_FILTER_UNITS, "Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type); break; } } @@ -267,7 +267,7 @@ void TempSummon::RemoveFromWorld() owner->m_SummonSlot[slot] = 0; //if (GetOwnerGUID()) - // sLog->outError("Unit %u has owner guid when removed from world", GetEntry()); + // sLog->outError(LOG_FILTER_UNITS, "Unit %u has owner guid when removed from world", GetEntry()); Creature::RemoveFromWorld(); } diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index 76d4cb6624b..cd4a9443867 100755 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -85,7 +85,7 @@ bool DynamicObject::CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spe Relocate(pos); if (!IsPositionValid()) { - sLog->outError("DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spellId, GetPositionX(), GetPositionY()); + sLog->outError(LOG_FILTER_GENERAL, "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spellId, GetPositionX(), GetPositionY()); return false; } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 1d9958a6524..7375ed9f886 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -119,7 +119,7 @@ void GameObject::RemoveFromOwner() else if (IS_PET_GUID(ownerGUID)) ownerType = "pet"; - sLog->outCrash("Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.", + sLog->outFatal(LOG_FILTER_GENERAL, "Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.", GetGUIDLow(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(ownerGUID), ownerType); SetOwnerGUID(0); } @@ -170,7 +170,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa Relocate(x, y, z, ang); if (!IsPositionValid()) { - sLog->outError("Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y); + sLog->outError(LOG_FILTER_GENERAL, "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y); return false; } @@ -187,7 +187,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(name_id); if (!goinfo) { - sLog->outErrorDb("Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->GetId(), x, y, z); + sLog->outError(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->GetId(), x, y, z); return false; } @@ -197,7 +197,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa if (goinfo->type >= MAX_GAMEOBJECT_TYPE) { - sLog->outErrorDb("Gameobject (GUID: %u Entry: %u) not created: non-existing GO type '%u' in `gameobject_template`. It will crash client if created.", guidlow, name_id, goinfo->type); + sLog->outError(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry: %u) not created: non-existing GO type '%u' in `gameobject_template`. It will crash client if created.", guidlow, name_id, goinfo->type); return false; } @@ -268,7 +268,7 @@ void GameObject::Update(uint32 diff) if (!AI()) { if (!AIM_Initialize()) - sLog->outError("Could not initialize GameObjectAI"); + sLog->outError(LOG_FILTER_GENERAL, "Could not initialize GameObjectAI"); } else AI()->UpdateAI(diff); @@ -647,7 +647,7 @@ void GameObject::SaveToDB() GameObjectData const* data = sObjectMgr->GetGOData(m_DBTableGuid); if (!data) { - sLog->outError("GameObject::SaveToDB failed, cannot get gameobject data!"); + sLog->outError(LOG_FILTER_GENERAL, "GameObject::SaveToDB failed, cannot get gameobject data!"); return; } @@ -721,7 +721,7 @@ bool GameObject::LoadGameObjectFromDB(uint32 guid, Map* map, bool addToMap) if (!data) { - sLog->outErrorDb("Gameobject (GUID: %u) not found in table `gameobject`, can't load. ", guid); + sLog->outError(LOG_FILTER_SQL, "Gameobject (GUID: %u) not found in table `gameobject`, can't load. ", guid); return false; } @@ -1302,7 +1302,7 @@ void GameObject::Use(Unit* user) //provide error, no fishable zone or area should be 0 if (!zone_skill) - sLog->outErrorDb("Fishable areaId %u are not properly defined in `skill_fishing_base_level`.", subzone); + sLog->outError(LOG_FILTER_SQL, "Fishable areaId %u are not properly defined in `skill_fishing_base_level`.", subzone); int32 skill = player->GetSkillValue(SKILL_FISHING); @@ -1318,7 +1318,7 @@ void GameObject::Use(Unit* user) int32 roll = irand(1, 100); - sLog->outStaticDebug("Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll); + sLog->outDebug(LOG_FILTER_GENERAL, "Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll); // but you will likely cause junk in areas that require a high fishing skill (not yet implemented) if (chance >= roll) @@ -1612,7 +1612,7 @@ void GameObject::Use(Unit* user) } default: if (GetGoType() >= MAX_GAMEOBJECT_TYPE) - sLog->outError("GameObject::Use(): unit (type: %u, guid: %u, name: %s) tries to use object (guid: %u, entry: %u, name: %s) of unknown type (%u)", + sLog->outError(LOG_FILTER_GENERAL, "GameObject::Use(): unit (type: %u, guid: %u, name: %s) tries to use object (guid: %u, entry: %u, name: %s) of unknown type (%u)", user->GetTypeId(), user->GetGUIDLow(), user->GetName(), GetGUIDLow(), GetEntry(), GetGOInfo()->name.c_str(), GetGoType()); break; } @@ -1624,7 +1624,7 @@ void GameObject::Use(Unit* user) if (!spellInfo) { if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell(user->ToPlayer(), spellId, this)) - sLog->outError("WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId, GetEntry(), GetGoType()); + sLog->outError(LOG_FILTER_GENERAL, "WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId, GetEntry(), GetGoType()); else sLog->outDebug(LOG_FILTER_OUTDOORPVP, "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId); return; diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp index c4d4adeb6f2..db563c712cd 100755 --- a/src/server/game/Entities/Item/Container/Bag.cpp +++ b/src/server/game/Entities/Item/Container/Bag.cpp @@ -41,7 +41,7 @@ Bag::~Bag() { if (item->IsInWorld()) { - sLog->outCrash("Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.", + sLog->outFatal(LOG_FILTER_PLAYER_ITEMS, "Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.", item->GetEntry(), (uint32)item->GetSlot(), (uint32)item->GetBagSlot(), GetEntry(), (uint32)GetSlot(), (uint32)GetBagSlot(), (uint32)i); item->RemoveFromWorld(); diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 209fdae8ce6..c032647d924 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -36,7 +36,7 @@ void AddItemsSetItem(Player* player, Item* item) if (!set) { - sLog->outErrorDb("Item set %u for item (id %u) not found, mods not applied.", setid, proto->ItemId); + sLog->outError(LOG_FILTER_SQL, "Item set %u for item (id %u) not found, mods not applied.", setid, proto->ItemId); return; } @@ -96,7 +96,7 @@ void AddItemsSetItem(Player* player, Item* item) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(set->spells[x]); if (!spellInfo) { - sLog->outError("WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid); + sLog->outError(LOG_FILTER_PLAYER_ITEMS, "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid); break; } @@ -117,7 +117,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const* proto) if (!set) { - sLog->outErrorDb("Item set #%u for item #%u not found, mods not removed.", setid, proto->ItemId); + sLog->outError(LOG_FILTER_SQL, "Item set #%u for item #%u not found, mods not removed.", setid, proto->ItemId); return; } @@ -597,7 +597,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id) // item can have not null only one from field values if ((itemProto->RandomProperty) && (itemProto->RandomSuffix)) { - sLog->outErrorDb("Item template %u have RandomProperty == %u and RandomSuffix == %u, but must have one from field =0", itemProto->ItemId, itemProto->RandomProperty, itemProto->RandomSuffix); + sLog->outError(LOG_FILTER_SQL, "Item template %u have RandomProperty == %u and RandomSuffix == %u, but must have one from field =0", itemProto->ItemId, itemProto->RandomProperty, itemProto->RandomSuffix); return 0; } @@ -608,7 +608,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id) ItemRandomPropertiesEntry const* random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId); if (!random_id) { - sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'", randomPropId); + sLog->outError(LOG_FILTER_SQL, "Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'", randomPropId); return 0; } @@ -621,7 +621,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id) ItemRandomSuffixEntry const* random_id = sItemRandomSuffixStore.LookupEntry(randomPropId); if (!random_id) { - sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.", randomPropId); + sLog->outError(LOG_FILTER_SQL, "Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.", randomPropId); return 0; } diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index f3d7d7fd56c..c6ed8a2925a 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -70,13 +70,13 @@ void LoadRandomEnchantmentsTable() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_PLAYER_ITEMS, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } else { - sLog->outErrorDb(">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty."); + } } @@ -91,7 +91,7 @@ uint32 GetItemEnchantMod(int32 entry) EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry); if (tab == RandomItemEnch.end()) { - sLog->outErrorDb("Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.", entry); + sLog->outError(LOG_FILTER_SQL, "Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.", entry); return 0; } diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index fdc09bba8b9..b910fee951b 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -90,7 +90,7 @@ WorldObject::~WorldObject() { if (GetTypeId() == TYPEID_CORPSE) { - sLog->outCrash("Object::~Object Corpse guid="UI64FMTD", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry()); + sLog->outFatal(LOG_FILTER_GENERAL, "Object::~Object Corpse guid="UI64FMTD", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry()); ASSERT(false); } ResetMap(); @@ -101,16 +101,16 @@ Object::~Object() { if (IsInWorld()) { - sLog->outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry()); + sLog->outFatal(LOG_FILTER_GENERAL, "Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry()); if (isType(TYPEMASK_ITEM)) - sLog->outCrash("Item slot %u", ((Item*)this)->GetSlot()); + sLog->outFatal(LOG_FILTER_GENERAL, "Item slot %u", ((Item*)this)->GetSlot()); ASSERT(false); RemoveFromWorld(); } if (m_objectUpdated) { - sLog->outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry()); + sLog->outFatal(LOG_FILTER_GENERAL, "Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry()); ASSERT(false); sObjectAccessor->RemoveUpdateObject(this); } @@ -1003,7 +1003,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value) if (offset > 4) { - sLog->outError("Object::SetByteValue: wrong offset %u", offset); + sLog->outError(LOG_FILTER_GENERAL, "Object::SetByteValue: wrong offset %u", offset); return; } @@ -1027,7 +1027,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value) if (offset > 2) { - sLog->outError("Object::SetUInt16Value: wrong offset %u", offset); + sLog->outError(LOG_FILTER_GENERAL, "Object::SetUInt16Value: wrong offset %u", offset); return; } @@ -1139,7 +1139,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag) if (offset > 4) { - sLog->outError("Object::SetByteFlag: wrong offset %u", offset); + sLog->outError(LOG_FILTER_GENERAL, "Object::SetByteFlag: wrong offset %u", offset); return; } @@ -1162,7 +1162,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag) if (offset > 4) { - sLog->outError("Object::RemoveByteFlag: wrong offset %u", offset); + sLog->outError(LOG_FILTER_GENERAL, "Object::RemoveByteFlag: wrong offset %u", offset); return; } @@ -1181,7 +1181,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag) bool Object::PrintIndexError(uint32 index, bool set) const { - sLog->outError("Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType); + sLog->outError(LOG_FILTER_GENERAL, "Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType); // ASSERT must fail after function call return false; @@ -1236,32 +1236,32 @@ ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& st void MovementInfo::OutDebug() { - sLog->outString("MOVEMENT INFO"); - sLog->outString("guid " UI64FMTD, guid); - sLog->outString("flags %u", flags); - sLog->outString("flags2 %u", flags2); - sLog->outString("time %u current time " UI64FMTD "", flags2, uint64(::time(NULL))); - sLog->outString("position: `%s`", pos.ToString().c_str()); + sLog->outInfo(LOG_FILTER_GENERAL, "MOVEMENT INFO"); + sLog->outInfo(LOG_FILTER_GENERAL, "guid " UI64FMTD, guid); + sLog->outInfo(LOG_FILTER_GENERAL, "flags %u", flags); + sLog->outInfo(LOG_FILTER_GENERAL, "flags2 %u", flags2); + sLog->outInfo(LOG_FILTER_GENERAL, "time %u current time " UI64FMTD "", flags2, uint64(::time(NULL))); + sLog->outInfo(LOG_FILTER_GENERAL, "position: `%s`", pos.ToString().c_str()); if (flags & MOVEMENTFLAG_ONTRANSPORT) { - sLog->outString("TRANSPORT:"); - sLog->outString("guid: " UI64FMTD, t_guid); - sLog->outString("position: `%s`", t_pos.ToString().c_str()); - sLog->outString("seat: %i", t_seat); - sLog->outString("time: %u", t_time); + sLog->outInfo(LOG_FILTER_GENERAL, "TRANSPORT:"); + sLog->outInfo(LOG_FILTER_GENERAL, "guid: " UI64FMTD, t_guid); + sLog->outInfo(LOG_FILTER_GENERAL, "position: `%s`", t_pos.ToString().c_str()); + sLog->outInfo(LOG_FILTER_GENERAL, "seat: %i", t_seat); + sLog->outInfo(LOG_FILTER_GENERAL, "time: %u", t_time); if (flags2 & MOVEMENTFLAG2_INTERPOLATED_MOVEMENT) - sLog->outString("time2: %u", t_time2); + sLog->outInfo(LOG_FILTER_GENERAL, "time2: %u", t_time2); } if ((flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (flags2 & MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING)) - sLog->outString("pitch: %f", pitch); + sLog->outInfo(LOG_FILTER_GENERAL, "pitch: %f", pitch); - sLog->outString("fallTime: %u", fallTime); + sLog->outInfo(LOG_FILTER_GENERAL, "fallTime: %u", fallTime); if (flags & MOVEMENTFLAG_FALLING) - sLog->outString("j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", j_zspeed, j_sinAngle, j_cosAngle, j_xyspeed); + sLog->outInfo(LOG_FILTER_GENERAL, "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", j_zspeed, j_sinAngle, j_cosAngle, j_xyspeed); if (flags & MOVEMENTFLAG_SPLINE_ELEVATION) - sLog->outString("splineElevation: %f", splineElevation); + sLog->outInfo(LOG_FILTER_GENERAL, "splineElevation: %f", splineElevation); } WorldObject::WorldObject(bool isWorldObject): WorldLocation(), @@ -2181,7 +2181,7 @@ void WorldObject::SetMap(Map* map) return; if (m_currMap) { - sLog->outCrash("WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId()); + sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId()); ASSERT(false); } m_currMap = map; @@ -2216,7 +2216,7 @@ void WorldObject::AddObjectToRemoveList() Map* map = FindMap(); if (!map) { - sLog->outError("Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId()); + sLog->outError(LOG_FILTER_GENERAL, "Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId()); return; } @@ -2382,7 +2382,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy pet->Relocate(x, y, z, ang); if (!pet->IsPositionValid()) { - sLog->outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", pet->GetGUIDLow(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY()); + sLog->outError(LOG_FILTER_GENERAL, "Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", pet->GetGUIDLow(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY()); delete pet; return NULL; } @@ -2391,7 +2391,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy uint32 pet_number = sObjectMgr->GeneratePetNumber(); if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number)) { - sLog->outError("no such creature entry %u", entry); + sLog->outError(LOG_FILTER_GENERAL, "no such creature entry %u", entry); delete pet; return NULL; } @@ -2468,7 +2468,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry); if (!goinfo) { - sLog->outErrorDb("Gameobject template %u not found in database!", entry); + sLog->outError(LOG_FILTER_SQL, "Gameobject template %u not found in database!", entry); return NULL; } Map* map = GetMap(); @@ -2770,7 +2770,7 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle) // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty)) { - sLog->outCrash("WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty); + sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty); return; } @@ -2816,7 +2816,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty)) { - sLog->outCrash("WorldObject::MovePositionToFirstCollision invalid coordinates X: %f and Y: %f were passed!", destx, desty); + sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::MovePositionToFirstCollision invalid coordinates X: %f and Y: %f were passed!", destx, desty); return; } diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp index 8f480ab3235..45464f19083 100755 --- a/src/server/game/Entities/Object/Updates/UpdateData.cpp +++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp @@ -57,7 +57,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) int z_res = deflateInit(&c_stream, sWorld->getIntConfig(CONFIG_COMPRESSION)); if (z_res != Z_OK) { - sLog->outError("Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res)); + sLog->outError(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } @@ -70,14 +70,14 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) z_res = deflate(&c_stream, Z_NO_FLUSH); if (z_res != Z_OK) { - sLog->outError("Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res)); + sLog->outError(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } if (c_stream.avail_in != 0) { - sLog->outError("Can't compress update packet (zlib: deflate not greedy)"); + sLog->outError(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate not greedy)"); *dst_size = 0; return; } @@ -85,7 +85,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) z_res = deflate(&c_stream, Z_FINISH); if (z_res != Z_STREAM_END) { - sLog->outError("Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res)); + sLog->outError(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } @@ -93,7 +93,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) z_res = deflateEnd(&c_stream); if (z_res != Z_OK) { - sLog->outError("Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res)); + sLog->outError(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 75deb8b4216..17b214857db 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -183,7 +183,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c if (!IsPositionValid()) { - sLog->outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", + sLog->outError(LOG_FILTER_PETS, "Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); return false; } @@ -229,7 +229,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c break; default: if (!IsPetGhoul()) - sLog->outError("Pet have incorrect type (%u) for pet loading.", getPetType()); + sLog->outError(LOG_FILTER_PETS, "Pet have incorrect type (%u) for pet loading.", getPetType()); break; } @@ -562,7 +562,7 @@ void Pet::Update(uint32 diff) { if (owner->GetPetGUID() != GetGUID()) { - sLog->outError("Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName()); + sLog->outError(LOG_FILTER_PETS, "Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName()); Remove(getPetType() == HUNTER_PET?PET_SAVE_AS_DELETED:PET_SAVE_NOT_IN_SLOT); return; } @@ -760,7 +760,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) if (!IsPositionValid()) { - sLog->outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)", + sLog->outError(LOG_FILTER_PETS, "Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)", GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); return false; } @@ -768,7 +768,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) CreatureTemplate const* cinfo = GetCreatureTemplate(); if (!cinfo) { - sLog->outError("CreateBaseAtCreature() failed, creatureInfo is missing!"); + sLog->outError(LOG_FILTER_PETS, "CreateBaseAtCreature() failed, creatureInfo is missing!"); return false; } @@ -843,7 +843,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) m_unitTypeMask |= UNIT_MASK_HUNTER_PET; } else - sLog->outError("Unknown type pet %u is summoned by player class %u", GetEntry(), m_owner->getClass()); + sLog->outError(LOG_FILTER_PETS, "Unknown type pet %u is summoned by player class %u", GetEntry(), m_owner->getClass()); } uint32 creature_ID = (petType == HUNTER_PET) ? 1 : cinfo->Entry; @@ -1120,7 +1120,7 @@ void Pet::_LoadSpellCooldowns() if (!sSpellMgr->GetSpellInfo(spell_id)) { - sLog->outError("Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id); + sLog->outError(LOG_FILTER_PETS, "Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id); continue; } @@ -1271,7 +1271,7 @@ void Pet::_LoadAuras(uint32 timediff) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) { - sLog->outError("Unknown aura (spellid %u), ignore.", spellid); + sLog->outError(LOG_FILTER_PETS, "Unknown aura (spellid %u), ignore.", spellid); continue; } @@ -1302,7 +1302,7 @@ void Pet::_LoadAuras(uint32 timediff) } aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]); aura->ApplyForTargets(); - sLog->outDetail("Added aura spellid %u, effectmask %u", spellInfo->Id, effmask); + sLog->outInfo(LOG_FILTER_PETS, "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask); } } while (result->NextRow()); @@ -1378,7 +1378,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel // do pet spell book cleanup if (state == PETSPELL_UNCHANGED) // spell load case { - sLog->outError("Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.", spellId); + sLog->outError(LOG_FILTER_PETS, "Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.", spellId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_PET_SPELL); @@ -1387,7 +1387,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel CharacterDatabase.Execute(stmt); } else - sLog->outError("Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId); + sLog->outError(LOG_FILTER_PETS, "Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId); return false; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3b51411b168..85b807880c2 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -929,7 +929,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class); if (!info) { - sLog->outError("Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid race/class pair (%u/%u) - refusing to do so.", + sLog->outError(LOG_FILTER_PLAYER, "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid race/class pair (%u/%u) - refusing to do so.", GetSession()->GetAccountId(), m_name.c_str(), createInfo->Race, createInfo->Class); return false; } @@ -942,7 +942,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(createInfo->Class); if (!cEntry) { - sLog->outError("Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid character class (%u) - refusing to do so (wrong DBC-files?)", + sLog->outError(LOG_FILTER_PLAYER, "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid character class (%u) - refusing to do so (wrong DBC-files?)", GetSession()->GetAccountId(), m_name.c_str(), createInfo->Class); return false; } @@ -958,7 +958,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) if (!IsValidGender(createInfo->Gender)) { - sLog->outError("Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid gender (%hu) - refusing to do so", + sLog->outError(LOG_FILTER_PLAYER, "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid gender (%hu) - refusing to do so", GetSession()->GetAccountId(), m_name.c_str(), createInfo->Gender); return false; } @@ -1228,7 +1228,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) } // item can't be added - sLog->outError("STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg); + sLog->outError(LOG_FILTER_PLAYER, "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg); return false; } @@ -1295,7 +1295,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage) { if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage { - sLog->outStaticDebug("We are fall to death, loosing 10 percents durability"); + sLog->outDebug(LOG_FILTER_PLAYER, "We are fall to death, loosing 10 percents durability"); DurabilityLossAll(0.10f, false); // durability lost message WorldPacket data2(SMSG_DURABILITY_DAMAGE_DEATH, 0); @@ -1532,9 +1532,9 @@ void Player::Update(uint32 p_time) //ASSERT (!m_spellModTakingSpell); if (m_spellModTakingSpell) { - //sLog->outCrash("Player has m_pad %u during update!", m_pad); + //sLog->outFatal(LOG_FILTER_PLAYER, "Player has m_pad %u during update!", m_pad); //if (m_spellModTakingSpell) - sLog->outCrash("Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id); + sLog->outFatal(LOG_FILTER_PLAYER, "Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id); m_spellModTakingSpell = NULL; } @@ -1731,7 +1731,7 @@ void Player::Update(uint32 p_time) { // m_nextSave reseted in SaveToDB call SaveToDB(); - sLog->outDetail("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow()); + sLog->outInfo(LOG_FILTER_PLAYER, "Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow()); } else m_nextSave -= p_time; @@ -1821,7 +1821,7 @@ void Player::setDeathState(DeathState s) { if (!cur) { - sLog->outError("setDeathState: attempt to kill a dead player %s(%d)", GetName(), GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "setDeathState: attempt to kill a dead player %s(%d)", GetName(), GetGUIDLow()); return; } @@ -1879,12 +1879,12 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data) PlayerInfo const* info = sObjectMgr->GetPlayerInfo(plrRace, plrClass); if (!info) { - sLog->outError("Player %u has incorrect race/class pair. Don't build enum.", guid); + sLog->outError(LOG_FILTER_PLAYER, "Player %u has incorrect race/class pair. Don't build enum.", guid); return false; } else if (!IsValidGender(gender)) { - sLog->outError("Player (%u) has incorrect gender (%hu), don't build enum.", guid, gender); + sLog->outError(LOG_FILTER_PLAYER, "Player (%u) has incorrect gender (%hu), don't build enum.", guid, gender); return false; } @@ -2066,14 +2066,14 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati { if (!MapManager::IsValidMapCoord(mapid, x, y, z, orientation)) { - sLog->outError("TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (GUID: %u, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).", + sLog->outError(LOG_FILTER_PLAYER, "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (GUID: %u, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).", mapid, x, y, z, orientation, GetGUIDLow(), GetName(), GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); return false; } if (AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, mapid, this)) { - sLog->outError("Player (GUID: %u, name: %s) tried to enter a forbidden map %u", GetGUIDLow(), GetName(), mapid); + sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u, name: %s) tried to enter a forbidden map %u", GetGUIDLow(), GetName(), mapid); SendTransferAborted(mapid, TRANSFER_ABORT_MAP_NOT_ALLOWED); return false; } @@ -2426,7 +2426,7 @@ void Player::RemoveFromWorld() { if (WorldObject* viewpoint = GetViewpoint()) { - sLog->outCrash("Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId()); + sLog->outFatal(LOG_FILTER_PLAYER, "Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId()); SetViewpoint(viewpoint, false); } } @@ -3355,7 +3355,7 @@ void Player::SendInitialSpells() GetSession()->SendPacket(&data); - sLog->outDetail("CHARACTER: Sent Initial Spells"); + sLog->outInfo(LOG_FILTER_PLAYER, "CHARACTER: Sent Initial Spells"); } void Player::RemoveMail(uint32 id) @@ -3436,7 +3436,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) // do character spell book cleanup (all characters) if (!IsInWorld() && !learning) // spell load case { - sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL); @@ -3445,7 +3445,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) CharacterDatabase.Execute(stmt); } else - sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId); return false; } @@ -3455,7 +3455,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) // do character spell book cleanup (all characters) if (!IsInWorld() && !learning) // spell load case { - sLog->outError("Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.", spellId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL); @@ -3464,7 +3464,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) CharacterDatabase.Execute(stmt); } else - sLog->outError("Player::addTalent: Broken spell #%u learning not allowed.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addTalent: Broken spell #%u learning not allowed.", spellId); return false; } @@ -3509,7 +3509,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent // do character spell book cleanup (all characters) if (!IsInWorld() && !learning) // spell load case { - sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL); @@ -3518,7 +3518,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent CharacterDatabase.Execute(stmt); } else - sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId); return false; } @@ -3528,7 +3528,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent // do character spell book cleanup (all characters) if (!IsInWorld() && !learning) // spell load case { - sLog->outError("Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.", spellId); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL); @@ -3537,7 +3537,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent CharacterDatabase.Execute(stmt); } else - sLog->outError("Player::addSpell: Broken spell #%u learning not allowed.", spellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Broken spell #%u learning not allowed.", spellId); return false; } @@ -4291,7 +4291,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result) if (!sSpellMgr->GetSpellInfo(spell_id)) { - sLog->outError("Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id); + sLog->outError(LOG_FILTER_PLAYER, "Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id); continue; } @@ -4965,7 +4965,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC break; } default: - sLog->outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method); + sLog->outError(LOG_FILTER_PLAYER, "Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method); } if (updateRealmChars) @@ -4995,7 +4995,7 @@ void Player::DeleteOldCharacters() */ void Player::DeleteOldCharacters(uint32 keepDays) { - sLog->outString("Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays); + sLog->outInfo(LOG_FILTER_PLAYER, "Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_OLD_CHARS); stmt->setUInt32(0, uint32(time(NULL) - time_t(keepDays * DAY))); @@ -5003,7 +5003,7 @@ void Player::DeleteOldCharacters(uint32 keepDays) if (result) { - sLog->outString("Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount()); + sLog->outInfo(LOG_FILTER_PLAYER, "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount()); do { Field* fields = result->Fetch(); @@ -5023,7 +5023,7 @@ void Player::SetMovement(PlayerMovementType pType) case MOVE_WATER_WALK: data.Initialize(SMSG_MOVE_WATER_WALK, GetPackGUID().size()+4); break; case MOVE_LAND_WALK: data.Initialize(SMSG_MOVE_LAND_WALK, GetPackGUID().size()+4); break; default: - sLog->outError("Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType); + sLog->outError(LOG_FILTER_PLAYER, "Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType); return; } data.append(GetPackGUID()); @@ -5052,7 +5052,7 @@ void Player::BuildPlayerRepop() // the player cannot have a corpse already, only bones which are not returned by GetCorpse if (GetCorpse()) { - sLog->outError("BuildPlayerRepop: player %s(%d) already has a corpse", GetName(), GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "BuildPlayerRepop: player %s(%d) already has a corpse", GetName(), GetGUIDLow()); return; } @@ -5061,7 +5061,7 @@ void Player::BuildPlayerRepop() Corpse* corpse = GetCorpse(); if (!corpse) { - sLog->outError("Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow()); return; } GetMap()->AddToMap(corpse); @@ -5418,7 +5418,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g DurabilityCostsEntry const* dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel); if (!dcost) { - sLog->outError("RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel); + sLog->outError(LOG_FILTER_PLAYER, "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel); return TotalCost; } @@ -5426,7 +5426,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g DurabilityQualityEntry const* dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId); if (!dQualitymodEntry) { - sLog->outError("RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId); + sLog->outError(LOG_FILTER_PLAYER, "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId); return TotalCost; } @@ -5442,7 +5442,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g { if (GetGuildId() == 0) { - sLog->outStaticDebug("You are not member of a guild"); + sLog->outDebug(LOG_FILTER_PLAYER, "You are not member of a guild"); return TotalCost; } @@ -5457,7 +5457,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g } else if (!HasEnoughMoney(costs)) { - sLog->outStaticDebug("You do not have enough money"); + sLog->outDebug(LOG_FILTER_PLAYER, "You do not have enough money"); return TotalCost; } else @@ -5665,7 +5665,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa { if (modGroup >= BASEMOD_END || modType >= MOD_END) { - sLog->outError("ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!"); + sLog->outError(LOG_FILTER_PLAYER, "ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!"); return; } @@ -5696,7 +5696,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const { if (modGroup >= BASEMOD_END || modType > MOD_END) { - sLog->outError("trial to access non existed BaseModGroup or wrong BaseModType!"); + sLog->outError(LOG_FILTER_PLAYER, "trial to access non existed BaseModGroup or wrong BaseModType!"); return 0.0f; } @@ -5710,7 +5710,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const { if (modGroup >= BASEMOD_END) { - sLog->outError("wrong BaseModGroup in GetTotalBaseModValue()!"); + sLog->outError(LOG_FILTER_PLAYER, "wrong BaseModGroup in GetTotalBaseModValue()!"); return 0.0f; } @@ -6432,7 +6432,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id); if (!pSkill) { - sLog->outError("Skill not found in SkillLineStore: skill #%u", id); + sLog->outError(LOG_FILTER_PLAYER, "Skill not found in SkillLineStore: skill #%u", id); return; } @@ -6592,7 +6592,7 @@ int16 Player::GetSkillTempBonusValue(uint32 skill) const void Player::SendActionButtons(uint32 state) const { - sLog->outDetail("Sending Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec); + sLog->outInfo(LOG_FILTER_PLAYER, "Sending Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec); WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4)); data << uint8(state); @@ -6615,20 +6615,20 @@ void Player::SendActionButtons(uint32 state) const } GetSession()->SendPacket(&data); - sLog->outDetail("Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec); + sLog->outInfo(LOG_FILTER_PLAYER, "Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec); } bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) { if (button >= MAX_ACTION_BUTTONS) { - sLog->outError("Action %u not added into button %u for player %s: button must be < %u", action, button, GetName(), MAX_ACTION_BUTTONS); + sLog->outError(LOG_FILTER_PLAYER, "Action %u not added into button %u for player %s: button must be < %u", action, button, GetName(), MAX_ACTION_BUTTONS); return false; } if (action >= MAX_ACTION_BUTTON_ACTION_VALUE) { - sLog->outError("Action %u not added into button %u for player %s: action must be < %u", action, button, GetName(), MAX_ACTION_BUTTON_ACTION_VALUE); + sLog->outError(LOG_FILTER_PLAYER, "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName(), MAX_ACTION_BUTTON_ACTION_VALUE); return false; } @@ -6637,7 +6637,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) case ACTION_BUTTON_SPELL: if (!sSpellMgr->GetSpellInfo(action)) { - sLog->outError("Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName()); + sLog->outError(LOG_FILTER_PLAYER, "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName()); return false; } @@ -6650,7 +6650,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) case ACTION_BUTTON_ITEM: if (!sObjectMgr->GetItemTemplate(action)) { - sLog->outError("Item action %u not added into button %u for player %s: item not exist", action, button, GetName()); + sLog->outError(LOG_FILTER_PLAYER, "Item action %u not added into button %u for player %s: item not exist", action, button, GetName()); return false; } break; @@ -6672,7 +6672,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type) // set data and update to CHANGED if not NEW ab.SetActionAndType(action, ActionButtonType(type)); - sLog->outDetail("Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button); + sLog->outInfo(LOG_FILTER_PLAYER, "Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button); return &ab; } @@ -6687,7 +6687,7 @@ void Player::removeActionButton(uint8 button) else buttonItr->second.uState = ACTIONBUTTON_DELETED; // saved, will deleted at next save - sLog->outDetail("Action Button '%u' Removed from Player '%u'", button, GetGUIDLow()); + sLog->outInfo(LOG_FILTER_PLAYER, "Action Button '%u' Removed from Player '%u'", button, GetGUIDLow()); } ActionButton const* Player::GetActionButton(uint8 button) @@ -6799,7 +6799,7 @@ void Player::CheckAreaExploreAndOutdoor() if (offset >= PLAYER_EXPLORED_ZONES_SIZE) { - sLog->outError("Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE); + sLog->outError(LOG_FILTER_PLAYER, "Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE); return; } @@ -6815,7 +6815,7 @@ void Player::CheckAreaExploreAndOutdoor() AreaTableEntry const* areaEntry = GetAreaEntryByAreaFlagAndMap(areaFlag, GetMapId()); if (!areaEntry) { - sLog->outError("Player %u discovered unknown area (x: %f y: %f z: %f map: %u", GetGUIDLow(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId()); + sLog->outError(LOG_FILTER_PLAYER, "Player %u discovered unknown area (x: %f y: %f z: %f map: %u", GetGUIDLow(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId()); return; } @@ -6852,7 +6852,7 @@ void Player::CheckAreaExploreAndOutdoor() GiveXP(XP, NULL); SendExplorationExperience(area, XP); } - sLog->outDetail("Player %u discovered a new area: %u", GetGUIDLow(), area); + sLog->outInfo(LOG_FILTER_PLAYER, "Player %u discovered a new area: %u", GetGUIDLow(), area); } } } @@ -6866,10 +6866,10 @@ uint32 Player::TeamForRace(uint8 race) case 1: return HORDE; case 7: return ALLIANCE; } - sLog->outError("Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID); + sLog->outError(LOG_FILTER_PLAYER, "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID); } else - sLog->outError("Race (%u) not found in DBC: wrong DBC files?", uint32(race)); + sLog->outError(LOG_FILTER_PLAYER, "Race (%u) not found in DBC: wrong DBC files?", uint32(race)); return ALLIANCE; } @@ -7698,7 +7698,7 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply) if (item->IsBroken()) return; - sLog->outDetail("applying mods for item %u ", item->GetGUIDLow()); + sLog->outInfo(LOG_FILTER_PLAYER, "applying mods for item %u ", item->GetGUIDLow()); uint8 attacktype = Player::GetAttackBySlot(slot); @@ -8184,7 +8184,7 @@ void Player::ApplyEquipSpell(SpellInfo const* spellInfo, Item* item, bool apply, return; } - sLog->outStaticDebug("WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id); + sLog->outDebug(LOG_FILTER_PLAYER, "WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id); CastSpell(this, spellInfo, true, item); } @@ -8290,7 +8290,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId); if (!spellInfo) { - sLog->outError("WORLD: unknown Item spellid %i", spellData.SpellId); + sLog->outError(LOG_FILTER_PLAYER, "WORLD: unknown Item spellid %i", spellData.SpellId); continue; } @@ -8359,7 +8359,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); if (!spellInfo) { - sLog->outError("Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...", + sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...", GetGUIDLow(), GetName(), pEnchant->ID, pEnchant->spellid[s]); continue; } @@ -8404,7 +8404,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id); if (!spellInfo) { - sLog->outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id); + sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id); SendEquipError(EQUIP_ERR_NONE, item, NULL); return; } @@ -8436,7 +8436,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId); if (!spellInfo) { - sLog->outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId); + sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId); continue; } @@ -8464,7 +8464,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); if (!spellInfo) { - sLog->outError("Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]); + sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]); continue; } @@ -9693,7 +9693,7 @@ uint32 Player::GetXPRestBonus(uint32 xp) SetRestBonus(GetRestBonus() - rested_bonus); - sLog->outDetail("Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp+rested_bonus, rested_bonus, GetRestBonus()); + sLog->outInfo(LOG_FILTER_PLAYER, "Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp+rested_bonus, rested_bonus, GetRestBonus()); return rested_bonus; } @@ -9725,7 +9725,7 @@ void Player::ResetPetTalents() CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError("Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + sLog->outError(LOG_FILTER_PLAYER, "Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); return; } pet->resetTalents(); @@ -11628,7 +11628,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest uint8 pItemslot = pItem->GetSlot(); if (pItemslot >= CURRENCYTOKEN_SLOT_START && pItemslot < CURRENCYTOKEN_SLOT_END) { - sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!", + sLog->outError(LOG_FILTER_PLAYER, "Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!", GetName(), GetGUIDLow(), pItem->GetGUIDLow(), pProto->ItemId); return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED; } @@ -12267,7 +12267,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update) SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cooldownSpell); if (!spellProto) - sLog->outError("Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell); + sLog->outError(LOG_FILTER_PLAYER, "Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell); else { m_weaponChangeTimer = spellProto->StartRecoveryTime; @@ -14030,7 +14030,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool // nothing do.. break; default: - sLog->outError("Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type); + sLog->outError(LOG_FILTER_PLAYER, "Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type); break; } /*switch (enchant_display_type)*/ } /*for*/ @@ -14202,7 +14202,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool VendorItemData const* vendorItems = creature->GetVendorItems(); if (!vendorItems || vendorItems->Empty()) { - sLog->outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", creature->GetGUIDLow(), creature->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", creature->GetGUIDLow(), creature->GetEntry()); canTalk = false; } break; @@ -14251,7 +14251,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool canTalk = false; break; default: - sLog->outErrorDb("Creature entry %u have unknown gossip option %u for menu %u", creature->GetEntry(), itr->second.OptionType, itr->second.MenuId); + sLog->outError(LOG_FILTER_SQL, "Creature entry %u have unknown gossip option %u for menu %u", creature->GetEntry(), itr->second.OptionType, itr->second.MenuId); canTalk = false; break; } @@ -14346,7 +14346,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men { if (gossipOptionId > GOSSIP_OPTION_QUESTGIVER) { - sLog->outError("Player guid %u request invalid gossip option for GameObject entry %u", GetGUIDLow(), source->GetEntry()); + sLog->outError(LOG_FILTER_PLAYER, "Player guid %u request invalid gossip option for GameObject entry %u", GetGUIDLow(), source->GetEntry()); return; } } @@ -14450,7 +14450,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men if (bgTypeId == BATTLEGROUND_TYPE_NONE) { - sLog->outError("a user (guid %u) requested battlegroundlist from a npc who is no battlemaster", GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "a user (guid %u) requested battlegroundlist from a npc who is no battlemaster", GetGUIDLow()); return; } @@ -16522,7 +16522,7 @@ void Player::_LoadArenaTeamInfo(PreparedQueryResult result) ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(arenaTeamId); if (!arenaTeam) { - sLog->outError("Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenaTeamId); + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenaTeamId); continue; } @@ -16673,7 +16673,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (!result) { - sLog->outError("Player (GUID: %u) not found in table `characters`, can't load. ", guid); + sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) not found in table `characters`, can't load. ", guid); return false; } @@ -16685,13 +16685,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) // player should be able to load/delete character only with correct account! if (dbAccountId != GetSession()->GetAccountId()) { - sLog->outError("Player (GUID: %u) loading from wrong account (is: %u, should be: %u)", guid, GetSession()->GetAccountId(), dbAccountId); + sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) loading from wrong account (is: %u, should be: %u)", guid, GetSession()->GetAccountId(), dbAccountId); return false; } if (holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBANNED)) { - sLog->outError("Player (GUID: %u) is banned, can't load.", guid); + sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) is banned, can't load.", guid); return false; } @@ -16719,7 +16719,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) uint8 Gender = fields[5].GetUInt8(); if (!IsValidGender(Gender)) { - sLog->outError("Player (GUID: %u) has wrong gender (%hu), can't be loaded.", guid, Gender); + sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) has wrong gender (%hu), can't be loaded.", guid, Gender); return false; } @@ -16842,7 +16842,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); if (!mapEntry || !IsPositionValid()) { - sLog->outError("Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); RelocateToHomebind(); } // Player was saved in Arena or Bg @@ -16880,7 +16880,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (mapId == MAPID_INVALID) // Battleground Entry Point not found (???) { - sLog->outError("Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid); + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid); RelocateToHomebind(); } else @@ -16902,7 +16902,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) // transport size limited m_movementInfo.t_pos.m_positionX > 250 || m_movementInfo.t_pos.m_positionY > 250 || m_movementInfo.t_pos.m_positionZ > 250) { - sLog->outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.", + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.", guid, GetPositionX()+m_movementInfo.t_pos.m_positionX, GetPositionY()+m_movementInfo.t_pos.m_positionY, GetPositionZ()+m_movementInfo.t_pos.m_positionZ, GetOrientation()+m_movementInfo.t_pos.m_orientation); @@ -16922,7 +16922,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) } if (!m_transport) { - sLog->outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.", + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.", guid, transGUID); RelocateToHomebind(); @@ -16949,12 +16949,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (!nodeEntry) // don't know taxi start node, to homebind { - sLog->outError("Character %u have wrong data in taxi destination list, teleport to homebind.", GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Character %u have wrong data in taxi destination list, teleport to homebind.", GetGUIDLow()); RelocateToHomebind(); } else // have start node, to it { - sLog->outError("Character %u have too short taxi destination list, teleport to original node.", GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Character %u have too short taxi destination list, teleport to original node.", GetGUIDLow()); mapId = nodeEntry->map_id; Relocate(nodeEntry->x, nodeEntry->y, nodeEntry->z, 0.0f); } @@ -17004,13 +17004,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(mapId); if (at) { - sLog->outError("Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); Relocate(at->target_X, at->target_Y, at->target_Z, GetOrientation()); mapId = at->target_mapId; } else { - sLog->outError("Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); RelocateToHomebind(); } @@ -17020,11 +17020,11 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); mapId = info->mapId; Relocate(info->positionX, info->positionY, info->positionZ, 0.0f); - sLog->outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); map = sMapMgr->CreateMap(mapId, this); if (!map) { - sLog->outError("Player (guidlow %d) has invalid default map coordinates (X: %f Y: %f Z: %f O: %f). or instance couldn't be created", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); + sLog->outError(LOG_FILTER_PLAYER, "Player (guidlow %d) has invalid default map coordinates (X: %f Y: %f Z: %f O: %f). or instance couldn't be created", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); return false; } } @@ -17038,7 +17038,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) Relocate(at->target_X, at->target_Y, at->target_Z, at->target_Orientation); else { - sLog->outError("Player %s(GUID: %u) logged in to a reset instance (map: %u) and there is no area-trigger leading to this map. Thus he can't be ported back to the entrance. This _might_ be an exploit attempt.", GetName(), GetGUIDLow(), mapId); + sLog->outError(LOG_FILTER_PLAYER, "Player %s(GUID: %u) logged in to a reset instance (map: %u) and there is no area-trigger leading to this map. Thus he can't be ported back to the entrance. This _might_ be an exploit attempt.", GetName(), GetGUIDLow(), mapId); RelocateToHomebind(); } } @@ -17082,7 +17082,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) m_stableSlots = fields[32].GetUInt8(); if (m_stableSlots > MAX_PET_STABLES) { - sLog->outError("Player can have not more %u stable slots, but have in DB %u", MAX_PET_STABLES, uint32(m_stableSlots)); + sLog->outError(LOG_FILTER_PLAYER, "Player can have not more %u stable slots, but have in DB %u", MAX_PET_STABLES, uint32(m_stableSlots)); m_stableSlots = MAX_PET_STABLES; } @@ -17160,7 +17160,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (m_specsCount > MAX_TALENT_SPECS || m_activeSpec > MAX_TALENT_SPEC || m_specsCount < MIN_TALENT_SPECS) { m_activeSpec = 0; - sLog->outError("Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName(), GetGUIDLow(), m_specsCount, m_activeSpec); + sLog->outError(LOG_FILTER_PLAYER, "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName(), GetGUIDLow(), m_specsCount, m_activeSpec); } _LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADTALENTS)); @@ -17365,7 +17365,7 @@ void Player::_LoadActions(PreparedQueryResult result) ab->uState = ACTIONBUTTON_UNCHANGED; else { - sLog->outError(" ...at loading, and will deleted in DB also"); + sLog->outError(LOG_FILTER_PLAYER, " ...at loading, and will deleted in DB also"); // Will deleted in DB at next save (it can create data until save but marked as deleted) m_actionButtons[button].uState = ACTIONBUTTON_DELETED; @@ -17409,7 +17409,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) { - sLog->outError("Unknown aura (spellid %u), ignore.", spellid); + sLog->outError(LOG_FILTER_PLAYER, "Unknown aura (spellid %u), ignore.", spellid); continue; } @@ -17443,7 +17443,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff) aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]); aura->ApplyForTargets(); - sLog->outDetail("Added aura spellid %u, effectmask %u", spellInfo->Id, effmask); + sLog->outInfo(LOG_FILTER_PLAYER, "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask); } } while (result->NextRow()); @@ -17466,13 +17466,13 @@ void Player::_LoadGlyphAuras() continue; } else - sLog->outError("Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags); + sLog->outError(LOG_FILTER_PLAYER, "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags); } else - sLog->outError("Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i); + sLog->outError(LOG_FILTER_PLAYER, "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i); } else - sLog->outError("Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i); + sLog->outError(LOG_FILTER_PLAYER, "Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i); // On any error remove glyph SetGlyph(i, 0); @@ -17582,7 +17582,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) } else { - sLog->outError("Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?", + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?", GetGUIDLow(), GetName(), item->GetGUIDLow(), item->GetEntry(), bagGuid, slot); item->DeleteFromInventoryDB(trans); delete item; @@ -17596,7 +17596,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) item->SetState(ITEM_UNCHANGED, this); else { - sLog->outError("Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which can't be loaded into inventory (Bag GUID: %u, slot: %u) by reason %u. Item will be sent by mail.", + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which can't be loaded into inventory (Bag GUID: %u, slot: %u) by reason %u. Item will be sent by mail.", GetGUIDLow(), GetName(), item->GetGUIDLow(), item->GetEntry(), bagGuid, slot, err); item->DeleteFromInventoryDB(trans); problematicItems.push_back(item); @@ -17722,7 +17722,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F } else { - sLog->outError("Player::_LoadInventory: player (GUID: %u, name: '%s') has broken item (GUID: %u, entry: %u) in inventory. Deleting item.", + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has broken item (GUID: %u, entry: %u) in inventory. Deleting item.", GetGUIDLow(), GetName(), itemGuid, itemEntry); remove = true; } @@ -17737,7 +17737,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F } else { - sLog->outError("Player::_LoadInventory: player (GUID: %u, name: '%s') has unknown item (entry: %u) in inventory. Deleting item.", + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has unknown item (entry: %u) in inventory. Deleting item.", GetGUIDLow(), GetName(), itemEntry); Item::DeleteFromInventoryDB(trans, itemGuid); Item::DeleteFromDB(trans, itemGuid); @@ -17768,7 +17768,7 @@ void Player::_LoadMailedItems(Mail* mail) if (!proto) { - sLog->outError("Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), itemGuid, itemTemplate, mail->messageID); + sLog->outError(LOG_FILTER_PLAYER, "Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), itemGuid, itemTemplate, mail->messageID); stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_MAIL_ITEM); stmt->setUInt32(0, itemGuid); @@ -17784,7 +17784,7 @@ void Player::_LoadMailedItems(Mail* mail) if (!item->LoadFromDB(itemGuid, MAKE_NEW_GUID(fields[13].GetUInt32(), 0, HIGHGUID_PLAYER), fields, itemTemplate)) { - sLog->outError("Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, itemGuid); + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, itemGuid); stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_ITEM); stmt->setUInt32(0, itemGuid); @@ -17847,7 +17847,7 @@ void Player::_LoadMail() if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId)) { - sLog->outError("Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId); + sLog->outError(LOG_FILTER_PLAYER, "Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId); m->mailTemplateId = 0; } @@ -17904,7 +17904,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) else { questStatusData.Status = QUEST_STATUS_INCOMPLETE; - sLog->outError("Player %s (GUID: %u) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).", + sLog->outError(LOG_FILTER_PLAYER, "Player %s (GUID: %u) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).", GetName(), GetGUIDLow(), quest_id, qstatus); } @@ -18028,7 +18028,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result) if (quest_daily_idx >= PLAYER_MAX_DAILY_QUESTS) // max amount with exist data in query { - sLog->outError("Player (GUID: %u) have more 25 daily quest records in `charcter_queststatus_daily`", GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u) have more 25 daily quest records in `charcter_queststatus_daily`", GetGUIDLow()); break; } @@ -18159,12 +18159,12 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); if (!mapEntry || !mapEntry->IsDungeon()) { - sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName(), GetGUIDLow(), mapId); + sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName(), GetGUIDLow(), mapId); deleteInstance = true; } else if (difficulty >= MAX_DIFFICULTY) { - sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); + sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); deleteInstance = true; } else @@ -18172,12 +18172,12 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, Difficulty(difficulty)); if (!mapDiff) { - sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); + sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId); deleteInstance = true; } else if (!perm && group) { - sLog->outError("_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d, %d, %d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty); + sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d, %d, %d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty); deleteInstance = true; } } @@ -18523,7 +18523,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result) PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); if (!info) { - sLog->outError("Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName()); + sLog->outError(LOG_FILTER_PLAYER, "Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName()); return false; } @@ -18571,7 +18571,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result) CharacterDatabase.Execute(stmt); } - sLog->outStaticDebug("Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f", + sLog->outDebug(LOG_FILTER_PLAYER, "Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f", m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ); return true; @@ -19015,7 +19015,7 @@ void Player::_SaveInventory(SQLTransaction& trans) } else { - sLog->outError("Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow()); m_refundableItems.erase(itr); } } @@ -19046,7 +19046,7 @@ void Player::_SaveInventory(SQLTransaction& trans) uint32 bagTestGUID = 0; if (Item* test2 = GetItemByPos(INVENTORY_SLOT_BAG_0, item->GetBagSlot())) bagTestGUID = test2->GetGUIDLow(); - sLog->outError("Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u (state %d) are incorrect, the player doesn't have an item at that position!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), (int32)item->GetState()); + sLog->outError(LOG_FILTER_PLAYER, "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u (state %d) are incorrect, the player doesn't have an item at that position!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), (int32)item->GetState()); // according to the test that was just performed nothing should be in this slot, delete stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INVENTORY_BY_BAG_SLOT); stmt->setUInt32(0, bagTestGUID); @@ -19062,7 +19062,7 @@ void Player::_SaveInventory(SQLTransaction& trans) } else if (test != item) { - sLog->outError("Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u are incorrect, the item with guid %u is there instead!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u are incorrect, the item with guid %u is there instead!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow()); // save all changes to the item... if (item->GetState() != ITEM_NEW) // only for existing items, no dupes item->SaveToDB(trans); @@ -19472,7 +19472,7 @@ void Player::_SaveStats(SQLTransaction& trans) void Player::outDebugValues() const { - if (!sLog->IsOutDebug()) // optimize disabled debug output + if (!sLog->ShouldLog(LOG_FILTER_UNITS, LOG_LEVEL_DEBUG)) return; sLog->outDebug(LOG_FILTER_UNITS, "HP is: \t\t\t%u\t\tMP is: \t\t\t%u", GetMaxHealth(), GetMaxPower(POWER_MANA)); @@ -19792,7 +19792,7 @@ Pet* Player::GetPet() const return pet; //there may be a guardian in slot - //sLog->outError("Player::GetPet: Pet %u not exist.", GUID_LOPART(pet_guid)); + //sLog->outError(LOG_FILTER_PLAYER, "Player::GetPet: Pet %u not exist.", GUID_LOPART(pet_guid)); //const_cast(this)->SetPetGUID(0); } @@ -19894,10 +19894,10 @@ void Player::StopCastingCharm() if (GetCharmGUID()) { - sLog->outCrash("Player %s (GUID: " UI64FMTD " is not able to uncharm unit (GUID: " UI64FMTD " Entry: %u, Type: %u)", GetName(), GetGUID(), GetCharmGUID(), charm->GetEntry(), charm->GetTypeId()); + sLog->outFatal(LOG_FILTER_PLAYER, "Player %s (GUID: " UI64FMTD " is not able to uncharm unit (GUID: " UI64FMTD " Entry: %u, Type: %u)", GetName(), GetGUID(), GetCharmGUID(), charm->GetEntry(), charm->GetTypeId()); if (charm->GetCharmerGUID()) { - sLog->outCrash("Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID()); + sLog->outFatal(LOG_FILTER_PLAYER, "Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID()); ASSERT(false); } else @@ -20089,7 +20089,7 @@ void Player::PossessSpellInitialize() if (!charmInfo) { - sLog->outError("Player::PossessSpellInitialize(): charm ("UI64FMTD") has no charminfo!", charm->GetGUID()); + sLog->outError(LOG_FILTER_PLAYER, "Player::PossessSpellInitialize(): charm ("UI64FMTD") has no charminfo!", charm->GetGUID()); return; } @@ -20201,7 +20201,7 @@ void Player::CharmSpellInitialize() CharmInfo* charmInfo = charm->GetCharmInfo(); if (!charmInfo) { - sLog->outError("Player::CharmSpellInitialize(): the player's charm ("UI64FMTD") has no charminfo!", charm->GetGUID()); + sLog->outError(LOG_FILTER_PLAYER, "Player::CharmSpellInitialize(): the player's charm ("UI64FMTD") has no charminfo!", charm->GetGUID()); return; } @@ -20912,7 +20912,7 @@ void Player::InitDisplayIds() PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); if (!info) { - sLog->outError("Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow()); + sLog->outError(LOG_FILTER_PLAYER, "Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow()); return; } @@ -20928,7 +20928,7 @@ void Player::InitDisplayIds() SetNativeDisplayId(info->displayId_m); break; default: - sLog->outError("Invalid gender %u for player", gender); + sLog->outError(LOG_FILTER_PLAYER, "Invalid gender %u for player", gender); return; } } @@ -21065,7 +21065,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost); if (!iece) { - sLog->outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost); + sLog->outError(LOG_FILTER_PLAYER, "Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost); return false; } @@ -21108,7 +21108,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 uint32 maxCount = MAX_MONEY_AMOUNT / pProto->BuyPrice; if ((uint32)count > maxCount) { - sLog->outError("Player %s tried to buy %u item id %u, causing overflow", GetName(), (uint32)count, pProto->ItemId); + sLog->outError(LOG_FILTER_PLAYER, "Player %s tried to buy %u item id %u, causing overflow", GetName(), (uint32)count, pProto->ItemId); count = (uint8)maxCount; } price = pProto->BuyPrice * count; //it should not exceed MAX_MONEY_AMOUNT @@ -21588,7 +21588,7 @@ void Player::SetBattlegroundEntryPoint() if (const WorldSafeLocsEntry* entry = sObjectMgr->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam())) m_bgData.joinPos = WorldLocation(entry->map_id, entry->x, entry->y, entry->z, 0.0f); else - sLog->outError("SetBattlegroundEntryPoint: Dungeon map %u has no linked graveyard, setting home location as entry point.", GetMapId()); + sLog->outError(LOG_FILTER_PLAYER, "SetBattlegroundEntryPoint: Dungeon map %u has no linked graveyard, setting home location as entry point.", GetMapId()); } // If new entry point is not BG or arena set it else if (!GetMap()->IsBattlegroundOrArena()) @@ -22822,7 +22822,7 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons break; } default: - sLog->outError("HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass); + sLog->outError(LOG_FILTER_PLAYER, "HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass); break; } @@ -22900,7 +22900,7 @@ uint32 Player::GetResurrectionSpellId() case 27239: spell_id = 27240; break; // rank 6 case 47883: spell_id = 47882; break; // rank 7 default: - sLog->outError("Unhandled spell %u: S.Resurrection", (*itr)->GetId()); + sLog->outError(LOG_FILTER_PLAYER, "Unhandled spell %u: S.Resurrection", (*itr)->GetId()); continue; } @@ -23456,7 +23456,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) if (!AddUInt64Value(PLAYER_FARSIGHT, target->GetGUID())) { - sLog->outCrash("Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName()); + sLog->outFatal(LOG_FILTER_PLAYER, "Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName()); return; } @@ -23472,7 +23472,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) if (!RemoveUInt64Value(PLAYER_FARSIGHT, target->GetGUID())) { - sLog->outCrash("Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName()); + sLog->outFatal(LOG_FILTER_PLAYER, "Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName()); return; } @@ -23949,7 +23949,7 @@ void Player::_LoadSkills(PreparedQueryResult result) SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill); if (!pSkill) { - sLog->outError("Character %u has skill %u that does not exist.", GetGUIDLow(), skill); + sLog->outError(LOG_FILTER_PLAYER, "Character %u has skill %u that does not exist.", GetGUIDLow(), skill); continue; } @@ -23967,7 +23967,7 @@ void Player::_LoadSkills(PreparedQueryResult result) } if (value == 0) { - sLog->outError("Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill); + sLog->outError(LOG_FILTER_PLAYER, "Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_SKILL); @@ -23996,7 +23996,7 @@ void Player::_LoadSkills(PreparedQueryResult result) if (count >= PLAYER_MAX_SKILLS) // client limit { - sLog->outError("Character %u has more than %u skills.", GetGUIDLow(), PLAYER_MAX_SKILLS); + sLog->outError(LOG_FILTER_PLAYER, "Character %u has more than %u skills.", GetGUIDLow(), PLAYER_MAX_SKILLS); break; } } @@ -24164,7 +24164,7 @@ void Player::HandleFall(MovementInfo const& movementInfo) } //Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction - sLog->outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d", movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall); + sLog->outDebug(LOG_FILTER_PLAYER, "FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d", movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall); } } RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING); // No fly zone - Parachute @@ -24278,7 +24278,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) uint32 spellid = talentInfo->RankID[talentRank]; if (spellid == 0) { - sLog->outError("Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank); + sLog->outError(LOG_FILTER_PLAYER, "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank); return; } @@ -24290,7 +24290,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) learnSpell(spellid, false); AddTalent(spellid, m_activeSpec, true); - sLog->outDetail("TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec); + sLog->outInfo(LOG_FILTER_PLAYER, "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec); // update free talent points SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1)); @@ -24415,7 +24415,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) uint32 spellid = talentInfo->RankID[talentRank]; if (spellid == 0) { - sLog->outError("Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank); + sLog->outError(LOG_FILTER_PLAYER, "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank); return; } @@ -24425,7 +24425,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) // learn! (other talent ranks will unlearned at learning) pet->learnSpell(spellid); - sLog->outDetail("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid); + sLog->outInfo(LOG_FILTER_PLAYER, "PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid); // update free talent points pet->SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1)); @@ -24739,7 +24739,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset) if (!found) // something wrong... { - sLog->outError("Player %s tried to save equipment set "UI64FMTD" (index %u), but that equipment set not found!", GetName(), eqset.Guid, index); + sLog->outError(LOG_FILTER_PLAYER, "Player %s tried to save equipment set "UI64FMTD" (index %u), but that equipment set not found!", GetName(), eqset.Guid, index); return; } } diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 95c6d308626..238b6e9cd5a 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -35,8 +35,8 @@ void MapManager::LoadTransports() if (!result) { - sLog->outString(">> Loaded 0 transports. DB table `transports` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transports. DB table `transports` is empty!"); + return; } @@ -56,17 +56,17 @@ void MapManager::LoadTransports() if (!goinfo) { - sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str()); + sLog->outError(LOG_FILTER_SQL, "Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str()); continue; } if (goinfo->type != GAMEOBJECT_TYPE_MO_TRANSPORT) { - sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str()); + sLog->outError(LOG_FILTER_SQL, "Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str()); continue; } - // sLog->outString("Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name); + // sLog->outInfo(LOG_FILTER_TRANSPORTS, "Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name); std::set mapsUsed; @@ -74,7 +74,7 @@ void MapManager::LoadTransports() if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed)) // skip transports with empty waypoints list { - sLog->outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId); + sLog->outError(LOG_FILTER_SQL, "Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId); delete t; continue; } @@ -116,13 +116,13 @@ void MapManager::LoadTransports() uint32 guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); std::string name = fields[2].GetString(); - sLog->outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports must not have any records in `gameobject` or its behavior will be unpredictable/bugged.", entry, name.c_str(), guid); + sLog->outError(LOG_FILTER_SQL, "Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports must not have any records in `gameobject` or its behavior will be unpredictable/bugged.", entry, name.c_str(), guid); } while (result->NextRow()); } - sLog->outString(">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void MapManager::LoadTransportNPCs() @@ -134,8 +134,8 @@ void MapManager::LoadTransportNPCs() if (!result) { - sLog->outString(">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!"); + return; } @@ -166,8 +166,8 @@ void MapManager::LoadTransportNPCs() } while (result->NextRow()); - sLog->outString(">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } Transport::Transport(uint32 period, uint32 script) : GameObject(), m_pathTime(0), m_timer(0), @@ -197,7 +197,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa if (!IsPositionValid()) { - sLog->outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", + sLog->outError(LOG_FILTER_TRANSPORTS, "Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, x, y); return false; } @@ -208,7 +208,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa if (!goinfo) { - sLog->outErrorDb("Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f", guidlow, mapid, x, y, z, ang); + sLog->outError(LOG_FILTER_SQL, "Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f", guidlow, mapid, x, y, z, ang); return false; } @@ -354,7 +354,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set &mapids) } // for (int i = 0; i < keyFrames.size(); ++i) { - // sLog->outString("%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo); + // sLog->outInfo(LOG_FILTER_TRANSPORTS, "%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo); // } // Now we're completely set up; we can move along the length of each waypoint at 100 ms intervals @@ -397,7 +397,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set &mapids) cM = keyFrames[i].node->mapid; } - // sLog->outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ); + // sLog->outInfo(LOG_FILTER_TRANSPORTS, "T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ); if (teleport) m_WayPoints[t] = WayPoint(keyFrames[i].node->mapid, newX, newY, newZ, teleport, 0); } @@ -445,14 +445,14 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set &mapids) m_WayPoints[t] = WayPoint(keyFrames[i + 1].node->mapid, keyFrames[i + 1].node->x, keyFrames[i + 1].node->y, keyFrames[i + 1].node->z, teleport, 0, keyFrames[i + 1].node->arrivalEventID, keyFrames[i + 1].node->departureEventID); - // sLog->outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport); + // sLog->outInfo(LOG_FILTER_TRANSPORTS, "T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport); t += keyFrames[i + 1].node->delay * 1000; } uint32 timer = t; - // sLog->outDetail(" Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer); + // sLog->outInfo(LOG_FILTER_TRANSPORTS, " Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer); m_curr = m_WayPoints.begin(); m_next = GetNextWayPoint(); @@ -511,7 +511,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) bool Transport::AddPassenger(Player* passenger) { if (m_passengers.insert(passenger).second) - sLog->outDetail("Player %s boarded transport %s.", passenger->GetName(), GetName()); + sLog->outInfo(LOG_FILTER_TRANSPORTS, "Player %s boarded transport %s.", passenger->GetName(), GetName()); sScriptMgr->OnAddPassenger(this, passenger); return true; @@ -520,7 +520,7 @@ bool Transport::AddPassenger(Player* passenger) bool Transport::RemovePassenger(Player* passenger) { if (m_passengers.erase(passenger)) - sLog->outDetail("Player %s removed from transport %s.", passenger->GetName(), GetName()); + sLog->outInfo(LOG_FILTER_TRANSPORTS, "Player %s removed from transport %s.", passenger->GetName(), GetName()); sScriptMgr->OnRemovePassenger(this, passenger); return true; @@ -531,7 +531,7 @@ void Transport::Update(uint32 p_diff) if (!AI()) { if (!AIM_Initialize()) - sLog->outError("Could not initialize GameObjectAI for Transport"); + sLog->outError(LOG_FILTER_TRANSPORTS, "Could not initialize GameObjectAI for Transport"); } else AI()->UpdateAI(p_diff); @@ -660,7 +660,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, if (!creature->IsPositionValid()) { - sLog->outError("Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)", creature->GetGUIDLow(), creature->GetEntry(), creature->GetPositionX(), creature->GetPositionY()); + sLog->outError(LOG_FILTER_TRANSPORTS, "Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)", creature->GetGUIDLow(), creature->GetEntry(), creature->GetPositionX(), creature->GetPositionY()); delete creature; return 0; } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6158e08b859..d65d717c236 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -629,10 +629,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam return 0; } - sLog->outStaticDebug("DealDamageStart"); + sLog->outDebug(LOG_FILTER_UNITS, "DealDamageStart"); uint32 health = victim->GetHealth(); - sLog->outDetail("deal dmg:%d to health:%d ", damage, health); + sLog->outInfo(LOG_FILTER_UNITS, "deal dmg:%d to health:%d ", damage, health); // duel ends when player has 1 or less hp bool duel_hasEnded = false; @@ -686,7 +686,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam if (health <= damage) { - sLog->outStaticDebug("DealDamage: victim just died"); + sLog->outDebug(LOG_FILTER_UNITS, "DealDamage: victim just died"); if (victim->GetTypeId() == TYPEID_PLAYER && victim != this) { @@ -701,7 +701,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam } else { - sLog->outStaticDebug("DealDamageAlive"); + sLog->outDebug(LOG_FILTER_UNITS, "DealDamageAlive"); if (victim->GetTypeId() == TYPEID_PLAYER) victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, damage); @@ -785,7 +785,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam } } - sLog->outStaticDebug("DealDamageEnd returned %d damage", damage); + sLog->outDebug(LOG_FILTER_UNITS, "DealDamageEnd returned %d damage", damage); return damage; } @@ -801,7 +801,7 @@ void Unit::CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo { if (!spellInfo) { - sLog->outError("CastSpell: unknown spell by caster: %s %u)", (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); + sLog->outError(LOG_FILTER_UNITS, "CastSpell: unknown spell by caster: %s %u)", (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } @@ -829,7 +829,7 @@ void Unit::CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError("CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); + sLog->outError(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } @@ -872,7 +872,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const& value, Unit* SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError("CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); + sLog->outError(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } SpellCastTargets targets; @@ -886,7 +886,7 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError("CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); + sLog->outError(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } SpellCastTargets targets; @@ -900,7 +900,7 @@ void Unit::CastSpell(GameObject* go, uint32 spellId, bool triggered, Item* castI SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError("CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); + sLog->outError(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } SpellCastTargets targets; @@ -1881,10 +1881,10 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext DealMeleeDamage(&damageInfo, true); if (GetTypeId() == TYPEID_PLAYER) - sLog->outStaticDebug("AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.", + sLog->outDebug(LOG_FILTER_UNITS, "AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.", GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist); else - sLog->outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.", + sLog->outDebug(LOG_FILTER_UNITS, "AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.", GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist); } } @@ -1915,7 +1915,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy float parry_chance = victim->GetUnitParryChance(); // Useful if want to specify crit & miss chances for melee, else it could be removed - sLog->outStaticDebug("MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance, crit_chance, dodge_chance, parry_chance, block_chance); + sLog->outDebug(LOG_FILTER_UNITS, "MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance, crit_chance, dodge_chance, parry_chance, block_chance); return RollMeleeOutcomeAgainst(victim, attType, int32(crit_chance*100), int32(miss_chance*100), int32(dodge_chance*100), int32(parry_chance*100), int32(block_chance*100)); } @@ -1936,22 +1936,22 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT int32 sum = 0, tmp = 0; int32 roll = urand (0, 10000); - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus); - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d", + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d", roll, miss_chance, dodge_chance, parry_chance, block_chance, crit_chance); tmp = miss_chance; if (tmp > 0 && roll < (sum += tmp)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: MISS"); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: MISS"); return MELEE_HIT_MISS; } // always crit against a sitting target (except 0 crit chance) if (victim->GetTypeId() == TYPEID_PLAYER && crit_chance > 0 && !victim->IsStandState()) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT (sitting victim)"); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRIT (sitting victim)"); return MELEE_HIT_CRIT; } @@ -1960,7 +1960,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT // only players can't dodge if attacker is behind if (victim->GetTypeId() == TYPEID_PLAYER && !victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind and victim was a player."); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: attack came from behind and victim was a player."); } else { @@ -1979,7 +1979,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT && ((tmp -= skillBonus) > 0) && roll < (sum += tmp)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum); return MELEE_HIT_DODGE; } } @@ -1988,7 +1988,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT // check if attack comes from behind, nobody can parry or block if attacker is behind if (!victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION)) - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind."); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: attack came from behind."); else { // Reduce parry chance by attacker expertise rating @@ -2004,7 +2004,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT && (tmp2 -= skillBonus) > 0 && roll < (sum += tmp2)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum); return MELEE_HIT_PARRY; } } @@ -2016,7 +2016,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT && (tmp -= skillBonus) > 0 && roll < (sum += tmp)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum); return MELEE_HIT_BLOCK; } } @@ -2027,9 +2027,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT if (tmp > 0 && roll < (sum += tmp)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum); if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT)) - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT DISABLED)"); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRIT DISABLED)"); else return MELEE_HIT_CRIT; } @@ -2049,7 +2049,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT tmp = tmp > 4000 ? 4000 : tmp; if (roll < (sum += tmp)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum); return MELEE_HIT_GLANCING; } } @@ -2073,13 +2073,13 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT tmp = tmp * 200 - 1500; if (roll < (sum += tmp)) { - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum); return MELEE_HIT_CRUSHING; } } } - sLog->outStaticDebug ("RollMeleeOutcomeAgainst: NORMAL"); + sLog->outDebug(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: NORMAL"); return MELEE_HIT_NORMAL; } @@ -2144,7 +2144,7 @@ void Unit::SendMeleeAttackStart(Unit* victim) data << uint64(GetGUID()); data << uint64(victim->GetGUID()); SendMessageToSet(&data, true); - sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sent SMSG_ATTACKSTART"); } void Unit::SendMeleeAttackStop(Unit* victim) @@ -2154,12 +2154,12 @@ void Unit::SendMeleeAttackStop(Unit* victim) data.append(victim ? victim->GetPackGUID() : 0); data << uint32(0); //! Can also take the value 0x01, which seems related to updating rotation SendMessageToSet(&data, true); - sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTOP"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sent SMSG_ATTACKSTOP"); if (victim) - sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow()); + sLog->outInfo(LOG_FILTER_UNITS, "%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow()); else - sLog->outDetail("%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow()); + sLog->outInfo(LOG_FILTER_UNITS, "%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow()); } bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType) @@ -2329,7 +2329,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell) case MELEE_HIT_BLOCK: canBlock = false; break; case MELEE_HIT_PARRY: canParry = false; break; default: - sLog->outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue()); + sLog->outDebug(LOG_FILTER_UNITS, "Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue()); break; } } @@ -4769,7 +4769,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo) data << float(pInfo->multiplier); // gain multiplier break; default: - sLog->outError("Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType())); + sLog->outError(LOG_FILTER_UNITS, "Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType())); return; } @@ -4930,7 +4930,7 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!triggerEntry) { - sLog->outError("Unit::HandleHasteAuraProc: Spell %u has non-existing triggered spell %u", hasteSpell->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleHasteAuraProc: Spell %u has non-existing triggered spell %u", hasteSpell->Id, triggered_spell_id); return false; } @@ -4988,7 +4988,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit* victim, uint32 /*damage*/, AuraEf if (!triggerEntry) { - sLog->outError("Unit::HandleHasteAuraProc: Spell %u has non-existing triggered spell %u", triggeredByAuraSpell->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleHasteAuraProc: Spell %u has non-existing triggered spell %u", triggeredByAuraSpell->Id, triggered_spell_id); return false; } @@ -5630,7 +5630,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 31571: triggered_spell_id = 57529; break; case 31572: triggered_spell_id = 57531; break; default: - sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u", dummySpell->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u", dummySpell->Id); return false; } break; @@ -5716,7 +5716,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 12847: basepoints0 = int32(0.16f * damage); break; case 12848: basepoints0 = int32(0.20f * damage); break; default: - sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u (IG)", dummySpell->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u (IG)", dummySpell->Id); return false; } @@ -5834,7 +5834,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 29834: triggered_spell_id=29841; break; case 42770: triggered_spell_id=42771; break; default: - sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u (SW)", dummySpell->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u (SW)", dummySpell->Id); return false; } @@ -7070,7 +7070,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 3787:spellId = 58804; break; // 8 Rank default: { - sLog->outError("Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)", + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)", castItem->GetEnchantmentId(EnchantmentSlot(TEMP_ENCHANTMENT_SLOT)), dummySpell->Id); return false; } @@ -7079,7 +7079,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere SpellInfo const* windfurySpellInfo = sSpellMgr->GetSpellInfo(spellId); if (!windfurySpellInfo) { - sLog->outError("Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId); return false; } @@ -7409,7 +7409,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 49270: spellId = 49268; break; // Rank 7 case 49271: spellId = 49269; break; // Rank 8 default: - sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id); return false; } @@ -7723,7 +7723,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!triggerEntry) { - sLog->outError("Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); return false; } @@ -7781,7 +7781,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit* victim, uint32 /*damage*/, AuraEffec // Try handle unknown trigger spells if (!triggerEntry) { - sLog->outError("Unit::HandleObsModEnergyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleObsModEnergyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); return false; } @@ -7834,7 +7834,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit* victim, uint32 /*damage*/, Aura if (!triggerEntry) { - sLog->outError("Unit::HandleModDamagePctTakenAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleModDamagePctTakenAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id); return false; } @@ -8221,7 +8221,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg trigger_spell_id = 31643; break; default: - sLog->outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id); return false; } } @@ -8297,7 +8297,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 27815: trigger_spell_id = 27817; break; case 27816: trigger_spell_id = 27818; break; default: - sLog->outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id); return false; } basepoints0 = CalculatePctN(int32(damage), triggerAmount) / 3; @@ -8357,7 +8357,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg trigger_spell_id = 63468; break; default: - sLog->outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id); return false; } SpellInfo const* TriggerPS = sSpellMgr->GetSpellInfo(trigger_spell_id); @@ -8470,14 +8470,14 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 48820: originalSpellId = 48824; break; case 48821: originalSpellId = 48825; break; default: - sLog->outError("Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id); return false; } } SpellInfo const* originalSpell = sSpellMgr->GetSpellInfo(originalSpellId); if (!originalSpell) { - sLog->outError("Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId); return false; } // percent stored in effect 1 (class scripts) base points @@ -8631,7 +8631,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg if (triggerEntry == NULL) { // Don't cast unknown spell - // sLog->outError("Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex()); + // sLog->outError(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex()); return false; } @@ -9140,7 +9140,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au if (!triggerEntry) { - sLog->outError("Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u", triggered_spell_id, scriptId); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u", triggered_spell_id, scriptId); return false; } @@ -9207,11 +9207,11 @@ FactionTemplateEntry const* Unit::getFactionTemplateEntry() const if (GetGUID() != guid) { if (Player const* player = ToPlayer()) - sLog->outError("Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction()); + sLog->outError(LOG_FILTER_UNITS, "Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction()); else if (Creature const* creature = ToCreature()) - sLog->outError("Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction()); + sLog->outError(LOG_FILTER_UNITS, "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction()); else - sLog->outError("Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName(), uint32(GetTypeId()), getFaction()); + sLog->outError(LOG_FILTER_UNITS, "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName(), uint32(GetTypeId()), getFaction()); guid = GetGUID(); } @@ -9559,7 +9559,7 @@ void Unit::RemoveAllAttackers() AttackerSet::iterator iter = m_attackers.begin(); if (!(*iter)->AttackStop()) { - sLog->outError("WORLD: Unit has an attacker that isn't attacking it!"); + sLog->outError(LOG_FILTER_UNITS, "WORLD: Unit has an attacker that isn't attacking it!"); m_attackers.erase(iter); } } @@ -9727,7 +9727,7 @@ Minion *Unit::GetFirstMinion() const if (pet->HasUnitTypeMask(UNIT_MASK_MINION)) return (Minion*)pet; - sLog->outError("Unit::GetFirstMinion: Minion %u not exist.", GUID_LOPART(pet_guid)); + sLog->outError(LOG_FILTER_UNITS, "Unit::GetFirstMinion: Minion %u not exist.", GUID_LOPART(pet_guid)); const_cast(this)->SetMinionGUID(0); } @@ -9742,7 +9742,7 @@ Guardian* Unit::GetGuardianPet() const if (pet->HasUnitTypeMask(UNIT_MASK_GUARDIAN)) return (Guardian*)pet; - sLog->outCrash("Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid); + sLog->outFatal(LOG_FILTER_UNITS, "Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid); const_cast(this)->SetPetGUID(0); } @@ -9756,7 +9756,7 @@ Unit* Unit::GetCharm() const if (Unit* pet = ObjectAccessor::GetUnit(*this, charm_guid)) return pet; - sLog->outError("Unit::GetCharm: Charmed creature %u not exist.", GUID_LOPART(charm_guid)); + sLog->outError(LOG_FILTER_UNITS, "Unit::GetCharm: Charmed creature %u not exist.", GUID_LOPART(charm_guid)); const_cast(this)->SetUInt64Value(UNIT_FIELD_CHARM, 0); } @@ -9771,7 +9771,7 @@ void Unit::SetMinion(Minion *minion, bool apply) { if (minion->GetOwnerGUID()) { - sLog->outCrash("SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry()); + sLog->outFatal(LOG_FILTER_UNITS, "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry()); return; } @@ -9845,7 +9845,7 @@ void Unit::SetMinion(Minion *minion, bool apply) { if (minion->GetOwnerGUID() != GetGUID()) { - sLog->outCrash("SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry()); + sLog->outFatal(LOG_FILTER_UNITS, "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry()); return; } @@ -9957,7 +9957,7 @@ void Unit::SetCharm(Unit* charm, bool apply) if (GetTypeId() == TYPEID_PLAYER) { if (!AddUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID())) - sLog->outCrash("Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID()); charm->m_ControlledByPlayer = true; // TODO: maybe we can use this flag to check if controlled by player @@ -9970,7 +9970,7 @@ void Unit::SetCharm(Unit* charm, bool apply) charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1)); if (!charm->AddUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID())) - sLog->outCrash("Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID()); if (charm->HasUnitMovementFlag(MOVEMENTFLAG_WALKING)) { @@ -9985,11 +9985,11 @@ void Unit::SetCharm(Unit* charm, bool apply) if (GetTypeId() == TYPEID_PLAYER) { if (!RemoveUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID())) - sLog->outCrash("Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID()); } if (!charm->RemoveUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID())) - sLog->outCrash("Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID()); if (charm->GetTypeId() == TYPEID_PLAYER) { @@ -10123,14 +10123,14 @@ void Unit::RemoveAllControlled() else if (target->GetOwnerGUID() == GetGUID() && target->isSummon()) target->ToTempSummon()->UnSummon(); else - sLog->outError("Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry()); } if (GetPetGUID()) - sLog->outCrash("Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID()); if (GetMinionGUID()) - sLog->outCrash("Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID()); if (GetCharmGUID()) - sLog->outCrash("Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID()); } Unit* Unit::GetNextRandomRaidMemberOrPet(float radius) @@ -12609,7 +12609,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) break; } default: - sLog->outError("Unit::UpdateSpeed: Unsupported move type (%d)", mtype); + sLog->outError(LOG_FILTER_UNITS, "Unit::UpdateSpeed: Unsupported move type (%d)", mtype); return; } @@ -12716,7 +12716,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced) data.Initialize(MSG_MOVE_SET_PITCH_RATE, 8+4+2+4+4+4+4+4+4+4); break; default: - sLog->outError("Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype); + sLog->outError(LOG_FILTER_UNITS, "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype); return; } @@ -12767,7 +12767,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced) data.Initialize(SMSG_FORCE_PITCH_RATE_CHANGE, 16); break; default: - sLog->outError("Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype); + sLog->outError(LOG_FILTER_UNITS, "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype); return; } data.append(GetPackGUID()); @@ -13425,7 +13425,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f { if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END) { - sLog->outError("ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!"); + sLog->outError(LOG_FILTER_UNITS, "ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!"); return false; } @@ -13490,7 +13490,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co { if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END) { - sLog->outError("attempt to access non-existing modifier value from UnitMods!"); + sLog->outError(LOG_FILTER_UNITS, "attempt to access non-existing modifier value from UnitMods!"); return 0.0f; } @@ -13520,7 +13520,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const { if (unitMod >= UNIT_MOD_END) { - sLog->outError("attempt to access non-existing UnitMods in GetTotalAuraModValue()!"); + sLog->outError(LOG_FILTER_UNITS, "attempt to access non-existing UnitMods in GetTotalAuraModValue()!"); return 0.0f; } @@ -13801,7 +13801,7 @@ void Unit::RemoveFromWorld() if (GetCharmerGUID()) { - sLog->outCrash("Unit %u has charmer guid when removed from world", GetEntry()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u has charmer guid when removed from world", GetEntry()); ASSERT(false); } @@ -13809,7 +13809,7 @@ void Unit::RemoveFromWorld() { if (owner->m_Controlled.find(this) != owner->m_Controlled.end()) { - sLog->outCrash("Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry()); ASSERT(false); } } @@ -15238,7 +15238,7 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id) if (!pet->InitStatsForLevel(level)) { - sLog->outError("Pet::InitStatsForLevel() failed for creature (Entry: %u)!", pet->GetEntry()); + sLog->outError(LOG_FILTER_UNITS, "Pet::InitStatsForLevel() failed for creature (Entry: %u)!", pet->GetEntry()); return false; } @@ -15416,7 +15416,7 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura) damageSpellId = 43594; break; default: - sLog->outError("Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id); + sLog->outError(LOG_FILTER_UNITS, "Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id); return false; } @@ -15578,7 +15578,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) if (!spiritOfRedemption) { - sLog->outStaticDebug("SET JUST_DIED"); + sLog->outDebug(LOG_FILTER_UNITS, "SET JUST_DIED"); victim->setDeathState(JUST_DIED); } @@ -15603,7 +15603,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) // only if not player and not controlled by player pet. And not at BG if ((durabilityLoss && !player && !victim->ToPlayer()->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP))) { - sLog->outStaticDebug("We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH)); + sLog->outDebug(LOG_FILTER_UNITS, "We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH)); plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false); // durability lost message WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0); @@ -15623,7 +15623,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) } else // creature died { - sLog->outStaticDebug("DealDamageNotPlayer"); + sLog->outDebug(LOG_FILTER_UNITS, "DealDamageNotPlayer"); if (!creature->isPet()) { @@ -15958,7 +15958,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au if (this == charmer) { - sLog->outCrash("Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow()); return false; } @@ -15967,14 +15967,14 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->GetTransport()) { - sLog->outCrash("Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow()); return false; } // Already charmed if (GetCharmerGUID()) { - sLog->outCrash("Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow()); return false; } @@ -15999,7 +15999,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au // StopCastingCharm may remove a possessed pet? if (!IsInWorld()) { - sLog->outCrash("Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow()); + sLog->outFatal(LOG_FILTER_UNITS, "Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow()); return false; } @@ -16099,7 +16099,7 @@ void Unit::RemoveCharmedBy(Unit* charmer) charmer = GetCharmer(); if (charmer != GetCharmer()) // one aura overrides another? { -// sLog->outCrash("Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD, +// sLog->outFatal(LOG_FILTER_UNITS, "Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD, // GetGUID(), GetCharmerGUID(), charmer->GetGUID()); // ASSERT(false); return; @@ -16177,7 +16177,7 @@ void Unit::RemoveCharmedBy(Unit* charmer) if (GetCharmInfo()) GetCharmInfo()->SetPetNumber(0, true); else - sLog->outError("Aura::HandleModCharm: target="UI64FMTD" with typeid=%d has a charm aura but no charm info!", GetGUID(), GetTypeId()); + sLog->outError(LOG_FILTER_UNITS, "Aura::HandleModCharm: target="UI64FMTD" with typeid=%d has a charm aura but no charm info!", GetGUID(), GetTypeId()); } } break; @@ -16982,7 +16982,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) if (!valid) { - sLog->outErrorDb("Spell %u specified in npc_spellclick_spells is not a valid vehicle enter aura!", itr->second.spellId); + sLog->outError(LOG_FILTER_SQL, "Spell %u specified in npc_spellclick_spells is not a valid vehicle enter aura!", itr->second.spellId); return false; } @@ -17418,39 +17418,44 @@ void Unit::StopAttackFaction(uint32 faction_id) void Unit::OutDebugInfo() const { - sLog->outError("Unit::OutDebugInfo"); - sLog->outString("GUID "UI64FMTD", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName()); - sLog->outString("OwnerGUID "UI64FMTD", MinionGUID "UI64FMTD", CharmerGUID "UI64FMTD", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID()); - sLog->outString("In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask); + sLog->outError(LOG_FILTER_UNITS, "Unit::OutDebugInfo"); + sLog->outInfo(LOG_FILTER_UNITS, "GUID "UI64FMTD", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName()); + sLog->outInfo(LOG_FILTER_UNITS, "OwnerGUID "UI64FMTD", MinionGUID "UI64FMTD", CharmerGUID "UI64FMTD", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID()); + sLog->outInfo(LOG_FILTER_UNITS, "In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask); if (IsInWorld()) - sLog->outString("Mapid %u", GetMapId()); + sLog->outInfo(LOG_FILTER_UNITS, "Mapid %u", GetMapId()); - sLog->outStringInLine("Summon Slot: "); + std::ostringstream o; + o << "Summon Slot: "; for (uint32 i = 0; i < MAX_SUMMON_SLOT; ++i) - sLog->outStringInLine(UI64FMTD", ", m_SummonSlot[i]); - sLog->outString(); + o << m_SummonSlot[i] << ", "; - sLog->outStringInLine("Controlled List: "); + sLog->outInfo(LOG_FILTER_UNITS, "%s", o.str().c_str()); + o.str(""); + + o << "Controlled List: "; for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) - sLog->outStringInLine(UI64FMTD", ", (*itr)->GetGUID()); - sLog->outString(); + o << (*itr)->GetGUID() << ", "; + sLog->outInfo(LOG_FILTER_UNITS, "%s", o.str().c_str()); + o.str(""); - sLog->outStringInLine("Aura List: "); + o << "Aura List: "; for (AuraApplicationMap::const_iterator itr = m_appliedAuras.begin(); itr != m_appliedAuras.end(); ++itr) - sLog->outStringInLine("%u, ", itr->first); - sLog->outString(); + o << itr->first << ", "; + sLog->outInfo(LOG_FILTER_UNITS, "%s", o.str().c_str()); + o.str(""); if (IsVehicle()) { - sLog->outStringInLine("Passenger List: "); + o << "Passenger List: "; for (SeatMap::iterator itr = GetVehicleKit()->Seats.begin(); itr != GetVehicleKit()->Seats.end(); ++itr) if (Unit* passenger = ObjectAccessor::GetUnit(*GetVehicleBase(), itr->second.Passenger)) - sLog->outStringInLine(UI64FMTD", ", passenger->GetGUID()); - sLog->outString(); + o << passenger->GetGUID() << ", "; + sLog->outInfo(LOG_FILTER_UNITS, "%s", o.str().c_str()); } if (GetVehicle()) - sLog->outString("On vehicle %u.", GetVehicleBase()->GetEntry()); + sLog->outInfo(LOG_FILTER_UNITS, "On vehicle %u.", GetVehicleBase()->GetEntry()); } uint32 Unit::GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex) const diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index d5e85d2cf2f..e1141f785e1 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -210,8 +210,8 @@ void GameEventMgr::LoadFromDB() if (!result) { mGameEvent.clear(); - sLog->outErrorDb(">> Loaded 0 game events. DB table `game_event` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 game events. DB table `game_event` is empty."); + return; } @@ -223,7 +223,7 @@ void GameEventMgr::LoadFromDB() uint8 event_id = fields[0].GetUInt8(); if (event_id == 0) { - sLog->outErrorDb("`game_event` game event entry 0 is reserved and can't be used."); + sLog->outError(LOG_FILTER_SQL, "`game_event` game event entry 0 is reserved and can't be used."); continue; } @@ -241,7 +241,7 @@ void GameEventMgr::LoadFromDB() if (pGameEvent.length == 0 && pGameEvent.state == GAMEEVENT_NORMAL) // length>0 is validity check { - sLog->outErrorDb("`game_event` game event id (%i) isn't a world event and has length = 0, thus it can't be used.", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event` game event id (%i) isn't a world event and has length = 0, thus it can't be used.", event_id); continue; } @@ -249,7 +249,7 @@ void GameEventMgr::LoadFromDB() { if (!sHolidaysStore.LookupEntry(pGameEvent.holiday_id)) { - sLog->outErrorDb("`game_event` game event id (%i) have not existed holiday id %u.", event_id, pGameEvent.holiday_id); + sLog->outError(LOG_FILTER_SQL, "`game_event` game event id (%i) have not existed holiday id %u.", event_id, pGameEvent.holiday_id); pGameEvent.holiday_id = HOLIDAY_NONE; } } @@ -260,11 +260,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } - sLog->outString("Loading Game Event Saves Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Saves Data..."); { uint32 oldMSTime = getMSTime(); @@ -273,8 +273,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty."); + } else { @@ -287,7 +287,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_save` game event entry (%i) is out of range compared to max event entry in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_save` game event entry (%i) is out of range compared to max event entry in `game_event`", event_id); continue; } @@ -298,7 +298,7 @@ void GameEventMgr::LoadFromDB() } else { - sLog->outErrorDb("game_event_save includes event save for non-worldevent id %u", event_id); + sLog->outError(LOG_FILTER_SQL, "game_event_save includes event save for non-worldevent id %u", event_id); continue; } @@ -306,12 +306,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Prerequisite Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Prerequisite Data..."); { uint32 oldMSTime = getMSTime(); @@ -319,8 +319,8 @@ void GameEventMgr::LoadFromDB() QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite"); if (!result) { - sLog->outString(">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty."); + } else { @@ -333,7 +333,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_prerequisite` game event id (%i) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_prerequisite` game event id (%i) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -342,14 +342,14 @@ void GameEventMgr::LoadFromDB() uint16 prerequisite_event = fields[1].GetUInt32(); if (prerequisite_event >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_prerequisite` game event prerequisite id (%i) is out of range compared to max event id in `game_event`", prerequisite_event); + sLog->outError(LOG_FILTER_SQL, "`game_event_prerequisite` game event prerequisite id (%i) is out of range compared to max event id in `game_event`", prerequisite_event); continue; } mGameEvent[event_id].prerequisite_events.insert(prerequisite_event); } else { - sLog->outErrorDb("game_event_prerequisiste includes event entry for non-worldevent id %u", event_id); + sLog->outError(LOG_FILTER_SQL, "game_event_prerequisiste includes event entry for non-worldevent id %u", event_id); continue; } @@ -357,12 +357,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Creature Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Creature Data..."); { uint32 oldMSTime = getMSTime(); @@ -372,8 +372,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty"); + } else { @@ -389,7 +389,7 @@ void GameEventMgr::LoadFromDB() if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size())) { - sLog->outErrorDb("`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -400,12 +400,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event GO Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event GO Data..."); { uint32 oldMSTime = getMSTime(); @@ -415,8 +415,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty."); + } else { @@ -432,7 +432,7 @@ void GameEventMgr::LoadFromDB() if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size())) { - sLog->outErrorDb("`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -443,12 +443,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Model/Equipment Change Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Model/Equipment Change Data..."); { uint32 oldMSTime = getMSTime(); @@ -458,8 +458,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty."); + } else { @@ -473,7 +473,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEventModelEquip.size()) { - sLog->outErrorDb("`game_event_model_equip` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_model_equip` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -488,7 +488,7 @@ void GameEventMgr::LoadFromDB() { if (!sObjectMgr->GetEquipmentInfo(newModelEquipSet.equipment_id)) { - sLog->outErrorDb("Table `game_event_model_equip` have creature (Guid: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", + sLog->outError(LOG_FILTER_SQL, "Table `game_event_model_equip` have creature (Guid: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", guid, newModelEquipSet.equipment_id); continue; } @@ -500,12 +500,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Quest Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Quest Data..."); { uint32 oldMSTime = getMSTime(); @@ -514,8 +514,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty."); + } else { @@ -530,7 +530,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEventCreatureQuests.size()) { - sLog->outErrorDb("`game_event_creature_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_creature_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -541,12 +541,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event GO Quest Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event GO Quest Data..."); { uint32 oldMSTime = getMSTime(); @@ -555,8 +555,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty."); + } else { @@ -571,7 +571,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEventGameObjectQuests.size()) { - sLog->outErrorDb("`game_event_gameobject_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_gameobject_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -582,12 +582,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Quest Condition Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Quest Condition Data..."); { uint32 oldMSTime = getMSTime(); @@ -596,8 +596,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty."); + } else { @@ -613,7 +613,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_quest_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_quest_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -625,12 +625,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Condition Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Condition Data..."); { uint32 oldMSTime = getMSTime(); @@ -639,8 +639,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty."); + } else { @@ -654,7 +654,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -667,12 +667,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Condition Save Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Condition Save Data..."); { uint32 oldMSTime = getMSTime(); @@ -681,8 +681,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty."); + } else { @@ -696,7 +696,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_condition_save` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_condition_save` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -707,7 +707,7 @@ void GameEventMgr::LoadFromDB() } else { - sLog->outErrorDb("game_event_condition_save contains not present condition evt id %u cond id %u", event_id, condition); + sLog->outError(LOG_FILTER_SQL, "game_event_condition_save contains not present condition evt id %u cond id %u", event_id, condition); continue; } @@ -715,12 +715,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event NPCflag Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event NPCflag Data..."); { uint32 oldMSTime = getMSTime(); @@ -729,8 +729,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty."); + } else { @@ -745,7 +745,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_npcflag` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_npcflag` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -755,12 +755,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Seasonal Quest Relations..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Seasonal Quest Relations..."); { uint32 oldMSTime = getMSTime(); @@ -769,8 +769,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty."); + } else { @@ -784,13 +784,13 @@ void GameEventMgr::LoadFromDB() if (!sObjectMgr->GetQuestTemplate(questId)) { - sLog->outErrorDb("`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId); + sLog->outError(LOG_FILTER_SQL, "`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId); continue; } if (eventEntry >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry); + sLog->outError(LOG_FILTER_SQL, "`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry); continue; } @@ -799,12 +799,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Vendor Additions Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Vendor Additions Data..."); { uint32 oldMSTime = getMSTime(); @@ -813,8 +813,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty."); + } else { @@ -827,7 +827,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEventVendors.size()) { - sLog->outErrorDb("`game_event_npc_vendor` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_npc_vendor` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -865,12 +865,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Battleground Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Battleground Data..."); { uint32 oldMSTime = getMSTime(); @@ -879,8 +879,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty."); + } else { @@ -893,7 +893,7 @@ void GameEventMgr::LoadFromDB() if (event_id >= mGameEvent.size()) { - sLog->outErrorDb("`game_event_battleground_holiday` game event id (%u) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_battleground_holiday` game event id (%u) is out of range compared to max event id in `game_event`", event_id); continue; } @@ -903,12 +903,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } - sLog->outString("Loading Game Event Pool Data..."); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Pool Data..."); { uint32 oldMSTime = getMSTime(); @@ -918,8 +918,8 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 pools for game events. DB table `game_event_pool` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty."); + } else { @@ -935,13 +935,13 @@ void GameEventMgr::LoadFromDB() if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size())) { - sLog->outErrorDb("`game_event_pool` game event id (%i) is out of range compared to max event id in `game_event`", event_id); + sLog->outError(LOG_FILTER_SQL, "`game_event_pool` game event id (%i) is out of range compared to max event id in `game_event`", event_id); continue; } if (!sPoolMgr->CheckPool(entry)) { - sLog->outErrorDb("Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", entry); + sLog->outError(LOG_FILTER_SQL, "Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", entry); continue; } @@ -952,8 +952,8 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } } @@ -1015,7 +1015,7 @@ void GameEventMgr::StartArenaSeason() if (!result) { - sLog->outError("ArenaSeason (%u) must be an existant Arena Season", season); + sLog->outError(LOG_FILTER_GAMEEVENTS, "ArenaSeason (%u) must be an existant Arena Season", season); return; } @@ -1024,13 +1024,13 @@ void GameEventMgr::StartArenaSeason() if (eventId >= mGameEvent.size()) { - sLog->outError("EventEntry %u for ArenaSeason (%u) does not exists", eventId, season); + sLog->outError(LOG_FILTER_GAMEEVENTS, "EventEntry %u for ArenaSeason (%u) does not exists", eventId, season); return; } StartEvent(eventId, true); - sLog->outString("Arena Season %u started...", season); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Arena Season %u started...", season); + } uint32 GameEventMgr::Update() // return the next event delay in ms @@ -1043,7 +1043,7 @@ uint32 GameEventMgr::Update() // return the next e { // must do the activating first, and after that the deactivating // so first queue it - //sLog->outErrorDb("Checking event %u", itr); + //sLog->outError(LOG_FILTER_SQL, "Checking event %u", itr); if (CheckOneGameEvent(itr)) { // if the world event is in NEXTPHASE state, and the time has passed to finish this event, then do so @@ -1099,13 +1099,13 @@ uint32 GameEventMgr::Update() // return the next e nextEventDelay = 0; for (std::set::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr) StopEvent(*itr); - sLog->outDetail("Next game event check in %u seconds.", nextEventDelay + 1); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Next game event check in %u seconds.", nextEventDelay + 1); return (nextEventDelay + 1) * IN_MILLISECONDS; // Add 1 second to be sure event has started/stopped at next call } void GameEventMgr::UnApplyEvent(uint16 event_id) { - sLog->outDetail("GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str()); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str()); //! Run SAI scripts with SMART_EVENT_GAME_EVENT_END RunSmartAIScripts(event_id, false); // un-spawn positive event tagged objects @@ -1137,7 +1137,7 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id) break; } - sLog->outDetail("GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str()); + sLog->outInfo(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str()); //! Run SAI scripts with SMART_EVENT_GAME_EVENT_END RunSmartAIScripts(event_id, true); @@ -1211,7 +1211,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id) if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size())) { - sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")", + sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")", internal_event_id, mGameEventCreatureGuids.size()); return; } @@ -1238,7 +1238,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id) if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size())) { - sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")", + sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")", internal_event_id, mGameEventGameobjectGuids.size()); return; } @@ -1271,7 +1271,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id) if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size())) { - sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", + sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size()); return; } @@ -1286,7 +1286,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id) if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size())) { - sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")", + sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")", internal_event_id, mGameEventCreatureGuids.size()); return; } @@ -1308,7 +1308,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id) if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size())) { - sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")", + sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")", internal_event_id, mGameEventGameobjectGuids.size()); return; } @@ -1329,7 +1329,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id) } if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size())) { - sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size()); + sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size()); return; } diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 9a99a28c7aa..81a132a40d8 100755 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -290,7 +290,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia return NULL; } - sLog->outStaticDebug("Deleting Corpse and spawned bones."); + sLog->outDebug(LOG_FILTER_GENERAL, "Deleting Corpse and spawned bones."); // Map can be NULL Map* map = corpse->FindMap(); diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 92a7a24571e..5b31c6bfff4 100755 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -155,14 +155,14 @@ class ObjectAccessor CellCoord p = Trinity::ComputeCellCoord(x, y); if (!p.IsCoordValid()) { - sLog->outError("ObjectAccessor::GetObjectInWorld: invalid coordinates supplied X:%f Y:%f grid cell [%u:%u]", x, y, p.x_coord, p.y_coord); + sLog->outError(LOG_FILTER_GENERAL, "ObjectAccessor::GetObjectInWorld: invalid coordinates supplied X:%f Y:%f grid cell [%u:%u]", x, y, p.x_coord, p.y_coord); return NULL; } CellCoord q = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY()); if (!q.IsCoordValid()) { - sLog->outError("ObjectAccessor::GetObjecInWorld: object (GUID: %u TypeId: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord); + sLog->outError(LOG_FILTER_GENERAL, "ObjectAccessor::GetObjecInWorld: object (GUID: %u TypeId: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord); return NULL; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index eedf84ab41c..9cbf9ed1ee2 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -296,8 +296,8 @@ void ObjectMgr::LoadCreatureLocales() } } while (result->NextRow()); - sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadGossipMenuItemsLocales() @@ -333,8 +333,8 @@ void ObjectMgr::LoadGossipMenuItemsLocales() } } while (result->NextRow()); - sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadPointOfInterestLocales() @@ -360,8 +360,8 @@ void ObjectMgr::LoadPointOfInterestLocales() AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName); } while (result->NextRow()); - sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadCreatureTemplates() @@ -388,8 +388,8 @@ void ObjectMgr::LoadCreatureTemplates() if (!result) { - sLog->outString(">> Loaded 0 creature template definitions. DB table `creature_template` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature template definitions. DB table `creature_template` is empty."); + return; } @@ -491,8 +491,8 @@ void ObjectMgr::LoadCreatureTemplates() for (CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr) CheckCreatureTemplate(&itr->second); - sLog->outString(">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadCreatureTemplateAddons() @@ -504,8 +504,8 @@ void ObjectMgr::LoadCreatureTemplateAddons() if (!result) { - sLog->outString(">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty."); + return; } @@ -518,7 +518,7 @@ void ObjectMgr::LoadCreatureTemplateAddons() if (!sObjectMgr->GetCreatureTemplate(entry)) { - sLog->outErrorDb("Creature template (Entry: %u) does not exist but has a record in `creature_template_addon`", entry); + sLog->outError(LOG_FILTER_SQL, "Creature template (Entry: %u) does not exist but has a record in `creature_template_addon`", entry); continue; } @@ -538,7 +538,7 @@ void ObjectMgr::LoadCreatureTemplateAddons() SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); if (!AdditionalSpellInfo) { - sLog->outErrorDb("Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr))); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr))); continue; } creatureAddon.auras[i++] = uint32(atol(*itr)); @@ -548,14 +548,14 @@ void ObjectMgr::LoadCreatureTemplateAddons() { if (!sCreatureDisplayInfoStore.LookupEntry(creatureAddon.mount)) { - sLog->outErrorDb("Creature (Entry: %u) has invalid displayInfoId (%u) for mount defined in `creature_template_addon`", entry, creatureAddon.mount); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid displayInfoId (%u) for mount defined in `creature_template_addon`", entry, creatureAddon.mount); creatureAddon.mount = 0; } } if (!sEmotesStore.LookupEntry(creatureAddon.emote)) { - sLog->outErrorDb("Creature (Entry: %u) has invalid emote (%u) defined in `creature_addon`.", entry, creatureAddon.emote); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid emote (%u) defined in `creature_addon`.", entry, creatureAddon.emote); creatureAddon.emote = 0; } @@ -563,8 +563,8 @@ void ObjectMgr::LoadCreatureTemplateAddons() } while (result->NextRow()); - sLog->outString(">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) @@ -582,7 +582,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureTemplate const* difficultyInfo = GetCreatureTemplate(cInfo->DifficultyEntry[diff]); if (!difficultyInfo) { - sLog->outErrorDb("Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u does not exist.", + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u does not exist.", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff]); continue; } @@ -593,20 +593,20 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) ok2 = false; if (_difficultyEntries[diff2].find(cInfo->Entry) != _difficultyEntries[diff2].end()) { - sLog->outErrorDb("Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.", + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.", cInfo->Entry, diff2 + 1, cInfo->DifficultyEntry[diff], diff + 1); continue; } if (_difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _difficultyEntries[diff2].end()) { - sLog->outErrorDb("Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1); continue; } if (_hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _hasDifficultyEntries[diff2].end()) { - sLog->outErrorDb("Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.", + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff], diff2 + 1); continue; } @@ -617,51 +617,51 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if (cInfo->unit_class != difficultyInfo->unit_class) { - sLog->outErrorDb("Creature (Entry: %u, class %u) has different `unit_class` in difficulty %u mode (Entry: %u, class %u).", + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u, class %u) has different `unit_class` in difficulty %u mode (Entry: %u, class %u).", cInfo->Entry, cInfo->unit_class, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->unit_class); continue; } if (cInfo->npcflag != difficultyInfo->npcflag) { - sLog->outErrorDb("Creature (Entry: %u) has different `npcflag` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has different `npcflag` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } if (cInfo->trainer_class != difficultyInfo->trainer_class) { - sLog->outErrorDb("Creature (Entry: %u) has different `trainer_class` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_class` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } if (cInfo->trainer_race != difficultyInfo->trainer_race) { - sLog->outErrorDb("Creature (Entry: %u) has different `trainer_race` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_race` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } if (cInfo->trainer_type != difficultyInfo->trainer_type) { - sLog->outErrorDb("Creature (Entry: %u) has different `trainer_type` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_type` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } if (cInfo->trainer_spell != difficultyInfo->trainer_spell) { - sLog->outErrorDb("Creature (Entry: %u) has different `trainer_spell` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_spell` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } if (!difficultyInfo->AIName.empty()) { - sLog->outErrorDb("Creature (Entry: %u) lists difficulty %u mode entry %u with `AIName` filled in. `AIName` of difficulty 0 mode creature is always used instead.", + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists difficulty %u mode entry %u with `AIName` filled in. `AIName` of difficulty 0 mode creature is always used instead.", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } if (difficultyInfo->ScriptID) { - sLog->outErrorDb("Creature (Entry: %u) lists difficulty %u mode entry %u with `ScriptName` filled in. `ScriptName` of difficulty 0 mode creature is always used instead.", + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists difficulty %u mode entry %u with `ScriptName` filled in. `ScriptName` of difficulty 0 mode creature is always used instead.", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]); continue; } @@ -673,11 +673,11 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_A); if (!factionTemplate) - sLog->outErrorDb("Creature (Entry: %u) has non-existing faction_A template (%u).", cInfo->Entry, cInfo->faction_A); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing faction_A template (%u).", cInfo->Entry, cInfo->faction_A); factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_H); if (!factionTemplate) - sLog->outErrorDb("Creature (Entry: %u) has non-existing faction_H template (%u).", cInfo->Entry, cInfo->faction_H); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing faction_H template (%u).", cInfo->Entry, cInfo->faction_H); // used later for scale CreatureDisplayInfoEntry const* displayScaleEntry = NULL; @@ -687,7 +687,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid1); if (!displayEntry) { - sLog->outErrorDb("Creature (Entry: %u) lists non-existing Modelid1 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid1); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid1 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid1); const_cast(cInfo)->Modelid1 = 0; } else if (!displayScaleEntry) @@ -695,7 +695,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid1); if (!modelInfo) - sLog->outErrorDb("No model data exist for `Modelid1` = %u listed by creature (Entry: %u).", cInfo->Modelid1, cInfo->Entry); + sLog->outError(LOG_FILTER_SQL, "No model data exist for `Modelid1` = %u listed by creature (Entry: %u).", cInfo->Modelid1, cInfo->Entry); } if (cInfo->Modelid2) @@ -703,7 +703,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid2); if (!displayEntry) { - sLog->outErrorDb("Creature (Entry: %u) lists non-existing Modelid2 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid2); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid2 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid2); const_cast(cInfo)->Modelid2 = 0; } else if (!displayScaleEntry) @@ -711,7 +711,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid2); if (!modelInfo) - sLog->outErrorDb("No model data exist for `Modelid2` = %u listed by creature (Entry: %u).", cInfo->Modelid2, cInfo->Entry); + sLog->outError(LOG_FILTER_SQL, "No model data exist for `Modelid2` = %u listed by creature (Entry: %u).", cInfo->Modelid2, cInfo->Entry); } if (cInfo->Modelid3) @@ -719,7 +719,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid3); if (!displayEntry) { - sLog->outErrorDb("Creature (Entry: %u) lists non-existing Modelid3 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid3); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid3 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid3); const_cast(cInfo)->Modelid3 = 0; } else if (!displayScaleEntry) @@ -727,7 +727,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid3); if (!modelInfo) - sLog->outErrorDb("No model data exist for `Modelid3` = %u listed by creature (Entry: %u).", cInfo->Modelid3, cInfo->Entry); + sLog->outError(LOG_FILTER_SQL, "No model data exist for `Modelid3` = %u listed by creature (Entry: %u).", cInfo->Modelid3, cInfo->Entry); } if (cInfo->Modelid4) @@ -735,7 +735,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid4); if (!displayEntry) { - sLog->outErrorDb("Creature (Entry: %u) lists non-existing Modelid4 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid4); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid4 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid4); const_cast(cInfo)->Modelid4 = 0; } else if (!displayScaleEntry) @@ -743,11 +743,11 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid4); if (!modelInfo) - sLog->outErrorDb("No model data exist for `Modelid4` = %u listed by creature (Entry: %u).", cInfo->Modelid4, cInfo->Entry); + sLog->outError(LOG_FILTER_SQL, "No model data exist for `Modelid4` = %u listed by creature (Entry: %u).", cInfo->Modelid4, cInfo->Entry); } if (!displayScaleEntry) - sLog->outErrorDb("Creature (Entry: %u) does not have any existing display id in Modelid1/Modelid2/Modelid3/Modelid4.", cInfo->Entry); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) does not have any existing display id in Modelid1/Modelid2/Modelid3/Modelid4.", cInfo->Entry); for (int k = 0; k < MAX_KILL_CREDIT; ++k) { @@ -755,7 +755,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) { if (!GetCreatureTemplate(cInfo->KillCredit[k])) { - sLog->outErrorDb("Creature (Entry: %u) lists non-existing creature entry %u in `KillCredit%d`.", cInfo->Entry, cInfo->KillCredit[k], k + 1); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing creature entry %u in `KillCredit%d`.", cInfo->Entry, cInfo->KillCredit[k], k + 1); const_cast(cInfo)->KillCredit[k] = 0; } } @@ -763,13 +763,13 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if (!cInfo->unit_class || ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0) { - sLog->outErrorDb("Creature (Entry: %u) has invalid unit_class (%u) in creature_template. Set to 1 (UNIT_CLASS_WARRIOR).", cInfo->Entry, cInfo->unit_class); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid unit_class (%u) in creature_template. Set to 1 (UNIT_CLASS_WARRIOR).", cInfo->Entry, cInfo->unit_class); const_cast(cInfo)->unit_class = UNIT_CLASS_WARRIOR; } if (cInfo->dmgschool >= MAX_SPELL_SCHOOL) { - sLog->outErrorDb("Creature (Entry: %u) has invalid spell school value (%u) in `dmgschool`.", cInfo->Entry, cInfo->dmgschool); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid spell school value (%u) in `dmgschool`.", cInfo->Entry, cInfo->dmgschool); const_cast(cInfo)->dmgschool = SPELL_SCHOOL_NORMAL; } @@ -780,30 +780,30 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) const_cast(cInfo)->rangeattacktime = BASE_ATTACK_TIME; if ((cInfo->npcflag & UNIT_NPC_FLAG_TRAINER) && cInfo->trainer_type >= MAX_TRAINER_TYPE) - sLog->outErrorDb("Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type); if (cInfo->type && !sCreatureTypeStore.LookupEntry(cInfo->type)) { - sLog->outErrorDb("Creature (Entry: %u) has invalid creature type (%u) in `type`.", cInfo->Entry, cInfo->type); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid creature type (%u) in `type`.", cInfo->Entry, cInfo->type); const_cast(cInfo)->type = CREATURE_TYPE_HUMANOID; } // must exist or used hidden but used in data horse case if (cInfo->family && !sCreatureFamilyStore.LookupEntry(cInfo->family) && cInfo->family != CREATURE_FAMILY_HORSE_CUSTOM) { - sLog->outErrorDb("Creature (Entry: %u) has invalid creature family (%u) in `family`.", cInfo->Entry, cInfo->family); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid creature family (%u) in `family`.", cInfo->Entry, cInfo->family); const_cast(cInfo)->family = 0; } if (cInfo->InhabitType <= 0 || cInfo->InhabitType > INHABIT_ANYWHERE) { - sLog->outErrorDb("Creature (Entry: %u) has wrong value (%u) in `InhabitType`, creature will not correctly walk/swim/fly.", cInfo->Entry, cInfo->InhabitType); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%u) in `InhabitType`, creature will not correctly walk/swim/fly.", cInfo->Entry, cInfo->InhabitType); const_cast(cInfo)->InhabitType = INHABIT_ANYWHERE; } if (cInfo->HoverHeight < 0.0f) { - sLog->outErrorDb("Creature (Entry: %u) has wrong value (%f) in `HoverHeight`", cInfo->Entry, cInfo->HoverHeight); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in `HoverHeight`", cInfo->Entry, cInfo->HoverHeight); const_cast(cInfo)->HoverHeight = 1.0f; } @@ -812,7 +812,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) VehicleEntry const* vehId = sVehicleStore.LookupEntry(cInfo->VehicleId); if (!vehId) { - sLog->outErrorDb("Creature (Entry: %u) has a non-existing VehicleId (%u). This *WILL* cause the client to freeze!", cInfo->Entry, cInfo->VehicleId); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has a non-existing VehicleId (%u). This *WILL* cause the client to freeze!", cInfo->Entry, cInfo->VehicleId); const_cast(cInfo)->VehicleId = 0; } } @@ -821,21 +821,21 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) { CreatureSpellDataEntry const* spellDataId = sCreatureSpellDataStore.LookupEntry(cInfo->PetSpellDataId); if (!spellDataId) - sLog->outErrorDb("Creature (Entry: %u) has non-existing PetSpellDataId (%u).", cInfo->Entry, cInfo->PetSpellDataId); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing PetSpellDataId (%u).", cInfo->Entry, cInfo->PetSpellDataId); } for (uint8 j = 0; j < CREATURE_MAX_SPELLS; ++j) { if (cInfo->spells[j] && !sSpellMgr->GetSpellInfo(cInfo->spells[j])) { - sLog->outErrorDb("Creature (Entry: %u) has non-existing Spell%d (%u), set to 0.", cInfo->Entry, j+1, cInfo->spells[j]); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing Spell%d (%u), set to 0.", cInfo->Entry, j+1, cInfo->spells[j]); const_cast(cInfo)->spells[j] = 0; } } if (cInfo->MovementType >= MAX_DB_MOTION_TYPE) { - sLog->outErrorDb("Creature (Entry: %u) has wrong movement generator type (%u), ignored and set to IDLE.", cInfo->Entry, cInfo->MovementType); + sLog->outError(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong movement generator type (%u), ignored and set to IDLE.", cInfo->Entry, cInfo->MovementType); const_cast(cInfo)->MovementType = IDLE_MOTION_TYPE; } @@ -843,7 +843,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) { if (!GetEquipmentInfo(cInfo->equipmentId)) { - sLog->outErrorDb("Table `creature_template` lists creature (Entry: %u) with `equipment_id` %u not found in table `creature_equip_template`, set to no equipment.", cInfo->Entry, cInfo->equipmentId); + sLog->outError(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with `equipment_id` %u not found in table `creature_equip_template`, set to no equipment.", cInfo->Entry, cInfo->equipmentId); const_cast(cInfo)->equipmentId = 0; } } @@ -859,13 +859,13 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if (cInfo->expansion > (MAX_CREATURE_BASE_HP - 1)) { - sLog->outErrorDb("Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion); + sLog->outError(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion); const_cast(cInfo)->expansion = 0; } if (uint32 badFlags = (cInfo->flags_extra & ~CREATURE_FLAG_EXTRA_DB_ALLOWED)) { - sLog->outErrorDb("Table `creature_template` lists creature (Entry: %u) with disallowed `flags_extra` %u, removing incorrect flag.", cInfo->Entry, badFlags); + sLog->outError(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with disallowed `flags_extra` %u, removing incorrect flag.", cInfo->Entry, badFlags); const_cast(cInfo)->flags_extra &= CREATURE_FLAG_EXTRA_DB_ALLOWED; } @@ -881,8 +881,8 @@ void ObjectMgr::LoadCreatureAddons() if (!result) { - sLog->outString(">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty."); + return; } @@ -896,7 +896,7 @@ void ObjectMgr::LoadCreatureAddons() CreatureData const* creData = GetCreatureData(guid); if (!creData) { - sLog->outErrorDb("Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid); continue; } @@ -906,7 +906,7 @@ void ObjectMgr::LoadCreatureAddons() if (creData->movementType == WAYPOINT_MOTION_TYPE && !creatureAddon.path_id) { const_cast(creData)->movementType = IDLE_MOTION_TYPE; - sLog->outErrorDb("Creature (GUID %u) has movement type set to WAYPOINT_MOTION_TYPE but no path assigned", guid); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID %u) has movement type set to WAYPOINT_MOTION_TYPE but no path assigned", guid); } creatureAddon.mount = fields[2].GetUInt32(); @@ -922,7 +922,7 @@ void ObjectMgr::LoadCreatureAddons() SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); if (!AdditionalSpellInfo) { - sLog->outErrorDb("Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr))); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr))); continue; } creatureAddon.auras[i++] = uint32(atol(*itr)); @@ -932,14 +932,14 @@ void ObjectMgr::LoadCreatureAddons() { if (!sCreatureDisplayInfoStore.LookupEntry(creatureAddon.mount)) { - sLog->outErrorDb("Creature (GUID: %u) has invalid displayInfoId (%u) for mount defined in `creature_addon`", guid, creatureAddon.mount); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u) has invalid displayInfoId (%u) for mount defined in `creature_addon`", guid, creatureAddon.mount); creatureAddon.mount = 0; } } if (!sEmotesStore.LookupEntry(creatureAddon.emote)) { - sLog->outErrorDb("Creature (GUID: %u) has invalid emote (%u) defined in `creature_addon`.", guid, creatureAddon.emote); + sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u) has invalid emote (%u) defined in `creature_addon`.", guid, creatureAddon.emote); creatureAddon.emote = 0; } @@ -947,8 +947,8 @@ void ObjectMgr::LoadCreatureAddons() } while (result->NextRow()); - sLog->outString(">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid) @@ -986,8 +986,8 @@ void ObjectMgr::LoadEquipmentTemplates() if (!result) { - sLog->outString(">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!"); + return; } @@ -1013,7 +1013,7 @@ void ObjectMgr::LoadEquipmentTemplates() if (!dbcItem) { - sLog->outErrorDb("Unknown item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u, forced to 0.", + sLog->outError(LOG_FILTER_SQL, "Unknown item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u, forced to 0.", equipmentInfo.ItemEntry[i], i+1, entry); equipmentInfo.ItemEntry[i] = 0; continue; @@ -1029,7 +1029,7 @@ void ObjectMgr::LoadEquipmentTemplates() dbcItem->InventoryType != INVTYPE_THROWN && dbcItem->InventoryType != INVTYPE_RANGEDRIGHT) { - sLog->outErrorDb("Item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u is not equipable in a hand, forced to 0.", + sLog->outError(LOG_FILTER_SQL, "Item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u is not equipable in a hand, forced to 0.", equipmentInfo.ItemEntry[i], i+1, entry); equipmentInfo.ItemEntry[i] = 0; } @@ -1039,8 +1039,8 @@ void ObjectMgr::LoadEquipmentTemplates() } while (result->NextRow()); - sLog->outString(">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId) @@ -1097,7 +1097,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32* display { CreatureModelInfo const* minfo_tmp = GetCreatureModelInfo(modelInfo->modelid_other_gender); if (!minfo_tmp) - sLog->outErrorDb("Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", *displayID, modelInfo->modelid_other_gender); + sLog->outError(LOG_FILTER_SQL, "Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", *displayID, modelInfo->modelid_other_gender); else { // Model ID changed @@ -1117,8 +1117,8 @@ void ObjectMgr::LoadCreatureModelInfo() if (!result) { - sLog->outString(">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty."); + return; } @@ -1141,17 +1141,17 @@ void ObjectMgr::LoadCreatureModelInfo() // Checks if (!sCreatureDisplayInfoStore.LookupEntry(modelId)) - sLog->outErrorDb("Table `creature_model_info` has model for not existed display id (%u).", modelId); + sLog->outError(LOG_FILTER_SQL, "Table `creature_model_info` has model for not existed display id (%u).", modelId); if (modelInfo.gender > GENDER_NONE) { - sLog->outErrorDb("Table `creature_model_info` has wrong gender (%u) for display id (%u).", uint32(modelInfo.gender), modelId); + sLog->outError(LOG_FILTER_SQL, "Table `creature_model_info` has wrong gender (%u) for display id (%u).", uint32(modelInfo.gender), modelId); modelInfo.gender = GENDER_MALE; } if (modelInfo.modelid_other_gender && !sCreatureDisplayInfoStore.LookupEntry(modelInfo.modelid_other_gender)) { - sLog->outErrorDb("Table `creature_model_info` has not existed alt.gender model (%u) for existed display id (%u).", modelInfo.modelid_other_gender, modelId); + sLog->outError(LOG_FILTER_SQL, "Table `creature_model_info` has not existed alt.gender model (%u) for existed display id (%u).", modelInfo.modelid_other_gender, modelId); modelInfo.modelid_other_gender = 0; } @@ -1162,8 +1162,8 @@ void ObjectMgr::LoadCreatureModelInfo() } while (result->NextRow()); - sLog->outString(">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadLinkedRespawn() @@ -1176,8 +1176,8 @@ void ObjectMgr::LoadLinkedRespawn() if (!result) { - sLog->outErrorDb(">> Loaded 0 linked respawns. DB table `linked_respawn` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty."); + return; } @@ -1198,7 +1198,7 @@ void ObjectMgr::LoadLinkedRespawn() const CreatureData* slave = GetCreatureData(guidLow); if (!slave) { - sLog->outErrorDb("Couldn't get creature data for GUIDLow %u", guidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", guidLow); error = true; break; } @@ -1206,7 +1206,7 @@ void ObjectMgr::LoadLinkedRespawn() const CreatureData* master = GetCreatureData(linkedGuidLow); if (!master) { - sLog->outErrorDb("Couldn't get creature data for GUIDLow %u", linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", linkedGuidLow); error = true; break; } @@ -1214,14 +1214,14 @@ void ObjectMgr::LoadLinkedRespawn() const MapEntry* const map = sMapStore.LookupEntry(master->mapid); if (!map || !map->Instanceable() || (master->mapid != slave->mapid)) { - sLog->outErrorDb("Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); error = true; break; } if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty) { - sLog->outErrorDb("LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); error = true; break; } @@ -1235,7 +1235,7 @@ void ObjectMgr::LoadLinkedRespawn() const CreatureData* slave = GetCreatureData(guidLow); if (!slave) { - sLog->outErrorDb("Couldn't get creature data for GUIDLow %u", guidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", guidLow); error = true; break; } @@ -1243,7 +1243,7 @@ void ObjectMgr::LoadLinkedRespawn() const GameObjectData* master = GetGOData(linkedGuidLow); if (!master) { - sLog->outErrorDb("Couldn't get gameobject data for GUIDLow %u", linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", linkedGuidLow); error = true; break; } @@ -1251,14 +1251,14 @@ void ObjectMgr::LoadLinkedRespawn() const MapEntry* const map = sMapStore.LookupEntry(master->mapid); if (!map || !map->Instanceable() || (master->mapid != slave->mapid)) { - sLog->outErrorDb("Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); error = true; break; } if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty) { - sLog->outErrorDb("LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); error = true; break; } @@ -1272,7 +1272,7 @@ void ObjectMgr::LoadLinkedRespawn() const GameObjectData* slave = GetGOData(guidLow); if (!slave) { - sLog->outErrorDb("Couldn't get gameobject data for GUIDLow %u", guidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", guidLow); error = true; break; } @@ -1280,7 +1280,7 @@ void ObjectMgr::LoadLinkedRespawn() const GameObjectData* master = GetGOData(linkedGuidLow); if (!master) { - sLog->outErrorDb("Couldn't get gameobject data for GUIDLow %u", linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", linkedGuidLow); error = true; break; } @@ -1288,14 +1288,14 @@ void ObjectMgr::LoadLinkedRespawn() const MapEntry* const map = sMapStore.LookupEntry(master->mapid); if (!map || !map->Instanceable() || (master->mapid != slave->mapid)) { - sLog->outErrorDb("Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); error = true; break; } if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty) { - sLog->outErrorDb("LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); error = true; break; } @@ -1309,7 +1309,7 @@ void ObjectMgr::LoadLinkedRespawn() const GameObjectData* slave = GetGOData(guidLow); if (!slave) { - sLog->outErrorDb("Couldn't get gameobject data for GUIDLow %u", guidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", guidLow); error = true; break; } @@ -1317,7 +1317,7 @@ void ObjectMgr::LoadLinkedRespawn() const CreatureData* master = GetCreatureData(linkedGuidLow); if (!master) { - sLog->outErrorDb("Couldn't get creature data for GUIDLow %u", linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", linkedGuidLow); error = true; break; } @@ -1325,14 +1325,14 @@ void ObjectMgr::LoadLinkedRespawn() const MapEntry* const map = sMapStore.LookupEntry(master->mapid); if (!map || !map->Instanceable() || (master->mapid != slave->mapid)) { - sLog->outErrorDb("Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); error = true; break; } if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty) { - sLog->outErrorDb("LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); error = true; break; } @@ -1348,8 +1348,8 @@ void ObjectMgr::LoadLinkedRespawn() } while (result->NextRow()); - sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime)); + } bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow) @@ -1374,13 +1374,13 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow) const MapEntry* const map = sMapStore.LookupEntry(master->mapid); if (!map || !map->Instanceable() || (master->mapid != slave->mapid)) { - sLog->outErrorDb("Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow); return false; } if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty) { - sLog->outErrorDb("LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); + sLog->outError(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow); return false; } @@ -1408,8 +1408,8 @@ void ObjectMgr::LoadCreatures() if (!result) { - sLog->outErrorDb(">> Loaded 0 creatures. DB table `creature` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creatures. DB table `creature` is empty."); + return; } @@ -1433,7 +1433,7 @@ void ObjectMgr::LoadCreatures() CreatureTemplate const* cInfo = GetCreatureTemplate(entry); if (!cInfo) { - sLog->outErrorDb("Table `creature` has creature (GUID: %u) with non existing creature entry %u, skipped.", guid, entry); + sLog->outError(LOG_FILTER_SQL, "Table `creature` has creature (GUID: %u) with non existing creature entry %u, skipped.", guid, entry); continue; } @@ -1463,19 +1463,19 @@ void ObjectMgr::LoadCreatures() MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid); if (!mapEntry) { - sLog->outErrorDb("Table `creature` have creature (GUID: %u) that spawned at not existed map (Id: %u), skipped.", guid, data.mapid); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u) that spawned at not existed map (Id: %u), skipped.", guid, data.mapid); continue; } if (data.spawnMask & ~spawnMasks[data.mapid]) - sLog->outErrorDb("Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.mapid); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.mapid); bool ok = true; for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff) { if (_difficultyEntries[diff].find(data.id) != _difficultyEntries[diff].end()) { - sLog->outErrorDb("Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.", + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.", guid, diff + 1, data.id); ok = false; } @@ -1488,7 +1488,7 @@ void ObjectMgr::LoadCreatures() { if (!GetEquipmentInfo(data.equipmentId)) { - sLog->outErrorDb("Table `creature` have creature (Entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", data.id, data.equipmentId); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (Entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", data.id, data.equipmentId); data.equipmentId = -1; } } @@ -1496,19 +1496,19 @@ void ObjectMgr::LoadCreatures() if (cInfo->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND) { if (!mapEntry || !mapEntry->IsDungeon()) - sLog->outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with `creature_template`.`flags_extra` including CREATURE_FLAG_EXTRA_INSTANCE_BIND but creature are not in instance.", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `creature_template`.`flags_extra` including CREATURE_FLAG_EXTRA_INSTANCE_BIND but creature are not in instance.", guid, data.id); } if (data.spawndist < 0.0f) { - sLog->outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with `spawndist`< 0, set to 0.", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `spawndist`< 0, set to 0.", guid, data.id); data.spawndist = 0.0f; } else if (data.movementType == RANDOM_MOTION_TYPE) { if (data.spawndist == 0.0f) { - sLog->outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=1 (random movement) but with `spawndist`=0, replace by idle movement type (0).", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=1 (random movement) but with `spawndist`=0, replace by idle movement type (0).", guid, data.id); data.movementType = IDLE_MOTION_TYPE; } } @@ -1516,14 +1516,14 @@ void ObjectMgr::LoadCreatures() { if (data.spawndist != 0.0f) { - sLog->outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=0 (idle) have `spawndist`<>0, set to 0.", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=0 (idle) have `spawndist`<>0, set to 0.", guid, data.id); data.spawndist = 0.0f; } } if (data.phaseMask == 0) { - sLog->outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id); data.phaseMask = 1; } @@ -1535,8 +1535,8 @@ void ObjectMgr::LoadCreatures() } while (result->NextRow()); - sLog->outString(">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data) @@ -1606,7 +1606,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float GameObject* go = new GameObject; if (!go->LoadGameObjectFromDB(guid, map)) { - sLog->outError("AddGOData: cannot add gameobject entry %u to map", entry); + sLog->outError(LOG_FILTER_GENERAL, "AddGOData: cannot add gameobject entry %u to map", entry); delete go; return 0; } @@ -1641,7 +1641,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos) Creature* creature = new Creature; if (!creature->LoadCreatureFromDB(guid, map)) { - sLog->outError("AddCreature: cannot add creature entry %u to map", guid); + sLog->outError(LOG_FILTER_GENERAL, "AddCreature: cannot add creature entry %u to map", guid); delete creature; return false; } @@ -1693,7 +1693,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float Creature* creature = new Creature; if (!creature->LoadCreatureFromDB(guid, map)) { - sLog->outError("AddCreature: cannot add creature entry %u to map", entry); + sLog->outError(LOG_FILTER_GENERAL, "AddCreature: cannot add creature entry %u to map", entry); delete creature; return 0; } @@ -1718,8 +1718,8 @@ void ObjectMgr::LoadGameobjects() if (!result) { - sLog->outErrorDb(">> Loaded 0 gameobjects. DB table `gameobject` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobjects. DB table `gameobject` is empty."); + return; } @@ -1742,7 +1742,7 @@ void ObjectMgr::LoadGameobjects() GameObjectTemplate const* gInfo = GetGameObjectTemplate(entry); if (!gInfo) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u) with non existing gameobject entry %u, skipped.", guid, entry); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u) with non existing gameobject entry %u, skipped.", guid, entry); continue; } @@ -1754,14 +1754,14 @@ void ObjectMgr::LoadGameobjects() case GAMEOBJECT_TYPE_SPELL_FOCUS: break; default: - sLog->outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) doesn't have a displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId); + sLog->outError(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry %u GoType: %u) doesn't have a displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId); break; } } if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId)) { - sLog->outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) has an invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId); + sLog->outError(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry %u GoType: %u) has an invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId); continue; } @@ -1782,13 +1782,13 @@ void ObjectMgr::LoadGameobjects() MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid); if (!mapEntry) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) spawned on a non-existed map (Id: %u), skip", guid, data.id, data.mapid); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) spawned on a non-existed map (Id: %u), skip", guid, data.id, data.mapid); continue; } if (data.spawntimesecs == 0 && gInfo->IsDespawnAtAction()) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but the gameobejct is marked as despawnable at action.", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but the gameobejct is marked as despawnable at action.", guid, data.id); } data.animprogress = fields[12].GetUInt8(); @@ -1797,7 +1797,7 @@ void ObjectMgr::LoadGameobjects() uint32 go_state = fields[13].GetUInt8(); if (go_state >= MAX_GO_STATE) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip", guid, data.id, go_state); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip", guid, data.id, go_state); continue; } data.go_state = GOState(go_state); @@ -1805,7 +1805,7 @@ void ObjectMgr::LoadGameobjects() data.spawnMask = fields[14].GetUInt8(); if (data.spawnMask & ~spawnMasks[data.mapid]) - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including not supported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including not supported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid); data.phaseMask = fields[15].GetUInt16(); int16 gameEvent = fields[16].GetInt8(); @@ -1813,25 +1813,25 @@ void ObjectMgr::LoadGameobjects() if (data.rotation2 < -1.0f || data.rotation2 > 1.0f) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2); continue; } if (data.rotation3 < -1.0f || data.rotation3 > 1.0f) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip", guid, data.id, data.rotation3); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip", guid, data.id, data.rotation3); continue; } if (!MapManager::IsValidMapCoord(data.mapid, data.posX, data.posY, data.posZ, data.orientation)) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid coordinates, skip", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid coordinates, skip", guid, data.id); continue; } if (data.phaseMask == 0) { - sLog->outErrorDb("Table `gameobject` has gameobject (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id); data.phaseMask = 1; } @@ -1840,8 +1840,8 @@ void ObjectMgr::LoadGameobjects() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data) @@ -2009,8 +2009,8 @@ void ObjectMgr::LoadItemLocales() } } while (result->NextRow()); - sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadItemTemplates() @@ -2052,8 +2052,8 @@ void ObjectMgr::LoadItemTemplates() if (!result) { - sLog->outString(">> Loaded 0 item templates. DB table `item_template` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 item templates. DB table `item_template` is empty."); + return; } @@ -2183,61 +2183,61 @@ void ObjectMgr::LoadItemTemplates() { if (itemTemplate.Class != dbcitem->Class) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct class %u, must be %u .", entry, itemTemplate.Class, dbcitem->Class); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct class %u, must be %u .", entry, itemTemplate.Class, dbcitem->Class); if (enforceDBCAttributes) itemTemplate.Class = dbcitem->Class; } if (itemTemplate.Unk0 != dbcitem->Unk0) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.Unk0, dbcitem->Unk0); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.Unk0, dbcitem->Unk0); if (enforceDBCAttributes) itemTemplate.Unk0 = dbcitem->Unk0; } if (itemTemplate.Material != dbcitem->Material) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct material (%i), must be %i .", entry, itemTemplate.Material, dbcitem->Material); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct material (%i), must be %i .", entry, itemTemplate.Material, dbcitem->Material); if (enforceDBCAttributes) itemTemplate.Material = dbcitem->Material; } if (itemTemplate.InventoryType != dbcitem->InventoryType) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct inventory type (%u), must be %u .", entry, itemTemplate.InventoryType, dbcitem->InventoryType); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct inventory type (%u), must be %u .", entry, itemTemplate.InventoryType, dbcitem->InventoryType); if (enforceDBCAttributes) itemTemplate.InventoryType = dbcitem->InventoryType; } if (itemTemplate.DisplayInfoID != dbcitem->DisplayId) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct display id (%u), must be %u .", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct display id (%u), must be %u .", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayId); if (enforceDBCAttributes) itemTemplate.DisplayInfoID = dbcitem->DisplayId; } if (itemTemplate.Sheath != dbcitem->Sheath) { - sLog->outErrorDb("Item (Entry: %u) does not have a correct sheathid (%u), must be %u .", entry, itemTemplate.Sheath, dbcitem->Sheath); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct sheathid (%u), must be %u .", entry, itemTemplate.Sheath, dbcitem->Sheath); if (enforceDBCAttributes) itemTemplate.Sheath = dbcitem->Sheath; } } else - sLog->outErrorDb("Item (Entry: %u) does not exist in item.dbc! (not correct id?).", entry); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not exist in item.dbc! (not correct id?).", entry); if (itemTemplate.Class >= MAX_ITEM_CLASS) { - sLog->outErrorDb("Item (Entry: %u) has wrong Class value (%u)", entry, itemTemplate.Class); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Class value (%u)", entry, itemTemplate.Class); itemTemplate.Class = ITEM_CLASS_MISC; } if (itemTemplate.SubClass >= MaxItemSubclassValues[itemTemplate.Class]) { - sLog->outErrorDb("Item (Entry: %u) has wrong Subclass value (%u) for class %u", entry, itemTemplate.SubClass, itemTemplate.Class); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Subclass value (%u) for class %u", entry, itemTemplate.SubClass, itemTemplate.Class); itemTemplate.SubClass = 0;// exist for all item classes } if (itemTemplate.Quality >= MAX_ITEM_QUALITY) { - sLog->outErrorDb("Item (Entry: %u) has wrong Quality value (%u)", entry, itemTemplate.Quality); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Quality value (%u)", entry, itemTemplate.Quality); itemTemplate.Quality = ITEM_QUALITY_NORMAL; } @@ -2245,36 +2245,36 @@ void ObjectMgr::LoadItemTemplates() { if (FactionEntry const* faction = sFactionStore.LookupEntry(HORDE)) if ((itemTemplate.AllowableRace & faction->BaseRepRaceMask[0]) == 0) - sLog->outErrorDb("Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.", + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.", entry, itemTemplate.AllowableRace, ITEM_FLAGS_EXTRA_HORDE_ONLY); if (itemTemplate.Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) - sLog->outErrorDb("Item (Entry: %u) has value (%u) in `Flags2` flags (ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) and ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, this is a wrong combination.", + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has value (%u) in `Flags2` flags (ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) and ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, this is a wrong combination.", entry, ITEM_FLAGS_EXTRA_ALLIANCE_ONLY, ITEM_FLAGS_EXTRA_HORDE_ONLY); } else if (itemTemplate.Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) { if (FactionEntry const* faction = sFactionStore.LookupEntry(ALLIANCE)) if ((itemTemplate.AllowableRace & faction->BaseRepRaceMask[0]) == 0) - sLog->outErrorDb("Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_ALLIANCE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.", + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_ALLIANCE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.", entry, itemTemplate.AllowableRace, ITEM_FLAGS_EXTRA_ALLIANCE_ONLY); } if (itemTemplate.BuyCount <= 0) { - sLog->outErrorDb("Item (Entry: %u) has wrong BuyCount value (%u), set to default(1).", entry, itemTemplate.BuyCount); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong BuyCount value (%u), set to default(1).", entry, itemTemplate.BuyCount); itemTemplate.BuyCount = 1; } if (itemTemplate.InventoryType >= MAX_INVTYPE) { - sLog->outErrorDb("Item (Entry: %u) has wrong InventoryType value (%u)", entry, itemTemplate.InventoryType); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong InventoryType value (%u)", entry, itemTemplate.InventoryType); itemTemplate.InventoryType = INVTYPE_NON_EQUIP; } if (itemTemplate.RequiredSkill >= MAX_SKILL_TYPE) { - sLog->outErrorDb("Item (Entry: %u) has wrong RequiredSkill value (%u)", entry, itemTemplate.RequiredSkill); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong RequiredSkill value (%u)", entry, itemTemplate.RequiredSkill); itemTemplate.RequiredSkill = 0; } @@ -2294,60 +2294,60 @@ void ObjectMgr::LoadItemTemplates() if (req) { if (!(itemTemplate.AllowableClass & CLASSMASK_ALL_PLAYABLE)) - sLog->outErrorDb("Item (Entry: %u) does not have any playable classes (%u) in `AllowableClass` and can't be equipped or used.", entry, itemTemplate.AllowableClass); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have any playable classes (%u) in `AllowableClass` and can't be equipped or used.", entry, itemTemplate.AllowableClass); if (!(itemTemplate.AllowableRace & RACEMASK_ALL_PLAYABLE)) - sLog->outErrorDb("Item (Entry: %u) does not have any playable races (%u) in `AllowableRace` and can't be equipped or used.", entry, itemTemplate.AllowableRace); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have any playable races (%u) in `AllowableRace` and can't be equipped or used.", entry, itemTemplate.AllowableRace); } } if (itemTemplate.RequiredSpell && !sSpellMgr->GetSpellInfo(itemTemplate.RequiredSpell)) { - sLog->outErrorDb("Item (Entry: %u) has a wrong (non-existing) spell in RequiredSpell (%u)", entry, itemTemplate.RequiredSpell); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has a wrong (non-existing) spell in RequiredSpell (%u)", entry, itemTemplate.RequiredSpell); itemTemplate.RequiredSpell = 0; } if (itemTemplate.RequiredReputationRank >= MAX_REPUTATION_RANK) - sLog->outErrorDb("Item (Entry: %u) has wrong reputation rank in RequiredReputationRank (%u), item can't be used.", entry, itemTemplate.RequiredReputationRank); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong reputation rank in RequiredReputationRank (%u), item can't be used.", entry, itemTemplate.RequiredReputationRank); if (itemTemplate.RequiredReputationFaction) { if (!sFactionStore.LookupEntry(itemTemplate.RequiredReputationFaction)) { - sLog->outErrorDb("Item (Entry: %u) has wrong (not existing) faction in RequiredReputationFaction (%u)", entry, itemTemplate.RequiredReputationFaction); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (not existing) faction in RequiredReputationFaction (%u)", entry, itemTemplate.RequiredReputationFaction); itemTemplate.RequiredReputationFaction = 0; } if (itemTemplate.RequiredReputationRank == MIN_REPUTATION_RANK) - sLog->outErrorDb("Item (Entry: %u) has min. reputation rank in RequiredReputationRank (0) but RequiredReputationFaction > 0, faction setting is useless.", entry); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has min. reputation rank in RequiredReputationRank (0) but RequiredReputationFaction > 0, faction setting is useless.", entry); } if (itemTemplate.MaxCount < -1) { - sLog->outErrorDb("Item (Entry: %u) has too large negative in maxcount (%i), replace by value (-1) no storing limits.", entry, itemTemplate.MaxCount); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has too large negative in maxcount (%i), replace by value (-1) no storing limits.", entry, itemTemplate.MaxCount); itemTemplate.MaxCount = -1; } if (itemTemplate.Stackable == 0) { - sLog->outErrorDb("Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.", entry, itemTemplate.Stackable); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.", entry, itemTemplate.Stackable); itemTemplate.Stackable = 1; } else if (itemTemplate.Stackable < -1) { - sLog->outErrorDb("Item (Entry: %u) has too large negative in stackable (%i), replace by value (-1) no stacking limits.", entry, itemTemplate.Stackable); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has too large negative in stackable (%i), replace by value (-1) no stacking limits.", entry, itemTemplate.Stackable); itemTemplate.Stackable = -1; } if (itemTemplate.ContainerSlots > MAX_BAG_SIZE) { - sLog->outErrorDb("Item (Entry: %u) has too large value in ContainerSlots (%u), replace by hardcoded limit (%u).", entry, itemTemplate.ContainerSlots, MAX_BAG_SIZE); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has too large value in ContainerSlots (%u), replace by hardcoded limit (%u).", entry, itemTemplate.ContainerSlots, MAX_BAG_SIZE); itemTemplate.ContainerSlots = MAX_BAG_SIZE; } if (itemTemplate.StatsCount > MAX_ITEM_PROTO_STATS) { - sLog->outErrorDb("Item (Entry: %u) has too large value in statscount (%u), replace by hardcoded limit (%u).", entry, itemTemplate.StatsCount, MAX_ITEM_PROTO_STATS); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has too large value in statscount (%u), replace by hardcoded limit (%u).", entry, itemTemplate.StatsCount, MAX_ITEM_PROTO_STATS); itemTemplate.StatsCount = MAX_ITEM_PROTO_STATS; } @@ -2356,7 +2356,7 @@ void ObjectMgr::LoadItemTemplates() // for ItemStatValue != 0 if (itemTemplate.ItemStat[j].ItemStatValue && itemTemplate.ItemStat[j].ItemStatType >= MAX_ITEM_MOD) { - sLog->outErrorDb("Item (Entry: %u) has wrong (non-existing?) stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (non-existing?) stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType); itemTemplate.ItemStat[j].ItemStatType = 0; } @@ -2364,7 +2364,7 @@ void ObjectMgr::LoadItemTemplates() { case ITEM_MOD_SPELL_HEALING_DONE: case ITEM_MOD_SPELL_DAMAGE_DONE: - sLog->outErrorDb("Item (Entry: %u) has deprecated stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has deprecated stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType); break; default: break; @@ -2375,7 +2375,7 @@ void ObjectMgr::LoadItemTemplates() { if (itemTemplate.Damage[j].DamageType >= MAX_SPELL_SCHOOL) { - sLog->outErrorDb("Item (Entry: %u) has wrong dmg_type%d (%u)", entry, j+1, itemTemplate.Damage[j].DamageType); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong dmg_type%d (%u)", entry, j+1, itemTemplate.Damage[j].DamageType); itemTemplate.Damage[j].DamageType = 0; } } @@ -2386,7 +2386,7 @@ void ObjectMgr::LoadItemTemplates() // spell_1 if (itemTemplate.Spells[0].SpellTrigger != ITEM_SPELLTRIGGER_ON_USE) { - sLog->outErrorDb("Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format", entry, 0+1, itemTemplate.Spells[0].SpellTrigger); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format", entry, 0+1, itemTemplate.Spells[0].SpellTrigger); itemTemplate.Spells[0].SpellId = 0; itemTemplate.Spells[0].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; itemTemplate.Spells[1].SpellId = 0; @@ -2396,14 +2396,14 @@ void ObjectMgr::LoadItemTemplates() // spell_2 have learning spell if (itemTemplate.Spells[1].SpellTrigger != ITEM_SPELLTRIGGER_LEARN_SPELL_ID) { - sLog->outErrorDb("Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format.", entry, 1+1, itemTemplate.Spells[1].SpellTrigger); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format.", entry, 1+1, itemTemplate.Spells[1].SpellTrigger); itemTemplate.Spells[0].SpellId = 0; itemTemplate.Spells[1].SpellId = 0; itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; } else if (!itemTemplate.Spells[1].SpellId) { - sLog->outErrorDb("Item (Entry: %u) does not have an expected spell in spellid_%d in special learning format.", entry, 1+1); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have an expected spell in spellid_%d in special learning format.", entry, 1+1); itemTemplate.Spells[0].SpellId = 0; itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; } @@ -2412,7 +2412,7 @@ void ObjectMgr::LoadItemTemplates() SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemTemplate.Spells[1].SpellId); if (!spellInfo && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[1].SpellId, NULL)) { - sLog->outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId); itemTemplate.Spells[0].SpellId = 0; itemTemplate.Spells[1].SpellId = 0; itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; @@ -2420,7 +2420,7 @@ void ObjectMgr::LoadItemTemplates() // allowed only in special format else if ((itemTemplate.Spells[1].SpellId == 483) || (itemTemplate.Spells[1].SpellId == 55884)) { - sLog->outErrorDb("Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId); itemTemplate.Spells[0].SpellId = 0; itemTemplate.Spells[1].SpellId = 0; itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; @@ -2432,13 +2432,13 @@ void ObjectMgr::LoadItemTemplates() { if (itemTemplate.Spells[j].SpellTrigger != ITEM_SPELLTRIGGER_ON_USE) { - sLog->outErrorDb("Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger); itemTemplate.Spells[j].SpellId = 0; itemTemplate.Spells[j].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; } else if (itemTemplate.Spells[j].SpellId != 0) { - sLog->outErrorDb("Item (Entry: %u) has wrong spell in spellid_%d (%d) for learning special format", entry, j+1, itemTemplate.Spells[j].SpellId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong spell in spellid_%d (%d) for learning special format", entry, j+1, itemTemplate.Spells[j].SpellId); itemTemplate.Spells[j].SpellId = 0; } } @@ -2450,7 +2450,7 @@ void ObjectMgr::LoadItemTemplates() { if (itemTemplate.Spells[j].SpellTrigger >= MAX_ITEM_SPELLTRIGGER || itemTemplate.Spells[j].SpellTrigger == ITEM_SPELLTRIGGER_LEARN_SPELL_ID) { - sLog->outErrorDb("Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger); itemTemplate.Spells[j].SpellId = 0; itemTemplate.Spells[j].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE; } @@ -2460,13 +2460,13 @@ void ObjectMgr::LoadItemTemplates() SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemTemplate.Spells[j].SpellId); if (!spellInfo && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[j].SpellId, NULL)) { - sLog->outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId); itemTemplate.Spells[j].SpellId = 0; } // allowed only in special format else if ((itemTemplate.Spells[j].SpellId == 483) || (itemTemplate.Spells[j].SpellId == 55884)) { - sLog->outErrorDb("Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId); itemTemplate.Spells[j].SpellId = 0; } } @@ -2474,17 +2474,17 @@ void ObjectMgr::LoadItemTemplates() } if (itemTemplate.Bonding >= MAX_BIND_TYPE) - sLog->outErrorDb("Item (Entry: %u) has wrong Bonding value (%u)", entry, itemTemplate.Bonding); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Bonding value (%u)", entry, itemTemplate.Bonding); if (itemTemplate.PageText && !GetPageText(itemTemplate.PageText)) - sLog->outErrorDb("Item (Entry: %u) has non existing first page (Id:%u)", entry, itemTemplate.PageText); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has non existing first page (Id:%u)", entry, itemTemplate.PageText); if (itemTemplate.LockID && !sLockStore.LookupEntry(itemTemplate.LockID)) - sLog->outErrorDb("Item (Entry: %u) has wrong LockID (%u)", entry, itemTemplate.LockID); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong LockID (%u)", entry, itemTemplate.LockID); if (itemTemplate.Sheath >= MAX_SHEATHETYPE) { - sLog->outErrorDb("Item (Entry: %u) has wrong Sheath (%u)", entry, itemTemplate.Sheath); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Sheath (%u)", entry, itemTemplate.Sheath); itemTemplate.Sheath = SHEATHETYPE_NONE; } @@ -2496,28 +2496,28 @@ void ObjectMgr::LoadItemTemplates() else if (!sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(itemTemplate.RandomProperty))) { - sLog->outErrorDb("Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)", entry, itemTemplate.RandomProperty); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)", entry, itemTemplate.RandomProperty); itemTemplate.RandomProperty = 0; } } if (itemTemplate.RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemEnchantMod(itemTemplate.RandomSuffix))) { - sLog->outErrorDb("Item (Entry: %u) has wrong RandomSuffix (%u)", entry, itemTemplate.RandomSuffix); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong RandomSuffix (%u)", entry, itemTemplate.RandomSuffix); itemTemplate.RandomSuffix = 0; } if (itemTemplate.ItemSet && !sItemSetStore.LookupEntry(itemTemplate.ItemSet)) { - sLog->outErrorDb("Item (Entry: %u) have wrong ItemSet (%u)", entry, itemTemplate.ItemSet); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) have wrong ItemSet (%u)", entry, itemTemplate.ItemSet); itemTemplate.ItemSet = 0; } if (itemTemplate.Area && !GetAreaEntryByAreaID(itemTemplate.Area)) - sLog->outErrorDb("Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area); if (itemTemplate.Map && !sMapStore.LookupEntry(itemTemplate.Map)) - sLog->outErrorDb("Item (Entry: %u) has wrong Map (%u)", entry, itemTemplate.Map); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Map (%u)", entry, itemTemplate.Map); if (itemTemplate.BagFamily) { @@ -2531,7 +2531,7 @@ void ObjectMgr::LoadItemTemplates() ItemBagFamilyEntry const* bf = sItemBagFamilyStore.LookupEntry(j+1); if (!bf) { - sLog->outErrorDb("Item (Entry: %u) has bag family bit set not listed in ItemBagFamily.dbc, remove bit", entry); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has bag family bit set not listed in ItemBagFamily.dbc, remove bit", entry); itemTemplate.BagFamily &= ~mask; continue; } @@ -2541,7 +2541,7 @@ void ObjectMgr::LoadItemTemplates() CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(itemTemplate.ItemId); if (!ctEntry) { - sLog->outErrorDb("Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit", entry); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit", entry); itemTemplate.BagFamily &= ~mask; } } @@ -2549,41 +2549,41 @@ void ObjectMgr::LoadItemTemplates() } if (itemTemplate.TotemCategory && !sTotemCategoryStore.LookupEntry(itemTemplate.TotemCategory)) - sLog->outErrorDb("Item (Entry: %u) has wrong TotemCategory (%u)", entry, itemTemplate.TotemCategory); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong TotemCategory (%u)", entry, itemTemplate.TotemCategory); for (uint8 j = 0; j < MAX_ITEM_PROTO_SOCKETS; ++j) { if (itemTemplate.Socket[j].Color && (itemTemplate.Socket[j].Color & SOCKET_COLOR_ALL) != itemTemplate.Socket[j].Color) { - sLog->outErrorDb("Item (Entry: %u) has wrong socketColor_%d (%u)", entry, j+1, itemTemplate.Socket[j].Color); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong socketColor_%d (%u)", entry, j+1, itemTemplate.Socket[j].Color); itemTemplate.Socket[j].Color = 0; } } if (itemTemplate.GemProperties && !sGemPropertiesStore.LookupEntry(itemTemplate.GemProperties)) - sLog->outErrorDb("Item (Entry: %u) has wrong GemProperties (%u)", entry, itemTemplate.GemProperties); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong GemProperties (%u)", entry, itemTemplate.GemProperties); if (itemTemplate.FoodType >= MAX_PET_DIET) { - sLog->outErrorDb("Item (Entry: %u) has wrong FoodType value (%u)", entry, itemTemplate.FoodType); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong FoodType value (%u)", entry, itemTemplate.FoodType); itemTemplate.FoodType = 0; } if (itemTemplate.ItemLimitCategory && !sItemLimitCategoryStore.LookupEntry(itemTemplate.ItemLimitCategory)) { - sLog->outErrorDb("Item (Entry: %u) has wrong LimitCategory value (%u)", entry, itemTemplate.ItemLimitCategory); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong LimitCategory value (%u)", entry, itemTemplate.ItemLimitCategory); itemTemplate.ItemLimitCategory = 0; } if (itemTemplate.HolidayId && !sHolidaysStore.LookupEntry(itemTemplate.HolidayId)) { - sLog->outErrorDb("Item (Entry: %u) has wrong HolidayId value (%u)", entry, itemTemplate.HolidayId); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) has wrong HolidayId value (%u)", entry, itemTemplate.HolidayId); itemTemplate.HolidayId = 0; } if (itemTemplate.FlagsCu & ITEM_FLAGS_CU_DURATION_REAL_TIME && !itemTemplate.Duration) { - sLog->outErrorDb("Item (Entry %u) has flag ITEM_FLAGS_CU_DURATION_REAL_TIME but it does not have duration limit", entry); + sLog->outError(LOG_FILTER_SQL, "Item (Entry %u) has flag ITEM_FLAGS_CU_DURATION_REAL_TIME but it does not have duration limit", entry); itemTemplate.FlagsCu &= ~ITEM_FLAGS_CU_DURATION_REAL_TIME; } @@ -2612,10 +2612,10 @@ void ObjectMgr::LoadItemTemplates() } for (std::set::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr) - sLog->outErrorDb("Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr); - sLog->outString(">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry) @@ -2650,8 +2650,8 @@ void ObjectMgr::LoadItemSetNameLocales() AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name); } while (result->NextRow()); - sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadItemSetNames() @@ -2679,8 +2679,8 @@ void ObjectMgr::LoadItemSetNames() if (!result) { - sLog->outString(">> Loaded 0 item set names. DB table `item_set_names` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 item set names. DB table `item_set_names` is empty."); + return; } @@ -2694,7 +2694,7 @@ void ObjectMgr::LoadItemSetNames() uint32 entry = fields[0].GetUInt32(); if (itemSetItems.find(entry) == itemSetItems.end()) { - sLog->outErrorDb("Item set name (Entry: %u) not found in ItemSet.dbc, data useless.", entry); + sLog->outError(LOG_FILTER_SQL, "Item set name (Entry: %u) not found in ItemSet.dbc, data useless.", entry); continue; } @@ -2704,7 +2704,7 @@ void ObjectMgr::LoadItemSetNames() uint32 invType = fields[2].GetUInt8(); if (invType >= MAX_INVTYPE) { - sLog->outErrorDb("Item set name (Entry: %u) has wrong InventoryType value (%u)", entry, invType); + sLog->outError(LOG_FILTER_SQL, "Item set name (Entry: %u) has wrong InventoryType value (%u)", entry, invType); invType = INVTYPE_NON_EQUIP; } @@ -2723,19 +2723,19 @@ void ObjectMgr::LoadItemSetNames() pProto = sObjectMgr->GetItemTemplate(entry); if (pProto) { - sLog->outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry); + sLog->outError(LOG_FILTER_SQL, "Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry); ItemSetNameEntry &data = _itemSetNameStore[entry]; data.name = pProto->Name1; data.InventoryType = pProto->InventoryType; ++count; } else - sLog->outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, set will not display properly.", entry); + sLog->outError(LOG_FILTER_SQL, "Item set part (Entry: %u) does not have entry in `item_set_names`, set will not display properly.", entry); } } - sLog->outString(">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadVehicleTemplateAccessories() @@ -2751,8 +2751,8 @@ void ObjectMgr::LoadVehicleTemplateAccessories() if (!result) { - sLog->outErrorDb(">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty."); + return; } @@ -2769,19 +2769,19 @@ void ObjectMgr::LoadVehicleTemplateAccessories() if (!sObjectMgr->GetCreatureTemplate(uiEntry)) { - sLog->outErrorDb("Table `vehicle_template_accessory`: creature template entry %u does not exist.", uiEntry); + sLog->outError(LOG_FILTER_SQL, "Table `vehicle_template_accessory`: creature template entry %u does not exist.", uiEntry); continue; } if (!sObjectMgr->GetCreatureTemplate(uiAccessory)) { - sLog->outErrorDb("Table `vehicle_template_accessory`: Accessory %u does not exist.", uiAccessory); + sLog->outError(LOG_FILTER_SQL, "Table `vehicle_template_accessory`: Accessory %u does not exist.", uiAccessory); continue; } if (_spellClickInfoStore.find(uiEntry) == _spellClickInfoStore.end()) { - sLog->outErrorDb("Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry); + sLog->outError(LOG_FILTER_SQL, "Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry); continue; } @@ -2791,8 +2791,8 @@ void ObjectMgr::LoadVehicleTemplateAccessories() } while (result->NextRow()); - sLog->outString(">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadVehicleAccessories() @@ -2808,8 +2808,8 @@ void ObjectMgr::LoadVehicleAccessories() if (!result) { - sLog->outString(">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime)); + return; } @@ -2826,7 +2826,7 @@ void ObjectMgr::LoadVehicleAccessories() if (!sObjectMgr->GetCreatureTemplate(uiAccessory)) { - sLog->outErrorDb("Table `vehicle_accessory`: Accessory %u does not exist.", uiAccessory); + sLog->outError(LOG_FILTER_SQL, "Table `vehicle_accessory`: Accessory %u does not exist.", uiAccessory); continue; } @@ -2836,8 +2836,8 @@ void ObjectMgr::LoadVehicleAccessories() } while (result->NextRow()); - sLog->outString(">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadPetLevelInfo() @@ -2849,8 +2849,8 @@ void ObjectMgr::LoadPetLevelInfo() if (!result) { - sLog->outErrorDb(">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty."); + return; } @@ -2863,7 +2863,7 @@ void ObjectMgr::LoadPetLevelInfo() uint32 creature_id = fields[0].GetUInt32(); if (!sObjectMgr->GetCreatureTemplate(creature_id)) { - sLog->outErrorDb("Wrong creature id %u in `pet_levelstats` table, ignoring.", creature_id); + sLog->outError(LOG_FILTER_SQL, "Wrong creature id %u in `pet_levelstats` table, ignoring.", creature_id); continue; } @@ -2871,17 +2871,17 @@ void ObjectMgr::LoadPetLevelInfo() if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum - sLog->outErrorDb("Wrong (> %u) level %u in `pet_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level); + sLog->outError(LOG_FILTER_SQL, "Wrong (> %u) level %u in `pet_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level); else { - sLog->outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `pet_levelstats` table, ignoring.", current_level); + sLog->outInfo(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `pet_levelstats` table, ignoring.", current_level); ++count; // make result loading percent "expected" correct in case disabled detail mode for example. } continue; } else if (current_level < 1) { - sLog->outErrorDb("Wrong (<1) level %u in `pet_levelstats` table, ignoring.", current_level); + sLog->outError(LOG_FILTER_SQL, "Wrong (<1) level %u in `pet_levelstats` table, ignoring.", current_level); continue; } @@ -2914,7 +2914,7 @@ void ObjectMgr::LoadPetLevelInfo() // fatal error if no level 1 data if (!pInfo || pInfo[0].health == 0) { - sLog->outErrorDb("Creature %u does not have pet stats data for Level 1!", itr->first); + sLog->outError(LOG_FILTER_SQL, "Creature %u does not have pet stats data for Level 1!", itr->first); exit(1); } @@ -2923,14 +2923,14 @@ void ObjectMgr::LoadPetLevelInfo() { if (pInfo[level].health == 0) { - sLog->outErrorDb("Creature %u has no data for Level %i pet stats data, using data of Level %i.", itr->first, level+1, level); + sLog->outError(LOG_FILTER_SQL, "Creature %u has no data for Level %i pet stats data, using data of Level %i.", itr->first, level+1, level); pInfo[level] = pInfo[level-1]; } } } - sLog->outString(">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) const @@ -2952,7 +2952,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3 else { if (count < -1) - sLog->outErrorDb("Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId); + sLog->outError(LOG_FILTER_SQL, "Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId); uint32 RaceClass = (race_) | (class_ << 8); bool doneOne = false; @@ -2974,7 +2974,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3 } if (!found) - sLog->outErrorDb("Item %u specified to be removed from original create info not found in dbc!", itemId); + sLog->outError(LOG_FILTER_SQL, "Item %u specified to be removed from original create info not found in dbc!", itemId); if (!doneOne) doneOne = true; @@ -2996,8 +2996,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outString(); - sLog->outErrorDb(">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty."); + + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty."); exit(1); } else @@ -3019,39 +3019,39 @@ void ObjectMgr::LoadPlayerInfo() if (current_race >= MAX_RACES) { - sLog->outErrorDb("Wrong race %u in `playercreateinfo` table, ignoring.", current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo` table, ignoring.", current_race); continue; } ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(current_race); if (!rEntry) { - sLog->outErrorDb("Wrong race %u in `playercreateinfo` table, ignoring.", current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo` table, ignoring.", current_race); continue; } if (current_class >= MAX_CLASSES) { - sLog->outErrorDb("Wrong class %u in `playercreateinfo` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo` table, ignoring.", current_class); continue; } if (!sChrClassesStore.LookupEntry(current_class)) { - sLog->outErrorDb("Wrong class %u in `playercreateinfo` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo` table, ignoring.", current_class); continue; } // accept DB data only for valid position (and non instanceable) if (!MapManager::IsValidMapCoord(mapId, positionX, positionY, positionZ, orientation)) { - sLog->outErrorDb("Wrong home position for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong home position for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race); continue; } if (sMapStore.LookupEntry(mapId)->Instanceable()) { - sLog->outErrorDb("Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race); + sLog->outError(LOG_FILTER_SQL, "Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race); continue; } @@ -3071,13 +3071,13 @@ void ObjectMgr::LoadPlayerInfo() } while (result->NextRow()); - sLog->outString(">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // Load playercreate items - sLog->outString("Loading Player Create Items Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Items Data..."); { uint32 oldMSTime = getMSTime(); // 0 1 2 3 @@ -3085,8 +3085,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outString(">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty."); + } else { @@ -3099,14 +3099,14 @@ void ObjectMgr::LoadPlayerInfo() uint32 current_race = fields[0].GetUInt8(); if (current_race >= MAX_RACES) { - sLog->outErrorDb("Wrong race %u in `playercreateinfo_item` table, ignoring.", current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo_item` table, ignoring.", current_race); continue; } uint32 current_class = fields[1].GetUInt8(); if (current_class >= MAX_CLASSES) { - sLog->outErrorDb("Wrong class %u in `playercreateinfo_item` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo_item` table, ignoring.", current_class); continue; } @@ -3114,7 +3114,7 @@ void ObjectMgr::LoadPlayerInfo() if (!GetItemTemplate(item_id)) { - sLog->outErrorDb("Item id %u (race %u class %u) in `playercreateinfo_item` table but not listed in `item_template`, ignoring.", item_id, current_race, current_class); + sLog->outError(LOG_FILTER_SQL, "Item id %u (race %u class %u) in `playercreateinfo_item` table but not listed in `item_template`, ignoring.", item_id, current_race, current_class); continue; } @@ -3122,7 +3122,7 @@ void ObjectMgr::LoadPlayerInfo() if (!amount) { - sLog->outErrorDb("Item id %u (class %u race %u) have amount == 0 in `playercreateinfo_item` table, ignoring.", item_id, current_race, current_class); + sLog->outError(LOG_FILTER_SQL, "Item id %u (class %u race %u) have amount == 0 in `playercreateinfo_item` table, ignoring.", item_id, current_race, current_class); continue; } @@ -3143,13 +3143,13 @@ void ObjectMgr::LoadPlayerInfo() } while (result->NextRow()); - sLog->outString(">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // Load playercreate spells - sLog->outString("Loading Player Create Spell Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Spell Data..."); { uint32 oldMSTime = getMSTime(); @@ -3158,8 +3158,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outErrorDb(">> Loaded 0 player create spells. DB table `%s` is empty.", sWorld->getBoolConfig(CONFIG_START_ALL_SPELLS) ? "playercreateinfo_spell_custom" : "playercreateinfo_spell"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 player create spells. DB table `%s` is empty.", sWorld->getBoolConfig(CONFIG_START_ALL_SPELLS) ? "playercreateinfo_spell_custom" : "playercreateinfo_spell"); + } else { @@ -3172,14 +3172,14 @@ void ObjectMgr::LoadPlayerInfo() uint32 current_race = fields[0].GetUInt8(); if (current_race >= MAX_RACES) { - sLog->outErrorDb("Wrong race %u in `playercreateinfo_spell` table, ignoring.", current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo_spell` table, ignoring.", current_race); continue; } uint32 current_class = fields[1].GetUInt8(); if (current_class >= MAX_CLASSES) { - sLog->outErrorDb("Wrong class %u in `playercreateinfo_spell` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo_spell` table, ignoring.", current_class); continue; } @@ -3200,13 +3200,13 @@ void ObjectMgr::LoadPlayerInfo() } while (result->NextRow()); - sLog->outString(">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // Load playercreate actions - sLog->outString("Loading Player Create Action Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Action Data..."); { uint32 oldMSTime = getMSTime(); @@ -3215,8 +3215,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outErrorDb(">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty."); + } else { @@ -3229,14 +3229,14 @@ void ObjectMgr::LoadPlayerInfo() uint32 current_race = fields[0].GetUInt8(); if (current_race >= MAX_RACES) { - sLog->outErrorDb("Wrong race %u in `playercreateinfo_action` table, ignoring.", current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo_action` table, ignoring.", current_race); continue; } uint32 current_class = fields[1].GetUInt8(); if (current_class >= MAX_CLASSES) { - sLog->outErrorDb("Wrong class %u in `playercreateinfo_action` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo_action` table, ignoring.", current_class); continue; } @@ -3247,13 +3247,13 @@ void ObjectMgr::LoadPlayerInfo() } while (result->NextRow()); - sLog->outString(">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // Loading levels data (class only dependent) - sLog->outString("Loading Player Create Level HP/Mana Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Level HP/Mana Data..."); { uint32 oldMSTime = getMSTime(); @@ -3262,8 +3262,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outErrorDb(">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty."); + exit(1); } @@ -3276,14 +3276,14 @@ void ObjectMgr::LoadPlayerInfo() uint32 current_class = fields[0].GetUInt8(); if (current_class >= MAX_CLASSES) { - sLog->outErrorDb("Wrong class %u in `player_classlevelstats` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `player_classlevelstats` table, ignoring.", current_class); continue; } uint8 current_level = fields[1].GetUInt8(); // Can't be > than STRONG_MAX_LEVEL (hardcoded level maximum) due to var type if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { - sLog->outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.", current_level); + sLog->outInfo(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.", current_level); ++count; // make result loading percent "expected" correct in case disabled detail mode for example. continue; } @@ -3314,7 +3314,7 @@ void ObjectMgr::LoadPlayerInfo() // fatal error if no level 1 data if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0) { - sLog->outErrorDb("Class %i Level 1 does not have health/mana data!", class_); + sLog->outError(LOG_FILTER_SQL, "Class %i Level 1 does not have health/mana data!", class_); exit(1); } @@ -3323,18 +3323,18 @@ void ObjectMgr::LoadPlayerInfo() { if (pClassInfo->levelInfo[level].basehealth == 0) { - sLog->outErrorDb("Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level+1, level); + sLog->outError(LOG_FILTER_SQL, "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level+1, level); pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level-1]; } } } - sLog->outString(">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } // Loading levels data (class/race dependent) - sLog->outString("Loading Player Create Level Stats Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Level Stats Data..."); { uint32 oldMSTime = getMSTime(); @@ -3343,8 +3343,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outErrorDb(">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty."); + exit(1); } @@ -3357,14 +3357,14 @@ void ObjectMgr::LoadPlayerInfo() uint32 current_race = fields[0].GetUInt8(); if (current_race >= MAX_RACES) { - sLog->outErrorDb("Wrong race %u in `player_levelstats` table, ignoring.", current_race); + sLog->outError(LOG_FILTER_SQL, "Wrong race %u in `player_levelstats` table, ignoring.", current_race); continue; } uint32 current_class = fields[1].GetUInt8(); if (current_class >= MAX_CLASSES) { - sLog->outErrorDb("Wrong class %u in `player_levelstats` table, ignoring.", current_class); + sLog->outError(LOG_FILTER_SQL, "Wrong class %u in `player_levelstats` table, ignoring.", current_class); continue; } @@ -3372,10 +3372,10 @@ void ObjectMgr::LoadPlayerInfo() if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum - sLog->outErrorDb("Wrong (> %u) level %u in `player_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level); + sLog->outError(LOG_FILTER_SQL, "Wrong (> %u) level %u in `player_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level); else { - sLog->outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_levelstats` table, ignoring.", current_level); + sLog->outInfo(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_levelstats` table, ignoring.", current_level); ++count; // make result loading percent "expected" correct in case disabled detail mode for example. } continue; @@ -3427,7 +3427,7 @@ void ObjectMgr::LoadPlayerInfo() // fatal error if no level 1 data if (!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0) { - sLog->outErrorDb("Race %i Class %i Level 1 does not have stats data!", race, class_); + sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level 1 does not have stats data!", race, class_); exit(1); } @@ -3436,19 +3436,19 @@ void ObjectMgr::LoadPlayerInfo() { if (pInfo->levelInfo[level].stats[0] == 0) { - sLog->outErrorDb("Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level); + sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level); pInfo->levelInfo[level] = pInfo->levelInfo[level-1]; } } } } - sLog->outString(">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } // Loading xp per level data - sLog->outString("Loading Player Create XP Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create XP Data..."); { uint32 oldMSTime = getMSTime(); @@ -3461,8 +3461,8 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - sLog->outErrorDb(">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty."); + exit(1); } @@ -3478,10 +3478,10 @@ void ObjectMgr::LoadPlayerInfo() if (current_level >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum - sLog->outErrorDb("Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL, current_level); + sLog->outError(LOG_FILTER_SQL, "Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL, current_level); else { - sLog->outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_xp_for_levels` table, ignoring.", current_level); + sLog->outInfo(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_xp_for_levels` table, ignoring.", current_level); ++count; // make result loading percent "expected" correct in case disabled detail mode for example. } continue; @@ -3497,13 +3497,13 @@ void ObjectMgr::LoadPlayerInfo() { if (_playerXPperLevel[level] == 0) { - sLog->outErrorDb("Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level); + sLog->outError(LOG_FILTER_SQL, "Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level); _playerXPperLevel[level] = _playerXPperLevel[level-1]+100; } } - sLog->outString(">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } @@ -3660,8 +3660,8 @@ void ObjectMgr::LoadQuests() " FROM quest_template"); if (!result) { - sLog->outErrorDb(">> Loaded 0 quests definitions. DB table `quest_template` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quests definitions. DB table `quest_template` is empty."); + return; } @@ -3690,18 +3690,18 @@ void ObjectMgr::LoadQuests() // additional quest integrity checks (GO, creature_template and item_template must be loaded already) if (qinfo->GetQuestMethod() >= 3) - sLog->outErrorDb("Quest %u has `Method` = %u, expected values are 0, 1 or 2.", qinfo->GetQuestId(), qinfo->GetQuestMethod()); + sLog->outError(LOG_FILTER_SQL, "Quest %u has `Method` = %u, expected values are 0, 1 or 2.", qinfo->GetQuestId(), qinfo->GetQuestMethod()); if (qinfo->Flags & ~QUEST_TRINITY_FLAGS_DB_ALLOWED) { - sLog->outErrorDb("Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u", qinfo->GetQuestId(), qinfo->Flags >> 20, QUEST_TRINITY_FLAGS_DB_ALLOWED >> 20); qinfo->Flags &= QUEST_TRINITY_FLAGS_DB_ALLOWED; } if (qinfo->Flags & QUEST_FLAGS_DAILY && qinfo->Flags & QUEST_FLAGS_WEEKLY) { - sLog->outErrorDb("Weekly Quest %u is marked as daily quest in `Flags`, removed daily flag.", qinfo->GetQuestId()); + sLog->outError(LOG_FILTER_SQL, "Weekly Quest %u is marked as daily quest in `Flags`, removed daily flag.", qinfo->GetQuestId()); qinfo->Flags &= ~QUEST_FLAGS_DAILY; } @@ -3709,7 +3709,7 @@ void ObjectMgr::LoadQuests() { if (!(qinfo->Flags & QUEST_TRINITY_FLAGS_REPEATABLE)) { - sLog->outErrorDb("Daily Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId()); + sLog->outError(LOG_FILTER_SQL, "Daily Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId()); qinfo->Flags |= QUEST_TRINITY_FLAGS_REPEATABLE; } } @@ -3718,7 +3718,7 @@ void ObjectMgr::LoadQuests() { if (!(qinfo->Flags & QUEST_TRINITY_FLAGS_REPEATABLE)) { - sLog->outErrorDb("Weekly Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId()); + sLog->outError(LOG_FILTER_SQL, "Weekly Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId()); qinfo->Flags |= QUEST_TRINITY_FLAGS_REPEATABLE; } } @@ -3730,7 +3730,7 @@ void ObjectMgr::LoadQuests() { if (uint32 id = qinfo->RewardChoiceItemId[j]) { - sLog->outErrorDb("Quest %u has `RewardChoiceItemId%d` = %u but item from `RewardChoiceItemId%d` can't be rewarded with quest flag QUEST_FLAGS_AUTO_REWARDED.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = %u but item from `RewardChoiceItemId%d` can't be rewarded with quest flag QUEST_FLAGS_AUTO_REWARDED.", qinfo->GetQuestId(), j+1, id, j+1); // no changes, quest ignore this data } @@ -3742,7 +3742,7 @@ void ObjectMgr::LoadQuests() { if (!GetAreaEntryByAreaID(qinfo->ZoneOrSort)) { - sLog->outErrorDb("Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.", qinfo->GetQuestId(), qinfo->ZoneOrSort); // no changes, quest not dependent from this value but can have problems at client } @@ -3753,7 +3753,7 @@ void ObjectMgr::LoadQuests() QuestSortEntry const* qSort = sQuestSortStore.LookupEntry(-int32(qinfo->ZoneOrSort)); if (!qSort) { - sLog->outErrorDb("Quest %u has `ZoneOrSort` = %i (sort case) but quest sort with this id does not exist.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `ZoneOrSort` = %i (sort case) but quest sort with this id does not exist.", qinfo->GetQuestId(), qinfo->ZoneOrSort); // no changes, quest not dependent from this value but can have problems at client (note some may be 0, we must allow this so no check) } @@ -3762,7 +3762,7 @@ void ObjectMgr::LoadQuests() { if (qinfo->RequiredSkillId != skill_id) { - sLog->outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%d).", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%d).", qinfo->GetQuestId(), qinfo->ZoneOrSort, skill_id); //override, and force proper value here? } @@ -3774,7 +3774,7 @@ void ObjectMgr::LoadQuests() { if (!(qinfo->RequiredClasses & CLASSMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Quest %u does not contain any playable classes in `RequiredClasses` (%u), value set to 0 (all classes).", qinfo->GetQuestId(), qinfo->RequiredClasses); + sLog->outError(LOG_FILTER_SQL, "Quest %u does not contain any playable classes in `RequiredClasses` (%u), value set to 0 (all classes).", qinfo->GetQuestId(), qinfo->RequiredClasses); qinfo->RequiredClasses = 0; } } @@ -3783,7 +3783,7 @@ void ObjectMgr::LoadQuests() { if (!(qinfo->RequiredRaces & RACEMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Quest %u does not contain any playable races in `RequiredRaces` (%u), value set to 0 (all races).", qinfo->GetQuestId(), qinfo->RequiredRaces); + sLog->outError(LOG_FILTER_SQL, "Quest %u does not contain any playable races in `RequiredRaces` (%u), value set to 0 (all races).", qinfo->GetQuestId(), qinfo->RequiredRaces); qinfo->RequiredRaces = 0; } } @@ -3792,7 +3792,7 @@ void ObjectMgr::LoadQuests() { if (!sSkillLineStore.LookupEntry(qinfo->RequiredSkillId)) { - sLog->outErrorDb("Quest %u has `RequiredSkillId` = %u but this skill does not exist", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredSkillId` = %u but this skill does not exist", qinfo->GetQuestId(), qinfo->RequiredSkillId); } } @@ -3801,7 +3801,7 @@ void ObjectMgr::LoadQuests() { if (qinfo->RequiredSkillPoints > sWorld->GetConfigMaxSkillValue()) { - sLog->outErrorDb("Quest %u has `RequiredSkillPoints` = %u but max possible skill is %u, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredSkillPoints` = %u but max possible skill is %u, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredSkillPoints, sWorld->GetConfigMaxSkillValue()); // no changes, quest can't be done for this requirement } @@ -3810,77 +3810,77 @@ void ObjectMgr::LoadQuests() if (qinfo->RequiredFactionId2 && !sFactionStore.LookupEntry(qinfo->RequiredFactionId2)) { - sLog->outErrorDb("Quest %u has `RequiredFactionId2` = %u but faction template %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredFactionId2` = %u but faction template %u does not exist, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredFactionId2, qinfo->RequiredFactionId2); // no changes, quest can't be done for this requirement } if (qinfo->RequiredFactionId1 && !sFactionStore.LookupEntry(qinfo->RequiredFactionId1)) { - sLog->outErrorDb("Quest %u has `RequiredFactionId1` = %u but faction template %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredFactionId1` = %u but faction template %u does not exist, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredFactionId1, qinfo->RequiredFactionId1); // no changes, quest can't be done for this requirement } if (qinfo->RequiredMinRepFaction && !sFactionStore.LookupEntry(qinfo->RequiredMinRepFaction)) { - sLog->outErrorDb("Quest %u has `RequiredMinRepFaction` = %u but faction template %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredMinRepFaction` = %u but faction template %u does not exist, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredMinRepFaction, qinfo->RequiredMinRepFaction); // no changes, quest can't be done for this requirement } if (qinfo->RequiredMaxRepFaction && !sFactionStore.LookupEntry(qinfo->RequiredMaxRepFaction)) { - sLog->outErrorDb("Quest %u has `RequiredMaxRepFaction` = %u but faction template %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredMaxRepFaction` = %u but faction template %u does not exist, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredMaxRepFaction, qinfo->RequiredMaxRepFaction); // no changes, quest can't be done for this requirement } if (qinfo->RequiredMinRepValue && qinfo->RequiredMinRepValue > ReputationMgr::Reputation_Cap) { - sLog->outErrorDb("Quest %u has `RequiredMinRepValue` = %d but max reputation is %u, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredMinRepValue` = %d but max reputation is %u, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredMinRepValue, ReputationMgr::Reputation_Cap); // no changes, quest can't be done for this requirement } if (qinfo->RequiredMinRepValue && qinfo->RequiredMaxRepValue && qinfo->RequiredMaxRepValue <= qinfo->RequiredMinRepValue) { - sLog->outErrorDb("Quest %u has `RequiredMaxRepValue` = %d and `RequiredMinRepValue` = %d, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredMaxRepValue` = %d and `RequiredMinRepValue` = %d, quest can't be done.", qinfo->GetQuestId(), qinfo->RequiredMaxRepValue, qinfo->RequiredMinRepValue); // no changes, quest can't be done for this requirement } if (!qinfo->RequiredFactionId1 && qinfo->RequiredFactionValue1 != 0) { - sLog->outErrorDb("Quest %u has `RequiredFactionValue1` = %d but `RequiredFactionId1` is 0, value has no effect", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredFactionValue1` = %d but `RequiredFactionId1` is 0, value has no effect", qinfo->GetQuestId(), qinfo->RequiredFactionValue1); // warning } if (!qinfo->RequiredFactionId2 && qinfo->RequiredFactionValue2 != 0) { - sLog->outErrorDb("Quest %u has `RequiredFactionValue2` = %d but `RequiredFactionId2` is 0, value has no effect", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredFactionValue2` = %d but `RequiredFactionId2` is 0, value has no effect", qinfo->GetQuestId(), qinfo->RequiredFactionValue2); // warning } if (!qinfo->RequiredMinRepFaction && qinfo->RequiredMinRepValue != 0) { - sLog->outErrorDb("Quest %u has `RequiredMinRepValue` = %d but `RequiredMinRepFaction` is 0, value has no effect", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredMinRepValue` = %d but `RequiredMinRepFaction` is 0, value has no effect", qinfo->GetQuestId(), qinfo->RequiredMinRepValue); // warning } if (!qinfo->RequiredMaxRepFaction && qinfo->RequiredMaxRepValue != 0) { - sLog->outErrorDb("Quest %u has `RequiredMaxRepValue` = %d but `RequiredMaxRepFaction` is 0, value has no effect", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredMaxRepValue` = %d but `RequiredMaxRepFaction` is 0, value has no effect", qinfo->GetQuestId(), qinfo->RequiredMaxRepValue); // warning } if (qinfo->RewardTitleId && !sCharTitlesStore.LookupEntry(qinfo->RewardTitleId)) { - sLog->outErrorDb("Quest %u has `RewardTitleId` = %u but CharTitle Id %u does not exist, quest can't be rewarded with title.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardTitleId` = %u but CharTitle Id %u does not exist, quest can't be rewarded with title.", qinfo->GetQuestId(), qinfo->GetCharTitleId(), qinfo->GetCharTitleId()); qinfo->RewardTitleId = 0; // quest can't reward this title @@ -3890,20 +3890,20 @@ void ObjectMgr::LoadQuests() { if (!sObjectMgr->GetItemTemplate(qinfo->SourceItemId)) { - sLog->outErrorDb("Quest %u has `SourceItemId` = %u but item with entry %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `SourceItemId` = %u but item with entry %u does not exist, quest can't be done.", qinfo->GetQuestId(), qinfo->SourceItemId, qinfo->SourceItemId); qinfo->SourceItemId = 0; // quest can't be done for this requirement } else if (qinfo->SourceItemIdCount == 0) { - sLog->outErrorDb("Quest %u has `SourceItemId` = %u but `SourceItemIdCount` = 0, set to 1 but need fix in DB.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `SourceItemId` = %u but `SourceItemIdCount` = 0, set to 1 but need fix in DB.", qinfo->GetQuestId(), qinfo->SourceItemId); qinfo->SourceItemIdCount = 1; // update to 1 for allow quest work for backward compatibility with DB } } else if (qinfo->SourceItemIdCount>0) { - sLog->outErrorDb("Quest %u has `SourceItemId` = 0 but `SourceItemIdCount` = %u, useless value.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `SourceItemId` = 0 but `SourceItemIdCount` = %u, useless value.", qinfo->GetQuestId(), qinfo->SourceItemIdCount); qinfo->SourceItemIdCount=0; // no quest work changes in fact } @@ -3913,13 +3913,13 @@ void ObjectMgr::LoadQuests() SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(qinfo->SourceSpellid); if (!spellInfo) { - sLog->outErrorDb("Quest %u has `SourceSpellid` = %u but spell %u doesn't exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `SourceSpellid` = %u but spell %u doesn't exist, quest can't be done.", qinfo->GetQuestId(), qinfo->SourceSpellid, qinfo->SourceSpellid); qinfo->SourceSpellid = 0; // quest can't be done for this requirement } else if (!SpellMgr::IsSpellValid(spellInfo)) { - sLog->outErrorDb("Quest %u has `SourceSpellid` = %u but spell %u is broken, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `SourceSpellid` = %u but spell %u is broken, quest can't be done.", qinfo->GetQuestId(), qinfo->SourceSpellid, qinfo->SourceSpellid); qinfo->SourceSpellid = 0; // quest can't be done for this requirement } @@ -3932,7 +3932,7 @@ void ObjectMgr::LoadQuests() { if (qinfo->RequiredItemCount[j] == 0) { - sLog->outErrorDb("Quest %u has `RequiredItemId%d` = %u but `RequiredItemCount%d` = 0, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredItemId%d` = %u but `RequiredItemCount%d` = 0, quest can't be done.", qinfo->GetQuestId(), j+1, id, j+1); // no changes, quest can't be done for this requirement } @@ -3941,14 +3941,14 @@ void ObjectMgr::LoadQuests() if (!sObjectMgr->GetItemTemplate(id)) { - sLog->outErrorDb("Quest %u has `RequiredItemId%d` = %u but item with entry %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredItemId%d` = %u but item with entry %u does not exist, quest can't be done.", qinfo->GetQuestId(), j+1, id, id); qinfo->RequiredItemCount[j] = 0; // prevent incorrect work of quest } } else if (qinfo->RequiredItemCount[j]>0) { - sLog->outErrorDb("Quest %u has `RequiredItemId%d` = 0 but `RequiredItemCount%d` = %u, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredItemId%d` = 0 but `RequiredItemCount%d` = %u, quest can't be done.", qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredItemCount[j]); qinfo->RequiredItemCount[j] = 0; // prevent incorrect work of quest } @@ -3961,7 +3961,7 @@ void ObjectMgr::LoadQuests() { if (!sObjectMgr->GetItemTemplate(id)) { - sLog->outErrorDb("Quest %u has `RequiredSourceItemId%d` = %u but item with entry %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredSourceItemId%d` = %u but item with entry %u does not exist, quest can't be done.", qinfo->GetQuestId(), j+1, id, id); // no changes, quest can't be done for this requirement } @@ -3970,7 +3970,7 @@ void ObjectMgr::LoadQuests() { if (qinfo->RequiredSourceItemCount[j]>0) { - sLog->outErrorDb("Quest %u has `RequiredSourceItemId%d` = 0 but `RequiredSourceItemCount%d` = %u.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredSourceItemId%d` = 0 but `RequiredSourceItemCount%d` = %u.", qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredSourceItemCount[j]); // no changes, quest ignore this data } @@ -3985,7 +3985,7 @@ void ObjectMgr::LoadQuests() SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id); if (!spellInfo) { - sLog->outErrorDb("Quest %u has `ReqSpellCast%d` = %u but spell %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `ReqSpellCast%d` = %u but spell %u does not exist, quest can't be done.", qinfo->GetQuestId(), j+1, id, id); continue; } @@ -4007,7 +4007,7 @@ void ObjectMgr::LoadQuests() { if (!qinfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) { - sLog->outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT for quest %u and RequiredNpcOrGo%d = 0, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags or RequiredNpcOrGo%d must be fixed, quest modified to enable objective.", spellInfo->Id, qinfo->Id, j+1, j+1); + sLog->outError(LOG_FILTER_SQL, "Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT for quest %u and RequiredNpcOrGo%d = 0, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags or RequiredNpcOrGo%d must be fixed, quest modified to enable objective.", spellInfo->Id, qinfo->Id, j+1, j+1); // this will prevent quest completing without objective const_cast(qinfo)->SetFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT); @@ -4015,7 +4015,7 @@ void ObjectMgr::LoadQuests() } else { - sLog->outErrorDb("Quest %u has `ReqSpellCast%d` = %u and RequiredNpcOrGo%d = 0 but spell %u does not have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT effect for this quest, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `ReqSpellCast%d` = %u and RequiredNpcOrGo%d = 0 but spell %u does not have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT effect for this quest, quest can't be done.", qinfo->GetQuestId(), j+1, id, j+1, id); // no changes, quest can't be done for this requirement } @@ -4028,14 +4028,14 @@ void ObjectMgr::LoadQuests() int32 id = qinfo->RequiredNpcOrGo[j]; if (id < 0 && !sObjectMgr->GetGameObjectTemplate(-id)) { - sLog->outErrorDb("Quest %u has `RequiredNpcOrGo%d` = %i but gameobject %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = %i but gameobject %u does not exist, quest can't be done.", qinfo->GetQuestId(), j+1, id, uint32(-id)); qinfo->RequiredNpcOrGo[j] = 0; // quest can't be done for this requirement } if (id > 0 && !sObjectMgr->GetCreatureTemplate(id)) { - sLog->outErrorDb("Quest %u has `RequiredNpcOrGo%d` = %i but creature with entry %u does not exist, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = %i but creature with entry %u does not exist, quest can't be done.", qinfo->GetQuestId(), j+1, id, uint32(id)); qinfo->RequiredNpcOrGo[j] = 0; // quest can't be done for this requirement } @@ -4048,14 +4048,14 @@ void ObjectMgr::LoadQuests() if (!qinfo->RequiredNpcOrGoCount[j]) { - sLog->outErrorDb("Quest %u has `RequiredNpcOrGo%d` = %u but `RequiredNpcOrGoCount%d` = 0, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = %u but `RequiredNpcOrGoCount%d` = 0, quest can't be done.", qinfo->GetQuestId(), j+1, id, j+1); // no changes, quest can be incorrectly done, but we already report this } } else if (qinfo->RequiredNpcOrGoCount[j]>0) { - sLog->outErrorDb("Quest %u has `RequiredNpcOrGo%d` = 0 but `RequiredNpcOrGoCount%d` = %u.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = 0 but `RequiredNpcOrGoCount%d` = %u.", qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredNpcOrGoCount[j]); // no changes, quest ignore this data } @@ -4068,21 +4068,21 @@ void ObjectMgr::LoadQuests() { if (!sObjectMgr->GetItemTemplate(id)) { - sLog->outErrorDb("Quest %u has `RewardChoiceItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.", qinfo->GetQuestId(), j+1, id, id); qinfo->RewardChoiceItemId[j] = 0; // no changes, quest will not reward this } if (!qinfo->RewardChoiceItemCount[j]) { - sLog->outErrorDb("Quest %u has `RewardChoiceItemId%d` = %u but `RewardChoiceItemCount%d` = 0, quest can't be done.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = %u but `RewardChoiceItemCount%d` = 0, quest can't be done.", qinfo->GetQuestId(), j+1, id, j+1); // no changes, quest can't be done } } else if (qinfo->RewardChoiceItemCount[j]>0) { - sLog->outErrorDb("Quest %u has `RewardChoiceItemId%d` = 0 but `RewardChoiceItemCount%d` = %u.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = 0 but `RewardChoiceItemCount%d` = %u.", qinfo->GetQuestId(), j+1, j+1, qinfo->RewardChoiceItemCount[j]); // no changes, quest ignore this data } @@ -4095,21 +4095,21 @@ void ObjectMgr::LoadQuests() { if (!sObjectMgr->GetItemTemplate(id)) { - sLog->outErrorDb("Quest %u has `RewardItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.", qinfo->GetQuestId(), j+1, id, id); qinfo->RewardItemId[j] = 0; // no changes, quest will not reward this item } if (!qinfo->RewardItemIdCount[j]) { - sLog->outErrorDb("Quest %u has `RewardItemId%d` = %u but `RewardItemIdCount%d` = 0, quest will not reward this item.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardItemId%d` = %u but `RewardItemIdCount%d` = 0, quest will not reward this item.", qinfo->GetQuestId(), j+1, id, j+1); // no changes } } else if (qinfo->RewardItemIdCount[j]>0) { - sLog->outErrorDb("Quest %u has `RewardItemId%d` = 0 but `RewardItemIdCount%d` = %u.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardItemId%d` = 0 but `RewardItemIdCount%d` = %u.", qinfo->GetQuestId(), j+1, j+1, qinfo->RewardItemIdCount[j]); // no changes, quest ignore this data } @@ -4121,18 +4121,18 @@ void ObjectMgr::LoadQuests() { if (abs(qinfo->RewardFactionValueId[j]) > 9) { - sLog->outErrorDb("Quest %u has RewardFactionValueId%d = %i. That is outside the range of valid values (-9 to 9).", qinfo->GetQuestId(), j+1, qinfo->RewardFactionValueId[j]); + sLog->outError(LOG_FILTER_SQL, "Quest %u has RewardFactionValueId%d = %i. That is outside the range of valid values (-9 to 9).", qinfo->GetQuestId(), j+1, qinfo->RewardFactionValueId[j]); } if (!sFactionStore.LookupEntry(qinfo->RewardFactionId[j])) { - sLog->outErrorDb("Quest %u has `RewardFactionId%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(), j+1, qinfo->RewardFactionId[j], qinfo->RewardFactionId[j]); + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardFactionId%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(), j+1, qinfo->RewardFactionId[j], qinfo->RewardFactionId[j]); qinfo->RewardFactionId[j] = 0; // quest will not reward this } } else if (qinfo->RewardFactionValueIdOverride[j] != 0) { - sLog->outErrorDb("Quest %u has `RewardFactionId%d` = 0 but `RewardFactionValueIdOverride%d` = %i.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardFactionId%d` = 0 but `RewardFactionValueIdOverride%d` = %i.", qinfo->GetQuestId(), j+1, j+1, qinfo->RewardFactionValueIdOverride[j]); // no changes, quest ignore this data } @@ -4144,21 +4144,21 @@ void ObjectMgr::LoadQuests() if (!spellInfo) { - sLog->outErrorDb("Quest %u has `RewardSpell` = %u but spell %u does not exist, spell removed as display reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u does not exist, spell removed as display reward.", qinfo->GetQuestId(), qinfo->RewardSpell, qinfo->RewardSpell); qinfo->RewardSpell = 0; // no spell reward will display for this quest } else if (!SpellMgr::IsSpellValid(spellInfo)) { - sLog->outErrorDb("Quest %u has `RewardSpell` = %u but spell %u is broken, quest will not have a spell reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u is broken, quest will not have a spell reward.", qinfo->GetQuestId(), qinfo->RewardSpell, qinfo->RewardSpell); qinfo->RewardSpell = 0; // no spell reward will display for this quest } else if (GetTalentSpellCost(qinfo->RewardSpell)) { - sLog->outErrorDb("Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.", qinfo->GetQuestId(), qinfo->RewardSpell, qinfo->RewardSpell); qinfo->RewardSpell = 0; // no spell reward will display for this quest } @@ -4170,21 +4170,21 @@ void ObjectMgr::LoadQuests() if (!spellInfo) { - sLog->outErrorDb("Quest %u has `RewardSpellCast` = %u but spell %u does not exist, quest will not have a spell reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardSpellCast` = %u but spell %u does not exist, quest will not have a spell reward.", qinfo->GetQuestId(), qinfo->RewardSpellCast, qinfo->RewardSpellCast); qinfo->RewardSpellCast = 0; // no spell will be casted on player } else if (!SpellMgr::IsSpellValid(spellInfo)) { - sLog->outErrorDb("Quest %u has `RewardSpellCast` = %u but spell %u is broken, quest will not have a spell reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardSpellCast` = %u but spell %u is broken, quest will not have a spell reward.", qinfo->GetQuestId(), qinfo->RewardSpellCast, qinfo->RewardSpellCast); qinfo->RewardSpellCast = 0; // no spell will be casted on player } else if (GetTalentSpellCost(qinfo->RewardSpellCast)) { - sLog->outErrorDb("Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.", qinfo->GetQuestId(), qinfo->RewardSpellCast, qinfo->RewardSpellCast); qinfo->RewardSpellCast = 0; // no spell will be casted on player } @@ -4194,7 +4194,7 @@ void ObjectMgr::LoadQuests() { if (!sMailTemplateStore.LookupEntry(qinfo->RewardMailTemplateId)) { - sLog->outErrorDb("Quest %u has `RewardMailTemplateId` = %u but mail template %u does not exist, quest will not have a mail reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardMailTemplateId` = %u but mail template %u does not exist, quest will not have a mail reward.", qinfo->GetQuestId(), qinfo->RewardMailTemplateId, qinfo->RewardMailTemplateId); qinfo->RewardMailTemplateId = 0; // no mail will send to player qinfo->RewardMailDelay = 0; // no mail will send to player @@ -4202,7 +4202,7 @@ void ObjectMgr::LoadQuests() else if (usedMailTemplates.find(qinfo->RewardMailTemplateId) != usedMailTemplates.end()) { std::map::const_iterator used_mt_itr = usedMailTemplates.find(qinfo->RewardMailTemplateId); - sLog->outErrorDb("Quest %u has `RewardMailTemplateId` = %u but mail template %u already used for quest %u, quest will not have a mail reward.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `RewardMailTemplateId` = %u but mail template %u already used for quest %u, quest will not have a mail reward.", qinfo->GetQuestId(), qinfo->RewardMailTemplateId, qinfo->RewardMailTemplateId, used_mt_itr->second); qinfo->RewardMailTemplateId = 0; // no mail will send to player qinfo->RewardMailDelay = 0; // no mail will send to player @@ -4216,7 +4216,7 @@ void ObjectMgr::LoadQuests() QuestMap::iterator qNextItr = _questTemplates.find(qinfo->NextQuestIdChain); if (qNextItr == _questTemplates.end()) { - sLog->outErrorDb("Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.", + sLog->outError(LOG_FILTER_SQL, "Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.", qinfo->GetQuestId(), qinfo->NextQuestIdChain, qinfo->NextQuestIdChain); qinfo->NextQuestIdChain = 0; } @@ -4229,7 +4229,7 @@ void ObjectMgr::LoadQuests() { if (_questTemplates.find(abs(qinfo->GetPrevQuestId())) == _questTemplates.end()) { - sLog->outErrorDb("Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId()); + sLog->outError(LOG_FILTER_SQL, "Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId()); } else { @@ -4242,7 +4242,7 @@ void ObjectMgr::LoadQuests() QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId())); if (qNextItr == _questTemplates.end()) { - sLog->outErrorDb("Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId()); + sLog->outError(LOG_FILTER_SQL, "Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId()); } else { @@ -4281,7 +4281,7 @@ void ObjectMgr::LoadQuests() if (!quest->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) { - sLog->outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags must be fixed, quest modified to enable objective.", spellInfo->Id, quest_id); + sLog->outError(LOG_FILTER_SQL, "Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags must be fixed, quest modified to enable objective.", spellInfo->Id, quest_id); // this will prevent quest completing without objective const_cast(quest)->SetFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT); @@ -4289,8 +4289,8 @@ void ObjectMgr::LoadQuests() } } - sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadQuestLocales() @@ -4338,8 +4338,8 @@ void ObjectMgr::LoadQuestLocales() } } while (result->NextRow()); - sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadScripts(ScriptsType type) @@ -4357,7 +4357,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) if (sScriptMgr->IsScriptScheduled()) // function cannot be called when scripts are in use. return; - sLog->outString("Loading %s...", tableName.c_str()); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading %s...", tableName.c_str()); scripts->clear(); // need for reload support @@ -4367,8 +4367,8 @@ void ObjectMgr::LoadScripts(ScriptsType type) if (!result) { - sLog->outString(">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str()); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str()); + return; } @@ -4399,19 +4399,19 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (tmp.Talk.ChatType > CHAT_TYPE_WHISPER && tmp.Talk.ChatType != CHAT_MSG_RAID_BOSS_WHISPER) { - sLog->outErrorDb("Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u", tableName.c_str(), tmp.Talk.ChatType, tmp.id); continue; } if (!tmp.Talk.TextID) { - sLog->outErrorDb("Table `%s` has invalid talk text id (dataint = %i) in SCRIPT_COMMAND_TALK for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid talk text id (dataint = %i) in SCRIPT_COMMAND_TALK for script id %u", tableName.c_str(), tmp.Talk.TextID, tmp.id); continue; } if (tmp.Talk.TextID < MIN_DB_SCRIPT_STRING_ID || tmp.Talk.TextID >= MAX_DB_SCRIPT_STRING_ID) { - sLog->outErrorDb("Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u", tableName.c_str(), tmp.Talk.TextID, MIN_DB_SCRIPT_STRING_ID, MAX_DB_SCRIPT_STRING_ID, tmp.id); continue; } @@ -4423,7 +4423,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!sEmotesStore.LookupEntry(tmp.Emote.EmoteID)) { - sLog->outErrorDb("Table `%s` has invalid emote id (datalong = %u) in SCRIPT_COMMAND_EMOTE for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid emote id (datalong = %u) in SCRIPT_COMMAND_EMOTE for script id %u", tableName.c_str(), tmp.Emote.EmoteID, tmp.id); continue; } @@ -4434,14 +4434,14 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!sMapStore.LookupEntry(tmp.TeleportTo.MapID)) { - sLog->outErrorDb("Table `%s` has invalid map (Id: %u) in SCRIPT_COMMAND_TELEPORT_TO for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid map (Id: %u) in SCRIPT_COMMAND_TELEPORT_TO for script id %u", tableName.c_str(), tmp.TeleportTo.MapID, tmp.id); continue; } if (!Trinity::IsValidMapCoord(tmp.TeleportTo.DestX, tmp.TeleportTo.DestY, tmp.TeleportTo.DestZ, tmp.TeleportTo.Orientation)) { - sLog->outErrorDb("Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TELEPORT_TO for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TELEPORT_TO for script id %u", tableName.c_str(), tmp.TeleportTo.DestX, tmp.TeleportTo.DestY, tmp.TeleportTo.DestZ, tmp.TeleportTo.Orientation, tmp.id); continue; } @@ -4453,14 +4453,14 @@ void ObjectMgr::LoadScripts(ScriptsType type) Quest const* quest = GetQuestTemplate(tmp.QuestExplored.QuestID); if (!quest) { - sLog->outErrorDb("Table `%s` has invalid quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u", tableName.c_str(), tmp.QuestExplored.QuestID, tmp.id); continue; } if (!quest->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) { - sLog->outErrorDb("Table `%s` has quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT in quest flags. Script command or quest flags wrong. Quest modified to require objective.", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT in quest flags. Script command or quest flags wrong. Quest modified to require objective.", tableName.c_str(), tmp.QuestExplored.QuestID, tmp.id); // this will prevent quest completing without objective @@ -4471,21 +4471,21 @@ void ObjectMgr::LoadScripts(ScriptsType type) if (float(tmp.QuestExplored.Distance) > DEFAULT_VISIBILITY_DISTANCE) { - sLog->outErrorDb("Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u", tableName.c_str(), tmp.QuestExplored.Distance, tmp.id); continue; } if (tmp.QuestExplored.Distance && float(tmp.QuestExplored.Distance) > DEFAULT_VISIBILITY_DISTANCE) { - sLog->outErrorDb("Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, max distance is %f or 0 for disable distance check", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, max distance is %f or 0 for disable distance check", tableName.c_str(), tmp.QuestExplored.Distance, tmp.id, DEFAULT_VISIBILITY_DISTANCE); continue; } if (tmp.QuestExplored.Distance && float(tmp.QuestExplored.Distance) < INTERACTION_DISTANCE) { - sLog->outErrorDb("Table `%s` has too small distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, min distance is %f or 0 for disable distance check", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has too small distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, min distance is %f or 0 for disable distance check", tableName.c_str(), tmp.QuestExplored.Distance, tmp.id, INTERACTION_DISTANCE); continue; } @@ -4497,7 +4497,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!GetCreatureTemplate(tmp.KillCredit.CreatureEntry)) { - sLog->outErrorDb("Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_KILL_CREDIT for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_KILL_CREDIT for script id %u", tableName.c_str(), tmp.KillCredit.CreatureEntry, tmp.id); continue; } @@ -4509,7 +4509,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) GameObjectData const* data = GetGOData(tmp.RespawnGameobject.GOGuid); if (!data) { - sLog->outErrorDb("Table `%s` has invalid gameobject (GUID: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid gameobject (GUID: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u", tableName.c_str(), tmp.RespawnGameobject.GOGuid, tmp.id); continue; } @@ -4517,7 +4517,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) GameObjectTemplate const* info = GetGameObjectTemplate(data->id); if (!info) { - sLog->outErrorDb("Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u", tableName.c_str(), tmp.RespawnGameobject.GOGuid, data->id, tmp.id); continue; } @@ -4528,7 +4528,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) info->type == GAMEOBJECT_TYPE_BUTTON || info->type == GAMEOBJECT_TYPE_TRAP) { - sLog->outErrorDb("Table `%s` have gameobject type (%u) unsupported by command SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` have gameobject type (%u) unsupported by command SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u", tableName.c_str(), info->entry, tmp.id); continue; } @@ -4539,14 +4539,14 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!Trinity::IsValidMapCoord(tmp.TempSummonCreature.PosX, tmp.TempSummonCreature.PosY, tmp.TempSummonCreature.PosZ, tmp.TempSummonCreature.Orientation)) { - sLog->outErrorDb("Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u", tableName.c_str(), tmp.TempSummonCreature.PosX, tmp.TempSummonCreature.PosY, tmp.TempSummonCreature.PosZ, tmp.TempSummonCreature.Orientation, tmp.id); continue; } if (!GetCreatureTemplate(tmp.TempSummonCreature.CreatureEntry)) { - sLog->outErrorDb("Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u", tableName.c_str(), tmp.TempSummonCreature.CreatureEntry, tmp.id); continue; } @@ -4559,7 +4559,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) GameObjectData const* data = GetGOData(tmp.ToggleDoor.GOGuid); if (!data) { - sLog->outErrorDb("Table `%s` has invalid gameobject (GUID: %u) in %s for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has invalid gameobject (GUID: %u) in %s for script id %u", tableName.c_str(), tmp.ToggleDoor.GOGuid, GetScriptCommandName(tmp.command).c_str(), tmp.id); continue; } @@ -4567,14 +4567,14 @@ void ObjectMgr::LoadScripts(ScriptsType type) GameObjectTemplate const* info = GetGameObjectTemplate(data->id); if (!info) { - sLog->outErrorDb("Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in %s for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in %s for script id %u", tableName.c_str(), tmp.ToggleDoor.GOGuid, data->id, GetScriptCommandName(tmp.command).c_str(), tmp.id); continue; } if (info->type != GAMEOBJECT_TYPE_DOOR) { - sLog->outErrorDb("Table `%s` has gameobject type (%u) non supported by command %s for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has gameobject type (%u) non supported by command %s for script id %u", tableName.c_str(), info->entry, GetScriptCommandName(tmp.command).c_str(), tmp.id); continue; } @@ -4586,13 +4586,13 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!sSpellMgr->GetSpellInfo(tmp.RemoveAura.SpellID)) { - sLog->outErrorDb("Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u", tableName.c_str(), tmp.RemoveAura.SpellID, tmp.id); continue; } if (tmp.RemoveAura.Flags & ~0x1) // 1 bits (0, 1) { - sLog->outErrorDb("Table `%s` using unknown flags in datalong2 (%u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` using unknown flags in datalong2 (%u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u", tableName.c_str(), tmp.RemoveAura.Flags, tmp.id); continue; } @@ -4603,25 +4603,25 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!sSpellMgr->GetSpellInfo(tmp.CastSpell.SpellID)) { - sLog->outErrorDb("Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", tableName.c_str(), tmp.CastSpell.SpellID, tmp.id); continue; } if (tmp.CastSpell.Flags > 4) // targeting type { - sLog->outErrorDb("Table `%s` using unknown target in datalong2 (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` using unknown target in datalong2 (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", tableName.c_str(), tmp.CastSpell.Flags, tmp.id); continue; } if (tmp.CastSpell.Flags != 4 && tmp.CastSpell.CreatureEntry & ~0x1) // 1 bit (0, 1) { - sLog->outErrorDb("Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", tableName.c_str(), tmp.CastSpell.CreatureEntry, tmp.id); continue; } else if (tmp.CastSpell.Flags == 4 && !GetCreatureTemplate(tmp.CastSpell.CreatureEntry)) { - sLog->outErrorDb("Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", tableName.c_str(), tmp.CastSpell.CreatureEntry, tmp.id); continue; } @@ -4632,13 +4632,13 @@ void ObjectMgr::LoadScripts(ScriptsType type) { if (!GetItemTemplate(tmp.CreateItem.ItemEntry)) { - sLog->outErrorDb("Table `%s` has nonexistent item (entry: %u) in SCRIPT_COMMAND_CREATE_ITEM for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` has nonexistent item (entry: %u) in SCRIPT_COMMAND_CREATE_ITEM for script id %u", tableName.c_str(), tmp.CreateItem.ItemEntry, tmp.id); continue; } if (!tmp.CreateItem.Amount) { - sLog->outErrorDb("Table `%s` SCRIPT_COMMAND_CREATE_ITEM but amount is %u for script id %u", + sLog->outError(LOG_FILTER_SQL, "Table `%s` SCRIPT_COMMAND_CREATE_ITEM but amount is %u for script id %u", tableName.c_str(), tmp.CreateItem.Amount, tmp.id); continue; } @@ -4659,8 +4659,8 @@ void ObjectMgr::LoadScripts(ScriptsType type) } while (result->NextRow()); - sLog->outString(">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadGameObjectScripts() @@ -4671,7 +4671,7 @@ void ObjectMgr::LoadGameObjectScripts() for (ScriptMapMap::const_iterator itr = sGameObjectScripts.begin(); itr != sGameObjectScripts.end(); ++itr) { if (!GetGOData(itr->first)) - sLog->outErrorDb("Table `gameobject_scripts` has not existing gameobject (GUID: %u) as script id", itr->first); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject_scripts` has not existing gameobject (GUID: %u) as script id", itr->first); } } @@ -4683,7 +4683,7 @@ void ObjectMgr::LoadQuestEndScripts() for (ScriptMapMap::const_iterator itr = sQuestEndScripts.begin(); itr != sQuestEndScripts.end(); ++itr) { if (!GetQuestTemplate(itr->first)) - sLog->outErrorDb("Table `quest_end_scripts` has not existing quest (Id: %u) as script id", itr->first); + sLog->outError(LOG_FILTER_SQL, "Table `quest_end_scripts` has not existing quest (Id: %u) as script id", itr->first); } } @@ -4695,7 +4695,7 @@ void ObjectMgr::LoadQuestStartScripts() for (ScriptMapMap::const_iterator itr = sQuestStartScripts.begin(); itr != sQuestStartScripts.end(); ++itr) { if (!GetQuestTemplate(itr->first)) - sLog->outErrorDb("Table `quest_start_scripts` has not existing quest (Id: %u) as script id", itr->first); + sLog->outError(LOG_FILTER_SQL, "Table `quest_start_scripts` has not existing quest (Id: %u) as script id", itr->first); } } @@ -4711,14 +4711,14 @@ void ObjectMgr::LoadSpellScripts() if (!spellInfo) { - sLog->outErrorDb("Table `spell_scripts` has not existing spell (Id: %u) as script id", spellId); + sLog->outError(LOG_FILTER_SQL, "Table `spell_scripts` has not existing spell (Id: %u) as script id", spellId); continue; } uint8 i = (uint8)((uint32(itr->first) >> 24) & 0x000000FF); //check for correct spellEffect if (!spellInfo->Effects[i].Effect || (spellInfo->Effects[i].Effect != SPELL_EFFECT_SCRIPT_EFFECT && spellInfo->Effects[i].Effect != SPELL_EFFECT_DUMMY)) - sLog->outErrorDb("Table `spell_scripts` - spell %u effect %u is not SPELL_EFFECT_SCRIPT_EFFECT or SPELL_EFFECT_DUMMY", spellId, i); + sLog->outError(LOG_FILTER_SQL, "Table `spell_scripts` - spell %u effect %u is not SPELL_EFFECT_SCRIPT_EFFECT or SPELL_EFFECT_DUMMY", spellId, i); } } @@ -4760,7 +4760,7 @@ void ObjectMgr::LoadEventScripts() { std::set::const_iterator itr2 = evt_scripts.find(itr->first); if (itr2 == evt_scripts.end()) - sLog->outErrorDb("Table `event_scripts` has script (Id: %u) not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u", + sLog->outError(LOG_FILTER_SQL, "Table `event_scripts` has script (Id: %u) not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u", itr->first, SPELL_EFFECT_SEND_EVENT); } } @@ -4791,7 +4791,7 @@ void ObjectMgr::LoadWaypointScripts() } for (std::set::iterator itr = actionSet.begin(); itr != actionSet.end(); ++itr) - sLog->outErrorDb("There is no waypoint which links to the waypoint script %u", *itr); + sLog->outError(LOG_FILTER_SQL, "There is no waypoint which links to the waypoint script %u", *itr); } void ObjectMgr::LoadSpellScriptNames() @@ -4804,8 +4804,8 @@ void ObjectMgr::LoadSpellScriptNames() if (!result) { - sLog->outString(">> Loaded 0 spell script names. DB table `spell_script_names` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!"); + return; } @@ -4829,7 +4829,7 @@ void ObjectMgr::LoadSpellScriptNames() SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outErrorDb("Scriptname:`%s` spell (spell_id:%d) does not exist in `Spell.dbc`.", scriptName, fields[0].GetInt32()); + sLog->outError(LOG_FILTER_SQL, "Scriptname:`%s` spell (spell_id:%d) does not exist in `Spell.dbc`.", scriptName, fields[0].GetInt32()); continue; } @@ -4837,7 +4837,7 @@ void ObjectMgr::LoadSpellScriptNames() { if (sSpellMgr->GetFirstSpellInChain(spellId) != uint32(spellId)) { - sLog->outErrorDb("Scriptname:`%s` spell (spell_id:%d) is not first rank of spell.", scriptName, fields[0].GetInt32()); + sLog->outError(LOG_FILTER_SQL, "Scriptname:`%s` spell (spell_id:%d) is not first rank of spell.", scriptName, fields[0].GetInt32()); continue; } while (spellInfo) @@ -4852,8 +4852,8 @@ void ObjectMgr::LoadSpellScriptNames() } while (result->NextRow()); - sLog->outString(">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::ValidateSpellScripts() @@ -4862,8 +4862,8 @@ void ObjectMgr::ValidateSpellScripts() if (_spellScriptsStore.empty()) { - sLog->outString(">> Validated 0 scripts."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Validated 0 scripts."); + return; } @@ -4883,7 +4883,7 @@ void ObjectMgr::ValidateSpellScripts() bool valid = true; if (!spellScript && !auraScript) { - sLog->outError("TSCR: Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second)); + sLog->outError(LOG_FILTER_TSCR, "Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second)); valid = false; } if (spellScript) @@ -4910,8 +4910,8 @@ void ObjectMgr::ValidateSpellScripts() ++count; } - sLog->outString(">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadPageTexts() @@ -4923,8 +4923,8 @@ void ObjectMgr::LoadPageTexts() if (!result) { - sLog->outString(">> Loaded 0 page texts. DB table `page_text` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 page texts. DB table `page_text` is empty!"); + return; } @@ -4948,13 +4948,13 @@ void ObjectMgr::LoadPageTexts() { PageTextContainer::const_iterator itr2 = _pageTextStore.find(itr->second.NextPage); if (itr2 == _pageTextStore.end()) - sLog->outErrorDb("Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage); + sLog->outError(LOG_FILTER_SQL, "Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage); } } - sLog->outString(">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } PageText const* ObjectMgr::GetPageText(uint32 pageEntry) @@ -4989,8 +4989,8 @@ void ObjectMgr::LoadPageTextLocales() AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text); } while (result->NextRow()); - sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadInstanceTemplate() @@ -5002,8 +5002,8 @@ void ObjectMgr::LoadInstanceTemplate() if (!result) { - sLog->outString(">> Loaded 0 instance templates. DB table `page_text` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 instance templates. DB table `page_text` is empty!"); + return; } @@ -5016,7 +5016,7 @@ void ObjectMgr::LoadInstanceTemplate() if (!MapManager::IsValidMAP(mapID, true)) { - sLog->outErrorDb("ObjectMgr::LoadInstanceTemplate: bad mapid %d for template!", mapID); + sLog->outError(LOG_FILTER_SQL, "ObjectMgr::LoadInstanceTemplate: bad mapid %d for template!", mapID); continue; } @@ -5032,8 +5032,8 @@ void ObjectMgr::LoadInstanceTemplate() } while (result->NextRow()); - sLog->outString(">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID) @@ -5053,8 +5053,8 @@ void ObjectMgr::LoadInstanceEncounters() QueryResult result = WorldDatabase.Query("SELECT entry, creditType, creditEntry, lastEncounterDungeon FROM instance_encounters"); if (!result) { - sLog->outErrorDb(">> Loaded 0 instance encounters, table is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 instance encounters, table is empty!"); + return; } @@ -5070,13 +5070,13 @@ void ObjectMgr::LoadInstanceEncounters() DungeonEncounterEntry const* dungeonEncounter = sDungeonEncounterStore.LookupEntry(entry); if (!dungeonEncounter) { - sLog->outErrorDb("Table `instance_encounters` has an invalid encounter id %u, skipped!", entry); + sLog->outError(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid encounter id %u, skipped!", entry); continue; } if (lastEncounterDungeon && !sLFGDungeonStore.LookupEntry(lastEncounterDungeon)) { - sLog->outErrorDb("Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName[0], lastEncounterDungeon); + sLog->outError(LOG_FILTER_SQL, "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName[0], lastEncounterDungeon); continue; } @@ -5085,7 +5085,7 @@ void ObjectMgr::LoadInstanceEncounters() { if (itr != dungeonLastBosses.end()) { - sLog->outErrorDb("Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName[0], itr->second->id, itr->second->encounterName[0]); + sLog->outError(LOG_FILTER_SQL, "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName[0], itr->second->id, itr->second->encounterName[0]); continue; } @@ -5099,7 +5099,7 @@ void ObjectMgr::LoadInstanceEncounters() CreatureTemplate const* creatureInfo = GetCreatureTemplate(creditEntry); if (!creatureInfo) { - sLog->outErrorDb("Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]); + sLog->outError(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]); continue; } const_cast(creatureInfo)->flags_extra |= CREATURE_FLAG_EXTRA_DUNGEON_BOSS; @@ -5108,12 +5108,12 @@ void ObjectMgr::LoadInstanceEncounters() case ENCOUNTER_CREDIT_CAST_SPELL: if (!sSpellMgr->GetSpellInfo(creditEntry)) { - sLog->outErrorDb("Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]); + sLog->outError(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]); continue; } break; default: - sLog->outErrorDb("Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName[0]); + sLog->outError(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName[0]); continue; } @@ -5122,8 +5122,8 @@ void ObjectMgr::LoadInstanceEncounters() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const @@ -5143,8 +5143,8 @@ void ObjectMgr::LoadGossipText() int count = 0; if (!result) { - sLog->outString(">> Loaded %u npc texts", count); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u npc texts", count); + return; } _gossipTextStore.rehash(result->GetRowCount()); @@ -5161,7 +5161,7 @@ void ObjectMgr::LoadGossipText() uint32 Text_ID = fields[cic++].GetUInt32(); if (!Text_ID) { - sLog->outErrorDb("Table `npc_text` has record wit reserved id 0, ignore."); + sLog->outError(LOG_FILTER_SQL, "Table `npc_text` has record wit reserved id 0, ignore."); continue; } @@ -5183,8 +5183,8 @@ void ObjectMgr::LoadGossipText() } } while (result->NextRow()); - sLog->outString(">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadNpcTextLocales() @@ -5226,8 +5226,8 @@ void ObjectMgr::LoadNpcTextLocales() } } while (result->NextRow()); - sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } //not very fast function but it is called only once a day, or on starting-up @@ -5238,7 +5238,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) time_t curTime = time(NULL); tm* lt = localtime(&curTime); uint64 basetime(curTime); - sLog->outDetail("Returning mails current time: hour: %d, minute: %d, second: %d ", lt->tm_hour, lt->tm_min, lt->tm_sec); + sLog->outInfo(LOG_FILTER_GENERAL, "Returning mails current time: hour: %d, minute: %d, second: %d ", lt->tm_hour, lt->tm_min, lt->tm_sec); // Delete all old mails without item and without body immediately, if starting server if (!serverUp) @@ -5252,8 +5252,8 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) { - sLog->outString(">> No expired mails found."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> No expired mails found."); + return; // any mails need to be returned or deleted } @@ -5356,8 +5356,8 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) } while (result->NextRow()); - sLog->outString(">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadQuestAreaTriggers() @@ -5370,8 +5370,8 @@ void ObjectMgr::LoadQuestAreaTriggers() if (!result) { - sLog->outString(">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty."); + return; } @@ -5389,7 +5389,7 @@ void ObjectMgr::LoadQuestAreaTriggers() AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(trigger_ID); if (!atEntry) { - sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", trigger_ID); + sLog->outError(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", trigger_ID); continue; } @@ -5397,13 +5397,13 @@ void ObjectMgr::LoadQuestAreaTriggers() if (!quest) { - sLog->outErrorDb("Table `areatrigger_involvedrelation` has record (id: %u) for not existing quest %u", trigger_ID, quest_ID); + sLog->outError(LOG_FILTER_SQL, "Table `areatrigger_involvedrelation` has record (id: %u) for not existing quest %u", trigger_ID, quest_ID); continue; } if (!quest->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) { - sLog->outErrorDb("Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.", trigger_ID, quest_ID); + sLog->outError(LOG_FILTER_SQL, "Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.", trigger_ID, quest_ID); // this will prevent quest completing without objective const_cast(quest)->SetFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT); @@ -5415,8 +5415,8 @@ void ObjectMgr::LoadQuestAreaTriggers() } while (result->NextRow()); - sLog->outString(">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadTavernAreaTriggers() @@ -5429,8 +5429,8 @@ void ObjectMgr::LoadTavernAreaTriggers() if (!result) { - sLog->outString(">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty."); + return; } @@ -5447,15 +5447,15 @@ void ObjectMgr::LoadTavernAreaTriggers() AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID); if (!atEntry) { - sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); + sLog->outError(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); continue; } _tavernAreaTriggerStore.insert(Trigger_ID); } while (result->NextRow()); - sLog->outString(">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadAreaTriggerScripts() @@ -5467,8 +5467,8 @@ void ObjectMgr::LoadAreaTriggerScripts() if (!result) { - sLog->outString(">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty."); + return; } @@ -5486,14 +5486,14 @@ void ObjectMgr::LoadAreaTriggerScripts() AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID); if (!atEntry) { - sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); + sLog->outError(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); continue; } _areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName); } while (result->NextRow()); - sLog->outString(">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team) @@ -5588,7 +5588,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt mount_id = mount_info->GetRandomValidModelId(); if (!mount_id) { - sLog->outErrorDb("No displayid found for the taxi mount with the entry %u! Can't load it!", mount_entry); + sLog->outError(LOG_FILTER_SQL, "No displayid found for the taxi mount with the entry %u! Can't load it!", mount_entry); return false; } } @@ -5611,8 +5611,8 @@ void ObjectMgr::LoadGraveyardZones() if (!result) { - sLog->outString(">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty."); + return; } @@ -5631,35 +5631,35 @@ void ObjectMgr::LoadGraveyardZones() WorldSafeLocsEntry const* entry = sWorldSafeLocsStore.LookupEntry(safeLocId); if (!entry) { - sLog->outErrorDb("Table `game_graveyard_zone` has a record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", safeLocId); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", safeLocId); continue; } AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId); if (!areaEntry) { - sLog->outErrorDb("Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId); continue; } if (areaEntry->zone != 0) { - sLog->outErrorDb("Table `game_graveyard_zone` has a record for subzone id (%u) instead of zone, skipped.", zoneId); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for subzone id (%u) instead of zone, skipped.", zoneId); continue; } if (team != 0 && team != HORDE && team != ALLIANCE) { - sLog->outErrorDb("Table `game_graveyard_zone` has a record for non player faction (%u), skipped.", team); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for non player faction (%u), skipped.", team); continue; } if (!AddGraveYardLink(safeLocId, zoneId, team, false)) - sLog->outErrorDb("Table `game_graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId); } while (result->NextRow()); - sLog->outString(">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveYard(uint32 team) @@ -5686,7 +5686,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float { if (z > -500) { - sLog->outError("ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z); + sLog->outError(LOG_FILTER_GENERAL, "ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z); return GetDefaultGraveYard(team); } } @@ -5705,7 +5705,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float if (graveLow == graveUp && !map->IsBattleArena()) { - sLog->outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); return GetDefaultGraveYard(team); } @@ -5731,7 +5731,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float WorldSafeLocsEntry const* entry = sWorldSafeLocsStore.LookupEntry(data.safeLocId); if (!entry) { - sLog->outErrorDb("Table `game_graveyard_zone` has record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", data.safeLocId); + sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` has record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", data.safeLocId); continue; } @@ -5849,7 +5849,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool GraveYardContainer::iterator graveUp = GraveYardStore.upper_bound(zoneId); if (graveLow == graveUp) { - //sLog->outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); + //sLog->outError(LOG_FILTER_SQL, "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); return; } @@ -5904,8 +5904,8 @@ void ObjectMgr::LoadAreaTriggerTeleports() QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport"); if (!result) { - sLog->outString(">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty."); + return; } @@ -5930,20 +5930,20 @@ void ObjectMgr::LoadAreaTriggerTeleports() AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID); if (!atEntry) { - sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); + sLog->outError(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID); continue; } MapEntry const* mapEntry = sMapStore.LookupEntry(at.target_mapId); if (!mapEntry) { - sLog->outErrorDb("Area trigger (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Trigger_ID, at.target_mapId); + sLog->outError(LOG_FILTER_SQL, "Area trigger (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Trigger_ID, at.target_mapId); continue; } if (at.target_X == 0 && at.target_Y == 0 && at.target_Z == 0) { - sLog->outErrorDb("Area trigger (ID:%u) target coordinates not provided.", Trigger_ID); + sLog->outError(LOG_FILTER_SQL, "Area trigger (ID:%u) target coordinates not provided.", Trigger_ID); continue; } @@ -5951,8 +5951,8 @@ void ObjectMgr::LoadAreaTriggerTeleports() } while (result->NextRow()); - sLog->outString(">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadAccessRequirements() @@ -5965,8 +5965,8 @@ void ObjectMgr::LoadAccessRequirements() QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement"); if (!result) { - sLog->outString(">> Loaded 0 access requirement definitions. DB table `access_requirement` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 access requirement definitions. DB table `access_requirement` is empty."); + return; } @@ -5998,7 +5998,7 @@ void ObjectMgr::LoadAccessRequirements() ItemTemplate const* pProto = GetItemTemplate(ar.item); if (!pProto) { - sLog->outError("Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item, mapid, difficulty); + sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item, mapid, difficulty); ar.item = 0; } } @@ -6008,7 +6008,7 @@ void ObjectMgr::LoadAccessRequirements() ItemTemplate const* pProto = GetItemTemplate(ar.item2); if (!pProto) { - sLog->outError("Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item2, mapid, difficulty); + sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item2, mapid, difficulty); ar.item2 = 0; } } @@ -6017,7 +6017,7 @@ void ObjectMgr::LoadAccessRequirements() { if (!GetQuestTemplate(ar.quest_A)) { - sLog->outErrorDb("Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_A, mapid, difficulty); + sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_A, mapid, difficulty); ar.quest_A = 0; } } @@ -6026,7 +6026,7 @@ void ObjectMgr::LoadAccessRequirements() { if (!GetQuestTemplate(ar.quest_H)) { - sLog->outErrorDb("Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_H, mapid, difficulty); + sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_H, mapid, difficulty); ar.quest_H = 0; } } @@ -6035,7 +6035,7 @@ void ObjectMgr::LoadAccessRequirements() { if (!sAchievementStore.LookupEntry(ar.achievement)) { - sLog->outErrorDb("Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar.achievement, mapid, difficulty); + sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar.achievement, mapid, difficulty); ar.achievement = 0; } } @@ -6043,8 +6043,8 @@ void ObjectMgr::LoadAccessRequirements() _accessRequirementStore[requirement_ID] = ar; } while (result->NextRow()); - sLog->outString(">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } /* @@ -6158,7 +6158,7 @@ uint32 ObjectMgr::GenerateAuctionID() { if (_auctionId >= 0xFFFFFFFE) { - sLog->outError("Auctions ids overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_GENERAL, "Auctions ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return _auctionId++; @@ -6168,7 +6168,7 @@ uint64 ObjectMgr::GenerateEquipmentSetGuid() { if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL)) { - sLog->outError("EquipmentSet guid overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_GENERAL, "EquipmentSet guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return _equipmentSetGuid++; @@ -6178,7 +6178,7 @@ uint32 ObjectMgr::GenerateMailID() { if (_mailId >= 0xFFFFFFFE) { - sLog->outError("Mail ids overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_GENERAL, "Mail ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return _mailId++; @@ -6268,8 +6268,8 @@ void ObjectMgr::LoadGameObjectLocales() AddLocaleString(fields[i + (TOTAL_LOCALES - 1)].GetString(), LocaleConstant(i), data.CastBarCaption); } while (result->NextRow()); - sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); + } inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N) @@ -6277,7 +6277,7 @@ inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 if (sLockStore.LookupEntry(dataN)) return; - sLog->outErrorDb("Gameobject (Entry: %u GoType: %u) have data%d=%u but lock (Id: %u) not found.", + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but lock (Id: %u) not found.", goInfo->entry, goInfo->type, N, goInfo->door.lockId, goInfo->door.lockId); } @@ -6286,7 +6286,7 @@ inline void CheckGOLinkedTrapId(GameObjectTemplate const* goInfo, uint32 dataN, if (GameObjectTemplate const* trapInfo = sObjectMgr->GetGameObjectTemplate(dataN)) { if (trapInfo->type != GAMEOBJECT_TYPE_TRAP) - sLog->outErrorDb("Gameobject (Entry: %u GoType: %u) have data%d=%u but GO (Entry %u) have not GAMEOBJECT_TYPE_TRAP (%u) type.", + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but GO (Entry %u) have not GAMEOBJECT_TYPE_TRAP (%u) type.", goInfo->entry, goInfo->type, N, dataN, dataN, GAMEOBJECT_TYPE_TRAP); } } @@ -6296,7 +6296,7 @@ inline void CheckGOSpellId(GameObjectTemplate const* goInfo, uint32 dataN, uint3 if (sSpellMgr->GetSpellInfo(dataN)) return; - sLog->outErrorDb("Gameobject (Entry: %u GoType: %u) have data%d=%u but Spell (Entry %u) not exist.", + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but Spell (Entry %u) not exist.", goInfo->entry, goInfo->type, N, dataN, dataN); } @@ -6305,7 +6305,7 @@ inline void CheckAndFixGOChairHeightId(GameObjectTemplate const* goInfo, uint32 if (dataN <= (UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR)) return; - sLog->outErrorDb("Gameobject (Entry: %u GoType: %u) have data%d=%u but correct chair height in range 0..%i.", + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but correct chair height in range 0..%i.", goInfo->entry, goInfo->type, N, dataN, UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR); // prevent client and server unexpected work @@ -6318,7 +6318,7 @@ inline void CheckGONoDamageImmuneId(GameObjectTemplate* goTemplate, uint32 dataN if (dataN <= 1) return; - sLog->outErrorDb("Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) noDamageImmune field value.", goTemplate->entry, goTemplate->type, N, dataN); + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) noDamageImmune field value.", goTemplate->entry, goTemplate->type, N, dataN); } inline void CheckGOConsumable(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N) @@ -6327,7 +6327,7 @@ inline void CheckGOConsumable(GameObjectTemplate const* goInfo, uint32 dataN, ui if (dataN <= 1) return; - sLog->outErrorDb("Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) consumable field value.", + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) consumable field value.", goInfo->entry, goInfo->type, N, dataN); } @@ -6345,8 +6345,8 @@ void ObjectMgr::LoadGameObjectTemplate() if (!result) { - sLog->outString(">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty."); + return; } @@ -6430,7 +6430,7 @@ void ObjectMgr::LoadGameObjectTemplate() if (got.spellFocus.focusId) { if (!sSpellFocusObjectStore.LookupEntry(got.spellFocus.focusId)) - sLog->outErrorDb("GameObject (Entry: %u GoType: %u) have data0=%u but SpellFocus (Id: %u) not exist.", + sLog->outError(LOG_FILTER_SQL, "GameObject (Entry: %u GoType: %u) have data0=%u but SpellFocus (Id: %u) not exist.", entry, got.type, got.spellFocus.focusId, got.spellFocus.focusId); } @@ -6448,7 +6448,7 @@ void ObjectMgr::LoadGameObjectTemplate() if (got.goober.pageId) // pageId { if (!GetPageText(got.goober.pageId)) - sLog->outErrorDb("GameObject (Entry: %u GoType: %u) have data7=%u but PageText (Entry %u) not exist.", + sLog->outError(LOG_FILTER_SQL, "GameObject (Entry: %u GoType: %u) have data7=%u but PageText (Entry %u) not exist.", entry, got.type, got.goober.pageId, got.goober.pageId); } CheckGONoDamageImmuneId(&got, got.goober.noDamageImmune, 11); @@ -6473,7 +6473,7 @@ void ObjectMgr::LoadGameObjectTemplate() if (got.moTransport.taxiPathId) { if (got.moTransport.taxiPathId >= sTaxiPathNodesByPath.size() || sTaxiPathNodesByPath[got.moTransport.taxiPathId].empty()) - sLog->outErrorDb("GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.", + sLog->outError(LOG_FILTER_SQL, "GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.", entry, got.type, got.moTransport.taxiPathId, got.moTransport.taxiPathId); } break; @@ -6515,8 +6515,8 @@ void ObjectMgr::LoadGameObjectTemplate() } while (result->NextRow()); - sLog->outString(">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadExplorationBaseXP() @@ -6527,8 +6527,8 @@ void ObjectMgr::LoadExplorationBaseXP() if (!result) { - sLog->outErrorDb(">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty."); + return; } @@ -6544,8 +6544,8 @@ void ObjectMgr::LoadExplorationBaseXP() } while (result->NextRow()); - sLog->outString(">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } uint32 ObjectMgr::GetBaseXP(uint8 level) @@ -6568,8 +6568,8 @@ void ObjectMgr::LoadPetNames() if (!result) { - sLog->outString(">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!"); + return; } @@ -6589,8 +6589,8 @@ void ObjectMgr::LoadPetNames() } while (result->NextRow()); - sLog->outString(">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadPetNumber() @@ -6604,8 +6604,8 @@ void ObjectMgr::LoadPetNumber() _hiPetNumber = fields[0].GetUInt32()+1; } - sLog->outString(">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime)); + } std::string ObjectMgr::GeneratePetName(uint32 entry) @@ -6638,8 +6638,8 @@ void ObjectMgr::LoadCorpses() PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSES)); if (!result) { - sLog->outString(">> Loaded 0 corpses. DB table `corpse` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 corpses. DB table `corpse` is empty."); + return; } @@ -6651,7 +6651,7 @@ void ObjectMgr::LoadCorpses() CorpseType type = CorpseType(fields[13].GetUInt8()); if (type >= MAX_CORPSE_TYPE) { - sLog->outError("Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type); + sLog->outError(LOG_FILTER_GENERAL, "Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type); continue; } @@ -6667,8 +6667,8 @@ void ObjectMgr::LoadCorpses() } while (result->NextRow()); - sLog->outString(">> Loaded %u corpses in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u corpses in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadReputationRewardRate() @@ -6682,8 +6682,8 @@ void ObjectMgr::LoadReputationRewardRate() if (!result) { - sLog->outErrorDb(">> Loaded `reputation_reward_rate`, table is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded `reputation_reward_rate`, table is empty!"); + return; } @@ -6702,25 +6702,25 @@ void ObjectMgr::LoadReputationRewardRate() FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); if (!factionEntry) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_reward_rate`", factionId); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_reward_rate`", factionId); continue; } if (repRate.quest_rate < 0.0f) { - sLog->outErrorDb("Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.quest_rate, factionId); + sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.quest_rate, factionId); continue; } if (repRate.creature_rate < 0.0f) { - sLog->outErrorDb("Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creature_rate, factionId); + sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creature_rate, factionId); continue; } if (repRate.spell_rate < 0.0f) { - sLog->outErrorDb("Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spell_rate, factionId); + sLog->outError(LOG_FILTER_SQL, "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spell_rate, factionId); continue; } @@ -6730,8 +6730,8 @@ void ObjectMgr::LoadReputationRewardRate() } while (result->NextRow()); - sLog->outString(">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadReputationOnKill() @@ -6751,8 +6751,8 @@ void ObjectMgr::LoadReputationOnKill() if (!result) { - sLog->outErrorDb(">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty."); + return; } @@ -6775,7 +6775,7 @@ void ObjectMgr::LoadReputationOnKill() if (!GetCreatureTemplate(creature_id)) { - sLog->outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id); + sLog->outError(LOG_FILTER_SQL, "Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id); continue; } @@ -6784,7 +6784,7 @@ void ObjectMgr::LoadReputationOnKill() FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.RepFaction1); if (!factionEntry1) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction1); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction1); continue; } } @@ -6794,7 +6794,7 @@ void ObjectMgr::LoadReputationOnKill() FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.RepFaction2); if (!factionEntry2) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction2); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction2); continue; } } @@ -6804,8 +6804,8 @@ void ObjectMgr::LoadReputationOnKill() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadReputationSpilloverTemplate() @@ -6819,8 +6819,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate() if (!result) { - sLog->outString(">> Loaded `reputation_spillover_template`, table is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded `reputation_spillover_template`, table is empty."); + return; } @@ -6849,13 +6849,13 @@ void ObjectMgr::LoadReputationSpilloverTemplate() if (!factionEntry) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", factionId); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", factionId); continue; } if (factionEntry->team == 0) { - sLog->outErrorDb("Faction (faction.dbc) %u in `reputation_spillover_template` does not belong to any team, skipping", factionId); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u in `reputation_spillover_template` does not belong to any team, skipping", factionId); continue; } @@ -6867,19 +6867,19 @@ void ObjectMgr::LoadReputationSpilloverTemplate() if (!factionSpillover) { - sLog->outErrorDb("Spillover faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template` for faction %u, skipping", repTemplate.faction[i], factionId); + sLog->outError(LOG_FILTER_SQL, "Spillover faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template` for faction %u, skipping", repTemplate.faction[i], factionId); continue; } if (factionSpillover->reputationListID < 0) { - sLog->outErrorDb("Spillover faction (faction.dbc) %u for faction %u in `reputation_spillover_template` can not be listed for client, and then useless, skipping", repTemplate.faction[i], factionId); + sLog->outError(LOG_FILTER_SQL, "Spillover faction (faction.dbc) %u for faction %u in `reputation_spillover_template` can not be listed for client, and then useless, skipping", repTemplate.faction[i], factionId); continue; } if (repTemplate.faction_rank[i] >= MAX_REPUTATION_RANK) { - sLog->outErrorDb("Rank %u used in `reputation_spillover_template` for spillover faction %u is not valid, skipping", repTemplate.faction_rank[i], repTemplate.faction[i]); + sLog->outError(LOG_FILTER_SQL, "Rank %u used in `reputation_spillover_template` for spillover faction %u is not valid, skipping", repTemplate.faction_rank[i], repTemplate.faction[i]); continue; } } @@ -6888,25 +6888,25 @@ void ObjectMgr::LoadReputationSpilloverTemplate() FactionEntry const* factionEntry0 = sFactionStore.LookupEntry(repTemplate.faction[0]); if (repTemplate.faction[0] && !factionEntry0) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[0]); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[0]); continue; } FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repTemplate.faction[1]); if (repTemplate.faction[1] && !factionEntry1) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[1]); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[1]); continue; } FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repTemplate.faction[2]); if (repTemplate.faction[2] && !factionEntry2) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[2]); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[2]); continue; } FactionEntry const* factionEntry3 = sFactionStore.LookupEntry(repTemplate.faction[3]); if (repTemplate.faction[3] && !factionEntry3) { - sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]); + sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]); continue; } @@ -6916,8 +6916,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate() } while (result->NextRow()); - sLog->outString(">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadPointsOfInterest() @@ -6933,8 +6933,8 @@ void ObjectMgr::LoadPointsOfInterest() if (!result) { - sLog->outErrorDb(">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty."); + return; } @@ -6954,7 +6954,7 @@ void ObjectMgr::LoadPointsOfInterest() if (!Trinity::IsValidMapCoord(POI.x, POI.y)) { - sLog->outErrorDb("Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.", point_id, POI.x, POI.y); + sLog->outError(LOG_FILTER_SQL, "Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.", point_id, POI.x, POI.y); continue; } @@ -6963,8 +6963,8 @@ void ObjectMgr::LoadPointsOfInterest() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadQuestPOI() @@ -6980,8 +6980,8 @@ void ObjectMgr::LoadQuestPOI() if (!result) { - sLog->outErrorDb(">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty."); + return; } @@ -7035,8 +7035,8 @@ void ObjectMgr::LoadQuestPOI() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadNPCSpellClickSpells() @@ -7049,8 +7049,8 @@ void ObjectMgr::LoadNPCSpellClickSpells() if (!result) { - sLog->outErrorDb(">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty."); + return; } @@ -7064,7 +7064,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() CreatureTemplate const* cInfo = GetCreatureTemplate(npc_entry); if (!cInfo) { - sLog->outErrorDb("Table npc_spellclick_spells references unknown creature_template %u. Skipping entry.", npc_entry); + sLog->outError(LOG_FILTER_SQL, "Table npc_spellclick_spells references unknown creature_template %u. Skipping entry.", npc_entry); continue; } @@ -7072,13 +7072,13 @@ void ObjectMgr::LoadNPCSpellClickSpells() SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spellid); if (!spellinfo) { - sLog->outErrorDb("Table npc_spellclick_spells references unknown spellid %u. Skipping entry.", spellid); + sLog->outError(LOG_FILTER_SQL, "Table npc_spellclick_spells references unknown spellid %u. Skipping entry.", spellid); continue; } uint8 userType = fields[3].GetUInt16(); if (userType >= SPELL_CLICK_USER_MAX) - sLog->outErrorDb("Table npc_spellclick_spells references unknown user type %u. Skipping entry.", uint32(userType)); + sLog->outError(LOG_FILTER_SQL, "Table npc_spellclick_spells references unknown user type %u. Skipping entry.", uint32(userType)); uint8 castFlags = fields[2].GetUInt8(); SpellClickInfo info; @@ -7098,13 +7098,13 @@ void ObjectMgr::LoadNPCSpellClickSpells() { if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && _spellClickInfoStore.find(itr->second.Entry) == _spellClickInfoStore.end()) { - sLog->outErrorDb("npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry); + sLog->outError(LOG_FILTER_SQL, "npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry); const_cast(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_SPELLCLICK; } } - sLog->outString(">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::DeleteCreatureData(uint32 guid) @@ -7153,8 +7153,8 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, if (!result) { - sLog->outErrorDb(">> Loaded 0 quest relations from `%s`, table is empty.", table.c_str()); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quest relations from `%s`, table is empty.", table.c_str()); + return; } @@ -7170,7 +7170,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, if (_questTemplates.find(quest) == _questTemplates.end()) { - sLog->outErrorDb("Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id); + sLog->outError(LOG_FILTER_SQL, "Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id); continue; } @@ -7182,8 +7182,8 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadGameobjectQuestRelations() @@ -7194,9 +7194,9 @@ void ObjectMgr::LoadGameobjectQuestRelations() { GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first); if (!goInfo) - sLog->outErrorDb("Table `gameobject_questrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject_questrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER) - sLog->outErrorDb("Table `gameobject_questrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject_questrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); } } @@ -7208,9 +7208,9 @@ void ObjectMgr::LoadGameobjectInvolvedRelations() { GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first); if (!goInfo) - sLog->outErrorDb("Table `gameobject_involvedrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject_involvedrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER) - sLog->outErrorDb("Table `gameobject_involvedrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `gameobject_involvedrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); } } @@ -7222,9 +7222,9 @@ void ObjectMgr::LoadCreatureQuestRelations() { CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first); if (!cInfo) - sLog->outErrorDb("Table `creature_questrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `creature_questrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER)) - sLog->outErrorDb("Table `creature_questrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `creature_questrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); } } @@ -7236,9 +7236,9 @@ void ObjectMgr::LoadCreatureInvolvedRelations() { CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first); if (!cInfo) - sLog->outErrorDb("Table `creature_involvedrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `creature_involvedrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER)) - sLog->outErrorDb("Table `creature_involvedrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); + sLog->outError(LOG_FILTER_SQL, "Table `creature_involvedrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); } } @@ -7252,8 +7252,8 @@ void ObjectMgr::LoadReservedPlayersNames() if (!result) { - sLog->outString(">> Loaded 0 reserved player names. DB table `reserved_name` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!"); + return; } @@ -7268,7 +7268,7 @@ void ObjectMgr::LoadReservedPlayersNames() std::wstring wstr; if (!Utf8toWStr (name, wstr)) { - sLog->outError("Table `reserved_name` have invalid name: %s", name.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Table `reserved_name` have invalid name: %s", name.c_str()); continue; } @@ -7279,8 +7279,8 @@ void ObjectMgr::LoadReservedPlayersNames() } while (result->NextRow()); - sLog->outString(">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool ObjectMgr::IsReservedName(const std::string& name) const @@ -7433,8 +7433,8 @@ void ObjectMgr::LoadGameObjectForQuests() if (sObjectMgr->GetGameObjectTemplates()->empty()) { - sLog->outString(">> Loaded 0 GameObjects for quests"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 GameObjects for quests"); + return; } @@ -7482,8 +7482,8 @@ void ObjectMgr::LoadGameObjectForQuests() } } - sLog->outString(">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max_value) @@ -7497,7 +7497,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max { if (end_value >= start_value) { - sLog->outErrorDb("Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value); + sLog->outError(LOG_FILTER_SQL, "Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value); return false; } @@ -7510,7 +7510,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max { if (start_value >= end_value) { - sLog->outErrorDb("Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value); + sLog->outError(LOG_FILTER_SQL, "Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value); return false; } } @@ -7529,10 +7529,10 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max if (!result) { if (min_value == MIN_TRINITY_STRING_ID) // error only in case internal strings - sLog->outErrorDb(">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.", table); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.", table); else - sLog->outString(">> Loaded 0 string templates. DB table `%s` is empty.", table); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 string templates. DB table `%s` is empty.", table); + return false; } @@ -7546,12 +7546,12 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max if (entry == 0) { - sLog->outErrorDb("Table `%s` contain reserved entry 0, ignored.", table); + sLog->outError(LOG_FILTER_SQL, "Table `%s` contain reserved entry 0, ignored.", table); continue; } else if (entry < start_value || entry >= end_value) { - sLog->outErrorDb("Table `%s` contain entry %i out of allowed range (%d - %d), ignored.", table, entry, min_value, max_value); + sLog->outError(LOG_FILTER_SQL, "Table `%s` contain entry %i out of allowed range (%d - %d), ignored.", table, entry, min_value, max_value); continue; } @@ -7559,7 +7559,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max if (!data.Content.empty()) { - sLog->outErrorDb("Table `%s` contain data for already loaded entry %i (from another table?), ignored.", table, entry); + sLog->outError(LOG_FILTER_SQL, "Table `%s` contain data for already loaded entry %i (from another table?), ignored.", table, entry); continue; } @@ -7571,11 +7571,11 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max } while (result->NextRow()); if (min_value == MIN_TRINITY_STRING_ID) - sLog->outString(">> Loaded %u Trinity strings from table %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Trinity strings from table %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outString(">> Loaded %u string templates from %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u string templates from %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + return true; } @@ -7590,9 +7590,9 @@ const char *ObjectMgr::GetTrinityString(int32 entry, LocaleConstant locale_idx) } if (entry > 0) - sLog->outErrorDb("Entry %i not found in `trinity_string` table.", entry); + sLog->outError(LOG_FILTER_SQL, "Entry %i not found in `trinity_string` table.", entry); else - sLog->outErrorDb("Trinity string entry %i not found in DB.", entry); + sLog->outError(LOG_FILTER_SQL, "Trinity string entry %i not found in DB.", entry); return ""; } @@ -7606,8 +7606,8 @@ void ObjectMgr::LoadFishingBaseSkillLevel() if (!result) { - sLog->outErrorDb(">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty."); + return; } @@ -7622,7 +7622,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel() AreaTableEntry const* fArea = GetAreaEntryByAreaID(entry); if (!fArea) { - sLog->outErrorDb("AreaId %u defined in `skill_fishing_base_level` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "AreaId %u defined in `skill_fishing_base_level` does not exist", entry); continue; } @@ -7631,8 +7631,8 @@ void ObjectMgr::LoadFishingBaseSkillLevel() } while (result->NextRow()); - sLog->outString(">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& names) @@ -7715,8 +7715,8 @@ void ObjectMgr::LoadGameTele() if (!result) { - sLog->outErrorDb(">> Loaded 0 GameTeleports. DB table `game_tele` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!"); + return; } @@ -7739,13 +7739,13 @@ void ObjectMgr::LoadGameTele() if (!MapManager::IsValidMapCoord(gt.mapId, gt.position_x, gt.position_y, gt.position_z, gt.orientation)) { - sLog->outErrorDb("Wrong position for id %u (name: %s) in `game_tele` table, ignoring.", id, gt.name.c_str()); + sLog->outError(LOG_FILTER_SQL, "Wrong position for id %u (name: %s) in `game_tele` table, ignoring.", id, gt.name.c_str()); continue; } if (!Utf8toWStr(gt.name, gt.wnameLow)) { - sLog->outErrorDb("Wrong UTF8 name for id %u in `game_tele` table, ignoring.", id); + sLog->outError(LOG_FILTER_SQL, "Wrong UTF8 name for id %u in `game_tele` table, ignoring.", id); continue; } @@ -7757,8 +7757,8 @@ void ObjectMgr::LoadGameTele() } while (result->NextRow()); - sLog->outString(">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } GameTele const* ObjectMgr::GetGameTele(const std::string& name) const @@ -7856,8 +7856,8 @@ void ObjectMgr::LoadMailLevelRewards() if (!result) { - sLog->outErrorDb(">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty."); + return; } @@ -7874,25 +7874,25 @@ void ObjectMgr::LoadMailLevelRewards() if (level > MAX_LEVEL) { - sLog->outErrorDb("Table `mail_level_reward` have data for level %u that more supported by client (%u), ignoring.", level, MAX_LEVEL); + sLog->outError(LOG_FILTER_SQL, "Table `mail_level_reward` have data for level %u that more supported by client (%u), ignoring.", level, MAX_LEVEL); continue; } if (!(raceMask & RACEMASK_ALL_PLAYABLE)) { - sLog->outErrorDb("Table `mail_level_reward` have raceMask (%u) for level %u that not include any player races, ignoring.", raceMask, level); + sLog->outError(LOG_FILTER_SQL, "Table `mail_level_reward` have raceMask (%u) for level %u that not include any player races, ignoring.", raceMask, level); continue; } if (!sMailTemplateStore.LookupEntry(mailTemplateId)) { - sLog->outErrorDb("Table `mail_level_reward` have invalid mailTemplateId (%u) for level %u that invalid not include any player races, ignoring.", mailTemplateId, level); + sLog->outError(LOG_FILTER_SQL, "Table `mail_level_reward` have invalid mailTemplateId (%u) for level %u that invalid not include any player races, ignoring.", mailTemplateId, level); continue; } if (!GetCreatureTemplate(senderEntry)) { - sLog->outErrorDb("Table `mail_level_reward` have not existed sender creature entry (%u) for level %u that invalid not include any player races, ignoring.", senderEntry, level); + sLog->outError(LOG_FILTER_SQL, "Table `mail_level_reward` have not existed sender creature entry (%u) for level %u that invalid not include any player races, ignoring.", senderEntry, level); continue; } @@ -7902,8 +7902,8 @@ void ObjectMgr::LoadMailLevelRewards() } while (result->NextRow()); - sLog->outString(">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, uint32 reqSkill, uint32 reqSkillValue, uint32 reqLevel) @@ -7914,32 +7914,32 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, CreatureTemplate const* cInfo = GetCreatureTemplate(entry); if (!cInfo) { - sLog->outErrorDb("Table `npc_trainer` contains an entry for a non-existing creature template (Entry: %u), ignoring", entry); + sLog->outError(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry for a non-existing creature template (Entry: %u), ignoring", entry); return; } if (!(cInfo->npcflag & UNIT_NPC_FLAG_TRAINER)) { - sLog->outErrorDb("Table `npc_trainer` contains an entry for a creature template (Entry: %u) without trainer flag, ignoring", entry); + sLog->outError(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry for a creature template (Entry: %u) without trainer flag, ignoring", entry); return; } SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spell); if (!spellinfo) { - sLog->outErrorDb("Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u), ignoring", entry, spell); + sLog->outError(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u), ignoring", entry, spell); return; } if (!SpellMgr::IsSpellValid(spellinfo)) { - sLog->outErrorDb("Table `npc_trainer` contains an entry (Entry: %u) for a broken spell (Spell: %u), ignoring", entry, spell); + sLog->outError(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry (Entry: %u) for a broken spell (Spell: %u), ignoring", entry, spell); return; } if (GetTalentSpellCost(spell)) { - sLog->outErrorDb("Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u) which is a talent, ignoring", entry, spell); + sLog->outError(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u) which is a talent, ignoring", entry, spell); return; } @@ -7967,7 +7967,7 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, if (spellinfo->Effects[i].TargetA.GetTarget() != 0 && spellinfo->Effects[i].TargetA.GetTarget() != TARGET_UNIT_TARGET_ALLY && spellinfo->Effects[i].TargetA.GetTarget() != TARGET_UNIT_TARGET_ANY && spellinfo->Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER) { - sLog->outErrorDb("Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry); + sLog->outError(LOG_FILTER_SQL, "Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry); continue; } @@ -7999,8 +7999,8 @@ void ObjectMgr::LoadTrainerSpell() if (!result) { - sLog->outErrorDb(">> Loaded 0 Trainers. DB table `npc_trainer` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!"); + return; } @@ -8023,8 +8023,8 @@ void ObjectMgr::LoadTrainerSpell() } while (result->NextRow()); - sLog->outString(">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set *skip_vendors) @@ -8080,8 +8080,8 @@ void ObjectMgr::LoadVendors() QueryResult result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor ORDER BY entry, slot ASC"); if (!result) { - sLog->outString(); - sLog->outErrorDb(">> Loaded 0 Vendors. DB table `npc_vendor` is empty!"); + + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!"); return; } @@ -8114,8 +8114,8 @@ void ObjectMgr::LoadVendors() } while (result->NextRow()); - sLog->outString(">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadGossipMenu() @@ -8128,8 +8128,8 @@ void ObjectMgr::LoadGossipMenu() if (!result) { - sLog->outErrorDb(">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!"); + return; } @@ -8146,7 +8146,7 @@ void ObjectMgr::LoadGossipMenu() if (!GetGossipText(gMenu.text_id)) { - sLog->outErrorDb("Table gossip_menu entry %u are using non-existing text_id %u", gMenu.entry, gMenu.text_id); + sLog->outError(LOG_FILTER_SQL, "Table gossip_menu entry %u are using non-existing text_id %u", gMenu.entry, gMenu.text_id); continue; } @@ -8156,8 +8156,8 @@ void ObjectMgr::LoadGossipMenu() } while (result->NextRow()); - sLog->outString(">> Loaded %u gossip_menu entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u gossip_menu entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadGossipMenuItems() @@ -8175,8 +8175,8 @@ void ObjectMgr::LoadGossipMenuItems() if (!result) { - sLog->outErrorDb(">> Loaded 0 gossip_menu_option entries. DB table `gossip_menu_option` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gossip_menu_option entries. DB table `gossip_menu_option` is empty!"); + return; } @@ -8202,16 +8202,16 @@ void ObjectMgr::LoadGossipMenuItems() if (gMenuItem.OptionIcon >= GOSSIP_ICON_MAX) { - sLog->outErrorDb("Table gossip_menu_option for menu %u, id %u has unknown icon id %u. Replacing with GOSSIP_ICON_CHAT", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionIcon); + sLog->outError(LOG_FILTER_SQL, "Table gossip_menu_option for menu %u, id %u has unknown icon id %u. Replacing with GOSSIP_ICON_CHAT", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionIcon); gMenuItem.OptionIcon = GOSSIP_ICON_CHAT; } if (gMenuItem.OptionType >= GOSSIP_OPTION_MAX) - sLog->outErrorDb("Table gossip_menu_option for menu %u, id %u has unknown option id %u. Option will not be used", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionType); + sLog->outError(LOG_FILTER_SQL, "Table gossip_menu_option for menu %u, id %u has unknown option id %u. Option will not be used", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionType); if (gMenuItem.ActionPoiId && !GetPointOfInterest(gMenuItem.ActionPoiId)) { - sLog->outErrorDb("Table gossip_menu_option for menu %u, id %u use non-existing action_poi_id %u, ignoring", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.ActionPoiId); + sLog->outError(LOG_FILTER_SQL, "Table gossip_menu_option for menu %u, id %u use non-existing action_poi_id %u, ignoring", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.ActionPoiId); gMenuItem.ActionPoiId = 0; } @@ -8220,8 +8220,8 @@ void ObjectMgr::LoadGossipMenuItems() } while (result->NextRow()); - sLog->outString(">> Loaded %u gossip_menu_option entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u gossip_menu_option entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/) @@ -8273,7 +8273,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION); else - sLog->outErrorDb("Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry); return false; } @@ -8284,7 +8284,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION); else - sLog->outErrorDb("Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry); if (skip_vendors) skip_vendors->insert(vendor_entry); @@ -8297,7 +8297,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id); else - sLog->outErrorDb("Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id); + sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id); return false; } @@ -8306,7 +8306,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost); else - sLog->outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry); return false; } @@ -8315,7 +8315,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount); else - sLog->outErrorDb("Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry); return false; } else if (maxcount == 0 && incrtime > 0) @@ -8323,7 +8323,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0"); else - sLog->outErrorDb("Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry); return false; } @@ -8336,7 +8336,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost); else - sLog->outErrorDb("Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry); return false; } @@ -8345,7 +8345,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (player) ChatHandler(player).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS); else - sLog->outErrorDb("Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry); + sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry); return false; } @@ -8384,8 +8384,8 @@ void ObjectMgr::LoadScriptNames() if (!result) { - sLog->outString(); - sLog->outErrorDb(">> Loaded empty set of Script Names!"); + + sLog->outError(LOG_FILTER_SQL, ">> Loaded empty set of Script Names!"); return; } @@ -8399,8 +8399,8 @@ void ObjectMgr::LoadScriptNames() while (result->NextRow()); std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end()); - sLog->outString(">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } uint32 ObjectMgr::GetScriptId(const char *name) @@ -8432,7 +8432,7 @@ void ObjectMgr::CheckScripts(ScriptsType type, std::set& ids) case SCRIPT_COMMAND_TALK: { if (!GetTrinityStringLocale (itrM->second.Talk.TextID)) - sLog->outErrorDb("Table `%s` references invalid text id %u from `db_script_string`, script id: %u.", GetScriptsTableNameByType(type).c_str(), itrM->second.Talk.TextID, itrMM->first); + sLog->outError(LOG_FILTER_SQL, "Table `%s` references invalid text id %u from `db_script_string`, script id: %u.", GetScriptsTableNameByType(type).c_str(), itrM->second.Talk.TextID, itrMM->first); if (ids.find(itrM->second.Talk.TextID) != ids.end()) ids.erase(itrM->second.Talk.TextID); @@ -8458,7 +8458,7 @@ void ObjectMgr::LoadDbScriptStrings() CheckScripts(ScriptsType(type), ids); for (std::set::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) - sLog->outErrorDb("Table `db_script_string` has unused string id %u", *itr); + sLog->outError(LOG_FILTER_SQL, "Table `db_script_string` has unused string id %u", *itr); } bool LoadTrinityStrings(const char* table, int32 start_value, int32 end_value) @@ -8467,7 +8467,7 @@ bool LoadTrinityStrings(const char* table, int32 start_value, int32 end_value) // start/end reversed for negative values if (start_value > MAX_DB_SCRIPT_STRING_ID || end_value >= start_value) { - sLog->outErrorDb("Table '%s' load attempted with range (%d - %d) reserved by Trinity, strings not loaded.", table, start_value, end_value+1); + sLog->outError(LOG_FILTER_SQL, "Table '%s' load attempted with range (%d - %d) reserved by Trinity, strings not loaded.", table, start_value, end_value+1); return false; } @@ -8503,8 +8503,8 @@ void ObjectMgr::LoadCreatureClassLevelStats() if (!result) { - sLog->outString(">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty."); + return; } @@ -8525,13 +8525,13 @@ void ObjectMgr::LoadCreatureClassLevelStats() stats.BaseArmor = fields[6].GetInt16(); if (!Class || ((1 << (Class - 1)) & CLASSMASK_ALL_CREATURES) == 0) - sLog->outErrorDb("Creature base stats for level %u has invalid class %u", Level, Class); + sLog->outError(LOG_FILTER_SQL, "Creature base stats for level %u has invalid class %u", Level, Class); for (uint8 i = 0; i < MAX_CREATURE_BASE_HP; ++i) { if (stats.BaseHealth[i] < 1) { - sLog->outErrorDb("Creature base stats for class %u, level %u has invalid zero base HP[%u] - set to 1", Class, Level, i); + sLog->outError(LOG_FILTER_SQL, "Creature base stats for class %u, level %u has invalid zero base HP[%u] - set to 1", Class, Level, i); stats.BaseHealth[i] = 1; } } @@ -8548,12 +8548,12 @@ void ObjectMgr::LoadCreatureClassLevelStats() for (uint16 lvl = itr->second.minlevel; lvl <= itr->second.maxlevel; ++lvl) { if (_creatureBaseStatsStore.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == _creatureBaseStatsStore.end()) - sLog->outErrorDb("Missing base stats for creature class %u level %u", itr->second.unit_class, lvl); + sLog->outError(LOG_FILTER_SQL, "Missing base stats for creature class %u level %u", itr->second.unit_class, lvl); } } - sLog->outString(">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadFactionChangeAchievements() @@ -8564,8 +8564,8 @@ void ObjectMgr::LoadFactionChangeAchievements() if (!result) { - sLog->outErrorDb(">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty."); + return; } @@ -8579,9 +8579,9 @@ void ObjectMgr::LoadFactionChangeAchievements() uint32 horde = fields[1].GetUInt32(); if (!sAchievementStore.LookupEntry(alliance)) - sLog->outErrorDb("Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", alliance); + sLog->outError(LOG_FILTER_SQL, "Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", alliance); else if (!sAchievementStore.LookupEntry(horde)) - sLog->outErrorDb("Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde); + sLog->outError(LOG_FILTER_SQL, "Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde); else FactionChange_Achievements[alliance] = horde; @@ -8589,8 +8589,8 @@ void ObjectMgr::LoadFactionChangeAchievements() } while (result->NextRow()); - sLog->outString(">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadFactionChangeItems() @@ -8601,8 +8601,8 @@ void ObjectMgr::LoadFactionChangeItems() if (!result) { - sLog->outString(">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty."); + return; } @@ -8616,9 +8616,9 @@ void ObjectMgr::LoadFactionChangeItems() uint32 horde = fields[1].GetUInt32(); if (!GetItemTemplate(alliance)) - sLog->outErrorDb("Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", alliance); + sLog->outError(LOG_FILTER_SQL, "Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", alliance); else if (!GetItemTemplate(horde)) - sLog->outErrorDb("Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", horde); + sLog->outError(LOG_FILTER_SQL, "Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", horde); else FactionChange_Items[alliance] = horde; @@ -8626,8 +8626,8 @@ void ObjectMgr::LoadFactionChangeItems() } while (result->NextRow()); - sLog->outString(">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadFactionChangeSpells() @@ -8638,8 +8638,8 @@ void ObjectMgr::LoadFactionChangeSpells() if (!result) { - sLog->outErrorDb(">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty."); + return; } @@ -8653,9 +8653,9 @@ void ObjectMgr::LoadFactionChangeSpells() uint32 horde = fields[1].GetUInt32(); if (!sSpellMgr->GetSpellInfo(alliance)) - sLog->outErrorDb("Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", alliance); + sLog->outError(LOG_FILTER_SQL, "Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", alliance); else if (!sSpellMgr->GetSpellInfo(horde)) - sLog->outErrorDb("Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", horde); + sLog->outError(LOG_FILTER_SQL, "Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", horde); else FactionChange_Spells[alliance] = horde; @@ -8663,8 +8663,8 @@ void ObjectMgr::LoadFactionChangeSpells() } while (result->NextRow()); - sLog->outString(">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void ObjectMgr::LoadFactionChangeReputations() @@ -8675,8 +8675,8 @@ void ObjectMgr::LoadFactionChangeReputations() if (!result) { - sLog->outString(">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty."); + return; } @@ -8690,9 +8690,9 @@ void ObjectMgr::LoadFactionChangeReputations() uint32 horde = fields[1].GetUInt32(); if (!sFactionStore.LookupEntry(alliance)) - sLog->outErrorDb("Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", alliance); + sLog->outError(LOG_FILTER_SQL, "Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", alliance); else if (!sFactionStore.LookupEntry(horde)) - sLog->outErrorDb("Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde); + sLog->outError(LOG_FILTER_SQL, "Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde); else FactionChange_Reputation[alliance] = horde; @@ -8700,8 +8700,8 @@ void ObjectMgr::LoadFactionChangeReputations() } while (result->NextRow()); - sLog->outString(">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry) diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index fcc0315055e..59bb2fb536f 100755 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -787,13 +787,13 @@ class ObjectMgr void LoadQuests(); void LoadQuestRelations() { - sLog->outString("Loading GO Start Quest Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GO Start Quest Data..."); LoadGameobjectQuestRelations(); - sLog->outString("Loading GO End Quest Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GO End Quest Data..."); LoadGameobjectInvolvedRelations(); - sLog->outString("Loading Creature Start Quest Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Start Quest Data..."); LoadCreatureQuestRelations(); - sLog->outString("Loading Creature End Quest Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature End Quest Data..."); LoadCreatureInvolvedRelations(); } void LoadGameobjectQuestRelations(); diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h index cf649f8d896..ad888b26dd3 100755 --- a/src/server/game/Grids/GridStates.h +++ b/src/server/game/Grids/GridStates.h @@ -32,7 +32,7 @@ class GridState { if (i_Magic != MAGIC_TESTVAL) { - sLog->outError("!!! GridState: Magic value gone !!!"); + sLog->outError(LOG_FILTER_GENERAL, "!!! GridState: Magic value gone !!!"); return false; } return true; diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 519a53ad184..3b2d59dd998 100755 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -94,7 +94,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager { T* obj = new T; uint32 guid = *i_guid; - //sLog->outString("DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid); + //sLog->outInfo(LOG_FILTER_GENERAL, "DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid); if (!obj->LoadFromDB(guid, map)) { delete obj; diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 428f0d25a8b..5ace6da2f44 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -73,7 +73,7 @@ Group::~Group() sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Group::~Group: battleground group being deleted."); if (m_bgGroup->GetBgRaid(ALLIANCE) == this) m_bgGroup->SetBgRaid(ALLIANCE, NULL); else if (m_bgGroup->GetBgRaid(HORDE) == this) m_bgGroup->SetBgRaid(HORDE, NULL); - else sLog->outError("Group::~Group: battleground group is not linked to the correct battleground."); + else sLog->outError(LOG_FILTER_GENERAL, "Group::~Group: battleground group is not linked to the correct battleground."); } Rolls::iterator itr; while (!RollId.empty()) @@ -2087,7 +2087,7 @@ void Group::BroadcastGroupUpdate(void) { pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE); - sLog->outStaticDebug("-- Forced group value update for '%s'", pp->GetName()); + sLog->outDebug(LOG_FILTER_GENERAL, "-- Forced group value update for '%s'", pp->GetName()); } } } diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index f372f08c941..acec13ab2c3 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -46,7 +46,7 @@ uint32 GroupMgr::GenerateNewGroupDbStoreId() if (newStorageId == NextGroupDbStoreId) { - sLog->outError("Group storage ID overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_GENERAL, "Group storage ID overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } @@ -84,7 +84,7 @@ uint32 GroupMgr::GenerateGroupId() { if (NextGroupId >= 0xFFFFFFFE) { - sLog->outError("Group guid overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_GENERAL, "Group guid overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return NextGroupId++; @@ -125,8 +125,8 @@ void GroupMgr::LoadGroups() ", g.icon7, g.icon8, g.groupType, g.difficulty, g.raiddifficulty, g.guid, lfg.dungeon, lfg.state FROM groups g LEFT JOIN lfg_data lfg ON lfg.guid = g.guid ORDER BY g.guid ASC"); if (!result) { - sLog->outString(">> Loaded 0 group definitions. DB table `groups` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 group definitions. DB table `groups` is empty!"); + return; } @@ -151,11 +151,11 @@ void GroupMgr::LoadGroups() } while (result->NextRow()); - sLog->outString(">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } - sLog->outString("Loading Group members..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Group members..."); { uint32 oldMSTime = getMSTime(); @@ -169,8 +169,8 @@ void GroupMgr::LoadGroups() QueryResult result = CharacterDatabase.Query("SELECT guid, memberGuid, memberFlags, subgroup, roles FROM group_member ORDER BY guid"); if (!result) { - sLog->outString(">> Loaded 0 group members. DB table `group_member` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 group members. DB table `group_member` is empty!"); + return; } @@ -184,17 +184,17 @@ void GroupMgr::LoadGroups() if (group) group->LoadMemberFromDB(fields[1].GetUInt32(), fields[2].GetUInt8(), fields[3].GetUInt8(), fields[4].GetUInt8()); else - sLog->outError("GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32()); + sLog->outError(LOG_FILTER_GENERAL, "GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32()); ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } - sLog->outString("Loading Group instance saves..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Group instance saves..."); { uint32 oldMSTime = getMSTime(); // 0 1 2 3 4 5 6 @@ -203,8 +203,8 @@ void GroupMgr::LoadGroups() "LEFT JOIN character_instance ci LEFT JOIN groups g ON g.leaderGuid = ci.guid ON ci.instance = gi.instance AND ci.permanent = 1 GROUP BY gi.instance ORDER BY gi.guid"); if (!result) { - sLog->outString(">> Loaded 0 group-instance saves. DB table `group_instance` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 group-instance saves. DB table `group_instance` is empty!"); + return; } @@ -218,14 +218,14 @@ void GroupMgr::LoadGroups() MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt16()); if (!mapEntry || !mapEntry->IsDungeon()) { - sLog->outErrorDb("Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16()); + sLog->outError(LOG_FILTER_SQL, "Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16()); continue; } uint32 diff = fields[4].GetUInt8(); if (diff >= uint32(mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY)) { - sLog->outErrorDb("Wrong dungeon difficulty use in group_instance table: %d", diff + 1); + sLog->outError(LOG_FILTER_SQL, "Wrong dungeon difficulty use in group_instance table: %d", diff + 1); diff = 0; // default for both difficaly types } @@ -235,7 +235,7 @@ void GroupMgr::LoadGroups() } while (result->NextRow()); - sLog->outString(">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 0811ba06137..4df77f874f3 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -51,7 +51,7 @@ void Guild::SendCommandResult(WorldSession* session, GuildCommandType type, Guil data << uint32(errCode); session->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)"); } void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode) @@ -60,10 +60,9 @@ void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode data << uint32(errCode); session->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)"); } -/////////////////////////////////////////////////////////////////////////////// // LogHolder Guild::LogHolder::~LogHolder() { @@ -337,21 +336,21 @@ bool Guild::BankTab::LoadItemFromDB(Field* fields) uint32 itemEntry = fields[15].GetUInt32(); if (slotId >= GUILD_BANK_MAX_SLOTS) { - sLog->outError("Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry); + sLog->outError(LOG_FILTER_GUILD, "Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry); return false; } ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry); if (!proto) { - sLog->outError("Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry); + sLog->outError(LOG_FILTER_GUILD, "Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry); return false; } Item* pItem = NewItemOrBag(proto); if (!pItem->LoadFromDB(itemGuid, 0, fields, itemEntry)) { - sLog->outError("Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry); + sLog->outError(LOG_FILTER_GUILD, "Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry); PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_NONEXISTENT_GUILD_BANK_ITEM); stmt->setUInt32(0, m_guildId); @@ -599,7 +598,7 @@ bool Guild::Member::LoadFromDB(Field* fields) if (!m_zoneId) { - sLog->outError("Player (GUID: %u) has broken zone-data", GUID_LOPART(m_guid)); + sLog->outError(LOG_FILTER_GUILD, "Player (GUID: %u) has broken zone-data", GUID_LOPART(m_guid)); m_zoneId = Player::GetZoneIdFromDB(m_guid); } return true; @@ -610,12 +609,12 @@ bool Guild::Member::CheckStats() const { if (m_level < 1) { - sLog->outError("Player (GUID: %u) has a broken data in field `characters`.`level`, deleting him from guild!", GUID_LOPART(m_guid)); + sLog->outError(LOG_FILTER_GUILD, "Player (GUID: %u) has a broken data in field `characters`.`level`, deleting him from guild!", GUID_LOPART(m_guid)); return false; } if (m_class < CLASS_WARRIOR || m_class >= MAX_CLASSES) { - sLog->outError("Player (GUID: %u) has a broken data in field `characters`.`class`, deleting him from guild!", GUID_LOPART(m_guid)); + sLog->outError(LOG_FILTER_GUILD, "Player (GUID: %u) has a broken data in field `characters`.`class`, deleting him from guild!", GUID_LOPART(m_guid)); return false; } return true; @@ -1220,7 +1219,7 @@ void Guild::HandleRoster(WorldSession* session /*= NULL*/) session->SendPacket(&data); else BroadcastPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_ROSTER)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_ROSTER)"); } void Guild::HandleQuery(WorldSession* session) @@ -1241,7 +1240,7 @@ void Guild::HandleQuery(WorldSession* session) data << uint32(_GetRanksSize()); // Amount of ranks session->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)"); } void Guild::HandleSetMOTD(WorldSession* session, const std::string& motd) @@ -1450,7 +1449,7 @@ void Guild::HandleInviteMember(WorldSession* session, const std::string& name) data << m_name; pInvitee->GetSession()->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INVITE)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_INVITE)"); } void Guild::HandleAcceptMember(WorldSession* session) @@ -1723,7 +1722,7 @@ void Guild::SendInfo(WorldSession* session) const data << m_accountsNumber; // Number of accounts session->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INFO)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_INFO)"); } void Guild::SendEventLog(WorldSession* session) const @@ -1773,7 +1772,7 @@ void Guild::SendBankTabsInfo(WorldSession* session) const data << uint8(0); // Do not send tab content session->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } void Guild::SendBankTabText(WorldSession* session, uint8 tabId) const @@ -1913,13 +1912,13 @@ bool Guild::LoadBankEventLogFromDB(Field* fields) { if (!isMoneyTab) { - sLog->outError("GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId); + sLog->outError(LOG_FILTER_GUILD, "GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId); return false; } } else if (isMoneyTab) { - sLog->outError("GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id); + sLog->outError(LOG_FILTER_GUILD, "GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id); return false; } pLog->LoadEvent(new BankEventLogEntry( @@ -1942,7 +1941,7 @@ bool Guild::LoadBankTabFromDB(Field* fields) uint8 tabId = fields[1].GetUInt8(); if (tabId >= _GetPurchasedTabsSize()) { - sLog->outError("Invalid tab (tabId: %u) in guild bank, skipped.", tabId); + sLog->outError(LOG_FILTER_GUILD, "Invalid tab (tabId: %u) in guild bank, skipped.", tabId); return false; } return m_bankTabs[tabId]->LoadFromDB(fields); @@ -1953,7 +1952,7 @@ bool Guild::LoadBankItemFromDB(Field* fields) uint8 tabId = fields[12].GetUInt8(); if (tabId >= _GetPurchasedTabsSize()) { - sLog->outError("Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.", + sLog->outError(LOG_FILTER_GUILD, "Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.", fields[14].GetUInt32(), fields[15].GetUInt32()); return false; } @@ -1971,7 +1970,7 @@ bool Guild::Validate() bool broken_ranks = false; if (_GetRanksSize() < GUILD_RANKS_MIN_COUNT || _GetRanksSize() > GUILD_RANKS_MAX_COUNT) { - sLog->outError("Guild %u has invalid number of ranks, creating new...", m_id); + sLog->outError(LOG_FILTER_GUILD, "Guild %u has invalid number of ranks, creating new...", m_id); broken_ranks = true; } else @@ -1981,7 +1980,7 @@ bool Guild::Validate() RankInfo* rankInfo = GetRankInfo(rankId); if (rankInfo->GetId() != rankId) { - sLog->outError("Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId); + sLog->outError(LOG_FILTER_GUILD, "Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId); broken_ranks = true; } } @@ -2532,7 +2531,7 @@ void Guild::_MoveItems(MoveItemData* pSrc, MoveItemData* pDest, uint32 splitedAm /* if (pItemSrc->GetCount() == 0) { - sLog->outCrash("Guild::SwapItems: Player %s(GUIDLow: %u) tried to move item %u from tab %u slot %u to tab %u slot %u, but item %u has a stack of zero!", + sLog->outFatal(LOG_FILTER_GENERAL, "Guild::SwapItems: Player %s(GUIDLow: %u) tried to move item %u from tab %u slot %u to tab %u slot %u, but item %u has a stack of zero!", player->GetName(), player->GetGUIDLow(), pItemSrc->GetEntry(), tabId, slotId, destTabId, destSlotId, pItemSrc->GetEntry()); //return; // Commented out for now, uncomment when it's verified that this causes a crash!! } @@ -2642,7 +2641,7 @@ void Guild::_SendBankContent(WorldSession* session, uint8 tabId) const session->SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } } @@ -2657,7 +2656,7 @@ void Guild::_SendBankMoneyUpdate(WorldSession* session) const data << uint8(0); // No items BroadcastPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } void Guild::_SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const @@ -2717,7 +2716,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const player->GetSession()->SendPacket(&data); } - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } } @@ -2741,5 +2740,5 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* par BroadcastPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GUILD_EVENT"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent SMSG_GUILD_EVENT"); } diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 106be2a605d..35a217200ad 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -43,7 +43,7 @@ uint32 GuildMgr::GenerateGuildId() { if (NextGuildId >= 0xFFFFFFFE) { - sLog->outError("Guild ids overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_GUILD, "Guild ids overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } return NextGuildId++; @@ -93,7 +93,7 @@ Guild* GuildMgr::GetGuildByLeader(uint64 guid) const void GuildMgr::LoadGuilds() { // 1. Load all guilds - sLog->outString("Loading guilds definitions..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading guilds definitions..."); { uint32 oldMSTime = getMSTime(); @@ -105,8 +105,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild definitions. DB table `guild` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild definitions. DB table `guild` is empty."); + return; } else @@ -128,13 +128,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 2. Load all guild ranks - sLog->outString("Loading guild ranks..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading guild ranks..."); { uint32 oldMSTime = getMSTime(); @@ -146,8 +146,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild ranks. DB table `guild_rank` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild ranks. DB table `guild_rank` is empty."); + } else { @@ -164,13 +164,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 3. Load all guild members - sLog->outString("Loading guild members..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading guild members..."); { uint32 oldMSTime = getMSTime(); @@ -189,8 +189,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild members. DB table `guild_member` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild members. DB table `guild_member` is empty."); + } else { @@ -208,13 +208,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 4. Load all guild bank tab rights - sLog->outString("Loading bank tab rights..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading bank tab rights..."); { uint32 oldMSTime = getMSTime(); @@ -226,8 +226,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty."); + } else { @@ -244,13 +244,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 5. Load all event logs - sLog->outString("Loading guild event logs..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading guild event logs..."); { uint32 oldMSTime = getMSTime(); @@ -261,8 +261,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty."); + } else { @@ -279,13 +279,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 6. Load all bank event logs - sLog->outString("Loading guild bank event logs..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading guild bank event logs..."); { uint32 oldMSTime = getMSTime(); @@ -297,8 +297,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty."); + } else { @@ -315,13 +315,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 7. Load all guild bank tabs - sLog->outString("Loading guild bank tabs..."); + sLog->outInfo(LOG_FILTER_GUILD, "Loading guild bank tabs..."); { uint32 oldMSTime = getMSTime(); @@ -333,8 +333,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty."); + } else { @@ -351,13 +351,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 8. Fill all guild bank tabs - sLog->outString("Filling bank tabs with items..."); + sLog->outInfo(LOG_FILTER_GUILD, "Filling bank tabs with items..."); { uint32 oldMSTime = getMSTime(); @@ -371,8 +371,8 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outString(">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty."); + } else { @@ -389,13 +389,13 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outString(">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } // 9. Validate loaded guild data - sLog->outString("Validating data of loaded guilds..."); + sLog->outInfo(LOG_FILTER_GUILD, "Validating data of loaded guilds..."); { uint32 oldMSTime = getMSTime(); @@ -412,7 +412,7 @@ void GuildMgr::LoadGuilds() } } - sLog->outString(">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GUILD, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } } diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp index ef537cb6198..f86dacbc55e 100755 --- a/src/server/game/Handlers/AddonHandler.cpp +++ b/src/server/game/Handlers/AddonHandler.cpp @@ -135,7 +135,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket* Source, WorldPacket* Target) } else { - sLog->outError("Addon packet uncompress error :("); + sLog->outError(LOG_FILTER_NETWORKIO, "Addon packet uncompress error :("); return false; } return true; diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index 7585af7eb60..10a130536c9 100755 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -262,7 +262,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) AH->deposit = deposit; AH->auctionHouseEntry = auctionHouseEntry; - sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId()); + sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId()); sAuctionMgr->AddAItem(item); auctionHouse->AddAuction(AH); @@ -285,7 +285,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) Item* newItem = item->CloneItem(finalCount, _player); if (!newItem) { - sLog->outError("CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry()); + sLog->outError(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry()); SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR); return; } @@ -308,7 +308,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) AH->deposit = deposit; AH->auctionHouseEntry = auctionHouseEntry; - sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId()); + sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId()); sAuctionMgr->AddAItem(newItem); auctionHouse->AddAuction(AH); @@ -530,7 +530,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) } else { - sLog->outError("Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->item_guidlow); + sLog->outError(LOG_FILTER_NETWORKIO, "Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->item_guidlow); SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR); return; } @@ -539,7 +539,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) { SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR); //this code isn't possible ... maybe there should be assert - sLog->outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId); + sLog->outError(LOG_FILTER_NETWORKIO, "CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId); return; } @@ -571,7 +571,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) recv_data >> outbiddedCount; if (recv_data.size() != (16 + outbiddedCount * 4)) { - sLog->outError("Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(), (16 + outbiddedCount * 4)); + sLog->outError(LOG_FILTER_NETWORKIO, "Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(), (16 + outbiddedCount * 4)); outbiddedCount = 0; } diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index a0c5268136b..2e0bbf786a9 100755 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -86,7 +86,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) if (!sBattlemasterListStore.LookupEntry(bgTypeId_)) { - sLog->outError("Battleground: invalid bgtype (%u) received. possible cheater? player guid %u", bgTypeId_, _player->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "Battleground: invalid bgtype (%u) received. possible cheater? player guid %u", bgTypeId_, _player->GetGUIDLow()); return; } @@ -366,13 +366,13 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) GroupQueueInfo ginfo; if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo)) { - sLog->outError("BattlegroundHandler: itrplayerstatus not found."); + sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: itrplayerstatus not found."); return; } // if action == 1, then instanceId is required if (!ginfo.IsInvitedToBGInstanceGUID && action == 1) { - sLog->outError("BattlegroundHandler: instance not found."); + sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: instance not found."); return; } @@ -383,7 +383,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId); if (!bg) { - sLog->outError("BattlegroundHandler: bg_template not found for type id %u.", bgTypeId); + sLog->outError(LOG_FILTER_NETWORKIO, "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId); return; } @@ -408,7 +408,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) //if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue if (_player->getLevel() > bg->GetMaxLevel()) { - sLog->outError("Battleground: Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!", + sLog->outError(LOG_FILTER_NETWORKIO, "Battleground: Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!", _player->GetName(), _player->GetGUIDLow(), _player->getLevel(), bg->GetMaxLevel(), bg->GetTypeID()); action = 0; } @@ -478,7 +478,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId); break; default: - sLog->outError("Battleground port: unknown action %u", action); + sLog->outError(LOG_FILTER_NETWORKIO, "Battleground port: unknown action %u", action); break; } } @@ -644,7 +644,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) arenatype = ARENA_TYPE_5v5; break; default: - sLog->outError("Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot); + sLog->outError(LOG_FILTER_NETWORKIO, "Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot); return; } @@ -652,7 +652,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(BATTLEGROUND_AA); if (!bg) { - sLog->outError("Battleground: template bg (all arenas) not found"); + sLog->outError(LOG_FILTER_NETWORKIO, "Battleground: template bg (all arenas) not found"); return; } diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index 298c742fc3a..e83f0f55a44 100755 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -73,7 +73,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) } else { - sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Invite found with id [" UI64FMTD "]", *it); + sLog->outError(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_CALENDAR: No Invite found with id [" UI64FMTD "]", *it); data << uint64(0); data << uint64(0); data << uint8(0); @@ -99,7 +99,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) } else { - sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Event found with id [" UI64FMTD "]", *it); + sLog->outError(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_CALENDAR: No Event found with id [" UI64FMTD "]", *it); data << uint64(0); data << uint8(0); data << uint32(0); @@ -251,7 +251,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData) if (inviteCount != 1 || invitee != guid) { - sLog->outError("HandleCalendarAddEvent: [" UI64FMTD + sLog->outError(LOG_FILTER_NETWORKIO, "HandleCalendarAddEvent: [" UI64FMTD "]: More than one invite (%d) or Invitee [" UI64FMTD "] differs", guid, inviteCount, invitee); return; @@ -643,7 +643,7 @@ void WorldSession::SendCalendarEvent(CalendarEvent const& calendarEvent, Calenda data << uint8(0) << uint8(0) << uint8(0) << uint8(0) << uint64(0) << uint32(0) << uint8(0); - sLog->outError("SendCalendarEvent: No Invite found with id [" UI64FMTD "]", *it); + sLog->outError(LOG_FILTER_NETWORKIO, "SendCalendarEvent: No Invite found with id [" UI64FMTD "]", *it); } } SendPacket(&data); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 29ee2b5cb41..df515f879f8 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -215,7 +215,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result) do { uint32 guidlow = (*result)[0].GetUInt32(); - sLog->outDetail("Loading char guid %u from account %u.", guidlow, GetAccountId()); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Loading char guid %u from account %u.", guidlow, GetAccountId()); if (Player::BuildEnumData(result, &data)) { _allowedCharsToLogin.insert(guidlow); @@ -293,7 +293,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) { data << (uint8)CHAR_CREATE_FAILED; SendPacket(&data); - sLog->outError("Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId()); return; } @@ -302,7 +302,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) { data << (uint8)CHAR_CREATE_FAILED; SendPacket(&data); - sLog->outError("Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId()); return; } @@ -310,7 +310,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) if (raceEntry->expansion > Expansion()) { data << (uint8)CHAR_CREATE_EXPANSION; - sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_); + sLog->outError(LOG_FILTER_NETWORKIO, "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_); SendPacket(&data); return; } @@ -319,7 +319,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) if (classEntry->expansion > Expansion()) { data << (uint8)CHAR_CREATE_EXPANSION_CLASS; - sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_); + sLog->outError(LOG_FILTER_NETWORKIO, "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_); SendPacket(&data); return; } @@ -348,7 +348,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) { data << (uint8)CHAR_NAME_NO_NAME; SendPacket(&data); - sLog->outError("Account:[%d] but tried to Create character with empty [name] ", GetAccountId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Account:[%d] but tried to Create character with empty [name] ", GetAccountId()); return; } @@ -658,8 +658,8 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte SendPacket(&data); std::string IP_str = GetRemoteAddress(); - sLog->outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow()); - sLog->outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow()); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow()); sScriptMgr->OnPlayerCreate(&newChar); sWorld->AddCharacterNameData(newChar.GetGUIDLow(), std::string(newChar.GetName()), newChar.getGender(), newChar.getRace(), newChar.getClass()); @@ -719,16 +719,16 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data) return; std::string IP_str = GetRemoteAddress(); - sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid)); - sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid)); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid)); sScriptMgr->OnPlayerDelete(guid); sWorld->DeleteCharaceterNameData(GUID_LOPART(guid)); - if (sLog->IsOutCharDump()) // optimize GetPlayerDump call + if (sLog->ShouldLog(LOG_FILTER_PLAYER, LOG_LEVEL_TRACE)) // optimize GetPlayerDump call { std::string dump; if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump)) - sLog->outCharDump(dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str()); + sLog->outTrace(LOG_FILTER_PLAYER, dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str()); } Player::DeleteFromDB(guid, GetAccountId()); @@ -742,20 +742,20 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data) { if (PlayerLoading() || GetPlayer() != NULL) { - sLog->outError("Player tryes to login again, AccountId = %d", GetAccountId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Player tryes to login again, AccountId = %d", GetAccountId()); return; } m_playerLoading = true; uint64 playerGuid = 0; - sLog->outStaticDebug("WORLD: Recvd Player Logon Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd Player Logon Message"); recv_data >> playerGuid; if (!CharCanLogin(GUID_LOPART(playerGuid))) { - sLog->outError("Account (%u) can't login with that character (%u).", GetAccountId(), GUID_LOPART(playerGuid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Account (%u) can't login with that character (%u).", GetAccountId(), GUID_LOPART(playerGuid)); KickPlayer(); return; } @@ -839,13 +839,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) data.put(0, linecount); SendPacket(&data); - sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_MOTD)"); // send server info if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1) chH.PSendSysMessage(_FULLVERSION); - sLog->outStaticDebug("WORLD: Sent server info"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent server info"); } //QueryResult* result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow()); @@ -868,7 +868,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) else { // remove wrong guild data - sLog->outError("Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId()); pCurrChar->SetInGuild(0); } } @@ -1006,7 +1006,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) SendNotification(LANG_GM_ON); std::string IP_str = GetRemoteAddress(); - sLog->outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d", + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d", GetAccountId(), IP_str.c_str(), pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->getLevel()); if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED)) @@ -1020,7 +1020,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data) { - sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_ATWAR"); uint32 repListID; uint8 flag; @@ -1034,7 +1034,7 @@ void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data) //I think this function is never used :/ I dunno, but i guess this opcode not exists void WorldSession::HandleSetFactionCheat(WorldPacket & /*recv_data*/) { - sLog->outError("WORLD SESSION: HandleSetFactionCheat, not expected call, please report."); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD SESSION: HandleSetFactionCheat, not expected call, please report."); GetPlayer()->GetReputationMgr().SendStates(); } @@ -1068,7 +1068,7 @@ void WorldSession::HandleTutorialReset(WorldPacket & /*recv_data*/) void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data) { - sLog->outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_WATCHED_FACTION"); uint32 fact; recv_data >> fact; GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact); @@ -1076,7 +1076,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data) void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data) { - sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_INACTIVE"); uint32 replistid; uint8 inactive; recv_data >> replistid >> inactive; @@ -1086,14 +1086,14 @@ void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data) void WorldSession::HandleShowingHelmOpcode(WorldPacket& recv_data) { - sLog->outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SHOWING_HELM for %s", _player->GetName()); recv_data.read_skip(); // unknown, bool? _player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM); } void WorldSession::HandleShowingCloakOpcode(WorldPacket& recv_data) { - sLog->outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SHOWING_CLOAK for %s", _player->GetName()); recv_data.read_skip(); // unknown, bool? _player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK); } @@ -1183,7 +1183,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult resu CharacterDatabase.Execute(stmt); - sLog->outChar("Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str()); + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str()); WorldPacket data(SMSG_CHAR_RENAME, 1+8+(newName.size()+1)); data << uint8(RESPONSE_SUCCESS); @@ -1450,7 +1450,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) if (result) { std::string oldname = result->Fetch()[0].GetString(); - sLog->outChar("Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str()); + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str()); } Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair); diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index 966eae598a6..880f2df86f7 100755 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -52,7 +52,7 @@ bool WorldSession::processChatmessageFurtherAfterSecurityChecks(std::string& msg if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && AccountMgr::IsPlayerAccount(GetSecurity()) && !ChatHandler(this).isValidChatMessage(msg.c_str())) { - sLog->outError("Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName(), + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), msg.c_str()); if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK)) KickPlayer(); @@ -73,7 +73,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) if (type >= MAX_CHAT_MSG_TYPE) { - sLog->outError("CHAT: Wrong message type received: %u", type); + sLog->outError(LOG_FILTER_NETWORKIO, "CHAT: Wrong message type received: %u", type); recv_data.rfinish(); return; } @@ -474,7 +474,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) } } break; default: - sLog->outError("CHAT: unknown message type %u, lang: %u", type, lang); + sLog->outError(LOG_FILTER_NETWORKIO, "CHAT: unknown message type %u, lang: %u", type, lang); break; } } diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index 6693cdfca27..78547d2d0f3 100755 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -80,7 +80,7 @@ void WorldSession::HandleSetSheathedOpcode(WorldPacket& recv_data) if (sheathed >= MAX_SHEATH_STATE) { - sLog->outError("Unknown sheath state %u ??", sheathed); + sLog->outError(LOG_FILTER_NETWORKIO, "Unknown sheath state %u ??", sheathed); return; } diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp index 8afd9f3b978..1b3f71c8cf1 100755 --- a/src/server/game/Handlers/DuelHandler.cpp +++ b/src/server/game/Handlers/DuelHandler.cpp @@ -42,8 +42,8 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) return; //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_DUEL_ACCEPTED"); - sLog->outStaticDebug("Player 1 is: %u (%s)", player->GetGUIDLow(), player->GetName()); - sLog->outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player 1 is: %u (%s)", player->GetGUIDLow(), player->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName()); time_t now = time(NULL); player->duel->startTimer = now; diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index e6473d0e7d9..e0ff3933c3a 100755 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -210,7 +210,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data) if (group->GetLeaderGUID() == GetPlayer()->GetGUID()) { - sLog->outError("HandleGroupAcceptOpcode: player %s(%d) tried to accept an invite to his own group", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandleGroupAcceptOpcode: player %s(%d) tried to accept an invite to his own group", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); return; } @@ -283,7 +283,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data) //can't uninvite yourself if (guid == GetPlayer()->GetGUID()) { - sLog->outError("WorldSession::HandleGroupUninviteGuidOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleGroupUninviteGuidOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); return; } @@ -333,7 +333,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data) // can't uninvite yourself if (GetPlayer()->GetName() == membername) { - sLog->outError("WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); return; } @@ -983,7 +983,7 @@ void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recv_data) if (!GetPlayer()) // needed because STATUS_AUTHED { if (passOnLoot != 0) - sLog->outError("CMSG_OPT_OUT_OF_LOOT value<>0 for not-loaded character!"); + sLog->outError(LOG_FILTER_NETWORKIO, "CMSG_OPT_OUT_OF_LOOT value<>0 for not-loaded character!"); return; } diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index e0ba190d2fc..260220bb8d5 100755 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -284,7 +284,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) uint32 item; recv_data >> item; - sLog->outDetail("STORAGE: Item Query = %u", item); + sLog->outInfo(LOG_FILTER_NETWORKIO, "STORAGE: Item Query = %u", item); ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (pProto) @@ -444,7 +444,7 @@ void WorldSession::HandleReadItem(WorldPacket & recv_data) uint8 bag, slot; recv_data >> bag >> slot; - //sLog->outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot); + //sLog->outInfo(LOG_FILTER_NETWORKIO, "STORAGE: Read bag = %u, slot = %u", bag, slot); Item* pItem = _player->GetItemByPos(bag, slot); if (pItem && pItem->GetTemplate()->PageText) @@ -455,12 +455,12 @@ void WorldSession::HandleReadItem(WorldPacket & recv_data) if (msg == EQUIP_ERR_OK) { data.Initialize (SMSG_READ_ITEM_OK, 8); - sLog->outDetail("STORAGE: Item page sent"); + sLog->outInfo(LOG_FILTER_NETWORKIO, "STORAGE: Item page sent"); } else { data.Initialize(SMSG_READ_ITEM_FAILED, 8); - sLog->outDetail("STORAGE: Unable to read item"); + sLog->outInfo(LOG_FILTER_NETWORKIO, "STORAGE: Unable to read item"); _player->SendEquipError(msg, pItem, NULL); } data << pItem->GetGUID(); @@ -479,7 +479,7 @@ void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recv_data) recv_data >> itemid >> guid; - sLog->outDetail("Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u", + sLog->outInfo(LOG_FILTER_NETWORKIO, "Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u", itemid, GUID_LOPART(guid), GUID_ENPART(guid), GUID_HIPART(guid)); } @@ -561,7 +561,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) Item* pNewItem = pItem->CloneItem(count, _player); if (!pNewItem) { - sLog->outError("WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count); _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, itemguid, 0); return; } @@ -880,7 +880,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket) // next slot ++slot; - sLog->outDetail("PLAYER: Buy bank bag slot, slot number = %u", slot); + sLog->outInfo(LOG_FILTER_NETWORKIO, "PLAYER: Buy bank bag slot, slot number = %u", slot); BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot); diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index a98453e45c3..2cf27140720 100755 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -89,13 +89,13 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data) if (!rc) { - sLog->outDetail("Player %u is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", + sLog->outInfo(LOG_FILTER_NETWORKIO, "Player %u is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", player->GetGUIDLow(), receiver.c_str(), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2); player->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_NOT_FOUND); return; } - sLog->outDetail("Player %u is sending mail to %s (GUID: %u) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", player->GetGUIDLow(), receiver.c_str(), GUID_LOPART(rc), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Player %u is sending mail to %s (GUID: %u) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", player->GetGUIDLow(), receiver.c_str(), GUID_LOPART(rc), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2); if (player->GetGUID() == rc) { @@ -713,7 +713,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data) bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender); bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK); - sLog->outDetail("HandleMailCreateTextItem mailid=%u", mailId); + sLog->outInfo(LOG_FILTER_NETWORKIO, "HandleMailCreateTextItem mailid=%u", mailId); ItemPosCountVec dest; uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, bodyItem, false); diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 11f0857ca2b..02b0ef9fc05 100755 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -963,7 +963,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data) if (decompressedSize > 0xFFFF) { recv_data.rfinish(); // unnneded warning spam in this case - sLog->outError("UAD: Account data packet too big, size %u", decompressedSize); + sLog->outError(LOG_FILTER_NETWORKIO, "UAD: Account data packet too big, size %u", decompressedSize); return; } @@ -974,7 +974,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data) if (uncompress(const_cast(dest.contents()), &realSize, const_cast(recv_data.contents() + recv_data.rpos()), recv_data.size() - recv_data.rpos()) != Z_OK) { recv_data.rfinish(); // unnneded warning spam in this case - sLog->outError("UAD: Failed to decompress account data"); + sLog->outError(LOG_FILTER_NETWORKIO, "UAD: Failed to decompress account data"); return; } @@ -1039,10 +1039,10 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) uint32 action = ACTION_BUTTON_ACTION(packetData); uint8 type = ACTION_BUTTON_TYPE(packetData); - sLog->outDetail("BUTTON: %u ACTION: %u TYPE: %u", button, action, type); + sLog->outInfo(LOG_FILTER_NETWORKIO, "BUTTON: %u ACTION: %u TYPE: %u", button, action, type); if (!packetData) { - sLog->outDetail("MISC: Remove action from button %u", button); + sLog->outInfo(LOG_FILTER_NETWORKIO, "MISC: Remove action from button %u", button); GetPlayer()->removeActionButton(button); } else @@ -1051,19 +1051,19 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) { case ACTION_BUTTON_MACRO: case ACTION_BUTTON_CMACRO: - sLog->outDetail("MISC: Added Macro %u into button %u", action, button); + sLog->outInfo(LOG_FILTER_NETWORKIO, "MISC: Added Macro %u into button %u", action, button); break; case ACTION_BUTTON_EQSET: - sLog->outDetail("MISC: Added EquipmentSet %u into button %u", action, button); + sLog->outInfo(LOG_FILTER_NETWORKIO, "MISC: Added EquipmentSet %u into button %u", action, button); break; case ACTION_BUTTON_SPELL: - sLog->outDetail("MISC: Added Spell %u into button %u", action, button); + sLog->outInfo(LOG_FILTER_NETWORKIO, "MISC: Added Spell %u into button %u", action, button); break; case ACTION_BUTTON_ITEM: - sLog->outDetail("MISC: Added Item %u into button %u", action, button); + sLog->outInfo(LOG_FILTER_NETWORKIO, "MISC: Added Item %u into button %u", action, button); break; default: - sLog->outError("MISC: Unknown action button type %u for action %u into button %u for player %s (GUID: %u)", type, action, button, _player->GetName(), _player->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "MISC: Unknown action button type %u for action %u into button %u for player %s (GUID: %u)", type, action, button, _player->GetName(), _player->GetGUIDLow()); return; } GetPlayer()->addActionButton(button, action, type); @@ -1170,7 +1170,7 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data) if (!GetPlayer()) // ignore until not logged (check needed because STATUS_AUTHED) { if (ActionBar != 0) - sLog->outError("WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(ActionBar)); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(ActionBar)); return; } @@ -1418,7 +1418,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data) if (WorldObject* target = _player->GetViewpoint()) _player->SetSeer(target); else - sLog->outError("Player %s requests non-existing seer " UI64FMTD, _player->GetName(), _player->GetUInt64Value(PLAYER_FARSIGHT)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s requests non-existing seer " UI64FMTD, _player->GetName(), _player->GetUInt64Value(PLAYER_FARSIGHT)); break; default: sLog->outDebug(LOG_FILTER_NETWORKIO, "Unhandled mode in CMSG_FAR_SIGHT: %u", apply); @@ -1489,7 +1489,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) if (mode >= MAX_DUNGEON_DIFFICULTY) { - sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); return; } @@ -1500,7 +1500,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) Map* map = _player->FindMap(); if (map && map->IsDungeon()) { - sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", _player->GetName(), _player->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", _player->GetName(), _player->GetGUIDLow()); return; } @@ -1520,7 +1520,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) if (groupGuy->GetMap()->IsNonRaidDungeon()) { - sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), groupGuy->GetName(), groupGuy->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), groupGuy->GetName(), groupGuy->GetGUIDLow()); return; } } @@ -1546,7 +1546,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) if (mode >= MAX_RAID_DIFFICULTY) { - sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode); return; } @@ -1554,7 +1554,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) Map* map = _player->FindMap(); if (map && map->IsDungeon()) { - sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); return; } @@ -1577,7 +1577,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) if (groupGuy->GetMap()->IsRaid()) { - sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); return; } } @@ -1708,7 +1708,7 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket) if (!_player->HasPendingBind()) { - sLog->outDetail("InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!", _player->GetName(), _player->GetGUIDLow()); + sLog->outInfo(LOG_FILTER_NETWORKIO, "InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!", _player->GetName(), _player->GetGUIDLow()); return; } diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index ff9030f04d5..27b1f2eca3f 100755 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -66,7 +66,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() Map* oldMap = GetPlayer()->GetMap(); if (GetPlayer()->IsInWorld()) { - sLog->outError("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId()); oldMap->RemovePlayerFromMap(GetPlayer(), false); } @@ -76,7 +76,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() // while the player is in transit, for example the map may get full if (!newMap || !newMap->CanEnter(GetPlayer())) { - sLog->outError("Map %d could not be created for player %d, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "Map %d could not be created for player %d, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUIDLow()); GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()); return; } @@ -89,7 +89,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->SendInitialPacketsBeforeAddToMap(); if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer())) { - sLog->outError("WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.GetMapId()); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.GetMapId()); GetPlayer()->ResetMap(); GetPlayer()->SetMap(oldMap); GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()); @@ -196,8 +196,8 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) uint32 flags, time; recv_data >> flags >> time; - sLog->outStaticDebug("Guid " UI64FMTD, guid); - sLog->outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Guid " UI64FMTD, guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Flags %u, time %u", flags, time/IN_MILLISECONDS); Player* plMover = _player->m_mover->ToPlayer(); @@ -455,7 +455,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; force_move_type = MOVE_FLIGHT_BACK; break; case CMSG_FORCE_PITCH_RATE_CHANGE_ACK: move_type = MOVE_PITCH_RATE; force_move_type = MOVE_PITCH_RATE; break; default: - sLog->outError("WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode); return; } @@ -472,13 +472,13 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) { if (_player->GetSpeed(move_type) > newspeed) // must be greater - just correct { - sLog->outError("%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value", + sLog->outError(LOG_FILTER_NETWORKIO, "%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value", move_type_name[move_type], _player->GetName(), _player->GetSpeed(move_type), newspeed); _player->SetSpeed(move_type, _player->GetSpeedRate(move_type), true); } else // must be lesser - cheating { - sLog->outBasic("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)", + sLog->outDebug(LOG_FILTER_GENERAL, "Player %s from account id %u kicked for incorrect speed (must be %f instead %f)", _player->GetName(), _player->GetSession()->GetAccountId(), _player->GetSpeed(move_type), newspeed); _player->GetSession()->KickPlayer(); } @@ -495,7 +495,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if (GetPlayer()->IsInWorld()) { if (_player->m_mover->GetGUID() != guid) - sLog->outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID()); } } diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 321c0ada247..3501b3bc068 100755 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -69,17 +69,17 @@ void WorldSession::HandlePetAction(WorldPacket & recv_data) // used also for charmed creature Unit* pet= ObjectAccessor::GetUnit(*_player, guid1); - sLog->outDetail("HandlePetAction: Pet %u - flag: %u, spellid: %u, target: %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2))); + sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet %u - flag: %u, spellid: %u, target: %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2))); if (!pet) { - sLog->outError("HandlePetAction: Pet (GUID: %u) doesn't exist for player '%s'", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) doesn't exist for player '%s'", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName()); return; } if (pet != GetPlayer()->GetFirstControlled()) { - sLog->outError("HandlePetAction: Pet (GUID: %u) does not belong to player '%s'", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) does not belong to player '%s'", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName()); return; } @@ -121,13 +121,13 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recv_data) if (!pet) { - sLog->outError("HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid))); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid))); return; } if (pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm()) { - sLog->outError("HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); return; } @@ -142,7 +142,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError("WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", guid1, guid2, spellid, flag, pet->GetGUIDLow(), pet->GetTypeId()); return; } @@ -263,7 +263,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid } break; default: - sLog->outError("WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); } break; case ACT_REACTION: // 0x6 @@ -292,7 +292,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) { - sLog->outError("WORLD: unknown PET spell id %i", spellid); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellid); return; } @@ -397,13 +397,13 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid break; } default: - sLog->outError("WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); } } void WorldSession::HandlePetNameQuery(WorldPacket & recv_data) { - sLog->outDetail("HandlePetNameQuery. CMSG_PET_NAME_QUERY"); + sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY"); uint32 petnumber; uint64 petguid; @@ -454,7 +454,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) { if (!GetPlayer()->isGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE)) { - sLog->outStaticDebug("Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid)); return false; } } @@ -463,7 +463,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) { if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER)) { - sLog->outStaticDebug("Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid)); return false; } } @@ -472,7 +472,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) void WorldSession::HandlePetSetAction(WorldPacket & recv_data) { - sLog->outDetail("HandlePetSetAction. CMSG_PET_SET_ACTION"); + sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION"); uint64 petguid; uint8 count; @@ -483,14 +483,14 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data) if (!pet || pet != _player->GetFirstControlled()) { - sLog->outError("HandlePetSetAction: Unknown pet (GUID: %u) or pet owner (GUID: %u)", GUID_LOPART(petguid), _player->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetSetAction: Unknown pet (GUID: %u) or pet owner (GUID: %u)", GUID_LOPART(petguid), _player->GetGUIDLow()); return; } CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError("WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); return; } @@ -552,7 +552,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data) uint32 spell_id = UNIT_ACTION_BUTTON_ACTION(data[i]); uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]); - sLog->outDetail("Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position[i], spell_id, uint32(act_state)); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position[i], spell_id, uint32(act_state)); //if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add if (!((act_state == ACT_ENABLED || act_state == ACT_DISABLED || act_state == ACT_PASSIVE) && spell_id && !pet->HasSpell(spell_id))) @@ -588,7 +588,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data) void WorldSession::HandlePetRename(WorldPacket & recv_data) { - sLog->outDetail("HandlePetRename. CMSG_PET_RENAME"); + sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME"); uint64 petguid; uint8 isdeclined; @@ -675,7 +675,7 @@ void WorldSession::HandlePetAbandon(WorldPacket & recv_data) { uint64 guid; recv_data >> guid; //pet guid - sLog->outDetail("HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid)); + sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid)); if (!_player->IsInWorld()) return; @@ -701,7 +701,7 @@ void WorldSession::HandlePetAbandon(WorldPacket & recv_data) void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) { - sLog->outDetail("CMSG_PET_SPELL_AUTOCAST"); + sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_PET_SPELL_AUTOCAST"); uint64 guid; uint32 spellid; uint8 state; //1 for on, 0 for off @@ -717,7 +717,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) if (!pet || (pet != _player->GetGuardianPet() && pet != _player->GetCharm())) { - sLog->outError("HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); return; } @@ -729,7 +729,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError("WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); return; } @@ -762,14 +762,14 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) if (!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm())) { - sLog->outError("HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); return; } SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError("WORLD: unknown PET spell id %i", spellId); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellId); return; } diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index cb3bac0e443..90af03113bf 100755 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -479,7 +479,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) if (!result) { - sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionGuid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "Petition %u is not found for player %u %s", GUID_LOPART(petitionGuid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName()); return; } @@ -771,7 +771,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) } else { - sLog->outError("Player %s (guid: %u) tried to turn in petition (guid: %u) that is not present in the database", _player->GetName(), _player->GetGUIDLow(), GUID_LOPART(petitionGuid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (guid: %u) tried to turn in petition (guid: %u) that is not present in the database", _player->GetName(), _player->GetGUIDLow(), GUID_LOPART(petitionGuid)); return; } diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp index 4fb90bed10b..d3f51867831 100755 --- a/src/server/game/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -70,7 +70,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data) recv_data >> guid; // This is disable by default to prevent lots of console spam - // sLog->outString("HandleNameQueryOpcode %u", guid); + // sLog->outInfo(LOG_FILTER_NETWORKIO, "HandleNameQueryOpcode %u", guid); SendNameQueryOpcode(guid); } diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index d13c2fb0956..7492edb35fe 100755 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -43,7 +43,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data) Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT); if (!questgiver) { - sLog->outDetail("Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid)); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid)); return; } @@ -71,7 +71,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data) break; } default: - sLog->outError("QuestGiver called for unexpected type %u", questgiver->GetTypeId()); + sLog->outError(LOG_FILTER_NETWORKIO, "QuestGiver called for unexpected type %u", questgiver->GetTypeId()); break; } @@ -289,7 +289,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data) if (reward >= QUEST_REWARD_CHOICES_COUNT) { - sLog->outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (probably packet hacking)", _player->GetName(), _player->GetGUIDLow(), reward); + sLog->outError(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (probably packet hacking)", _player->GetName(), _player->GetGUIDLow(), reward); return; } @@ -308,7 +308,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data) if ((!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE) || (_player->GetQuestStatus(questId) != QUEST_STATUS_COMPLETE && !quest->IsAutoComplete())) { - sLog->outError("HACK ALERT: Player %s (guid: %u) is trying to complete quest (id: %u) but he has no right to do it!", + sLog->outError(LOG_FILTER_NETWORKIO, "HACK ALERT: Player %s (guid: %u) is trying to complete quest (id: %u) but he has no right to do it!", _player->GetName(), _player->GetGUIDLow(), questId); return; } @@ -435,7 +435,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data) _player->RemoveActiveQuest(questId); _player->GetAchievementMgr().RemoveTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, questId); - sLog->outDetail("Player %u abandoned quest %u", _player->GetGUIDLow(), questId); + sLog->outInfo(LOG_FILTER_NETWORKIO, "Player %u abandoned quest %u", _player->GetGUIDLow(), questId); } _player->SetQuestSlot(slot, 0); @@ -500,7 +500,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data) { if (!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE) { - sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to complete quest [entry: %u] without being in possession of the quest!", + sLog->outError(LOG_FILTER_NETWORKIO, "Possible hacking attempt: Player %s [guid: %u] tried to complete quest [entry: %u] without being in possession of the quest!", _player->GetName(), _player->GetGUIDLow(), questId); return; } @@ -634,7 +634,7 @@ uint32 WorldSession::getDialogStatus(Player* player, Object* questgiver, uint32 } default: //its imposible, but check ^) - sLog->outError("Warning: GetDialogStatus called for unexpected type %u", questgiver->GetTypeId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Warning: GetDialogStatus called for unexpected type %u", questgiver->GetTypeId()); return DIALOG_STATUS_NONE; } diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index c02bb43a353..d7bb10e8ba3 100755 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -187,7 +187,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) recvPacket >> bagIndex >> slot; - sLog->outDetail("bagIndex: %u, slot: %u", bagIndex, slot); + sLog->outInfo(LOG_FILTER_NETWORKIO, "bagIndex: %u, slot: %u", bagIndex, slot); Item* item = pUser->GetItemByPos(bagIndex, slot); if (!item) @@ -207,7 +207,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) if (!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED)) { pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL); - sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!", + sLog->outError(LOG_FILTER_NETWORKIO, "Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!", pUser->GetName(), pUser->GetGUIDLow(), item->GetGUIDLow(), proto->ItemId); return; } @@ -221,7 +221,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) if (!lockInfo) { pUser->SendEquipError(EQUIP_ERR_ITEM_LOCKED, item, NULL); - sLog->outError("WORLD::OpenItem: item [guid = %u] has an unknown lockId: %u!", item->GetGUIDLow(), lockId); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD::OpenItem: item [guid = %u] has an unknown lockId: %u!", item->GetGUIDLow(), lockId); return; } @@ -254,7 +254,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) } else { - sLog->outError("Wrapped item %u don't have record in character_gifts table and will deleted", item->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "Wrapped item %u don't have record in character_gifts table and will deleted", item->GetGUIDLow()); pUser->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); return; } @@ -328,7 +328,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) if (!spellInfo) { - sLog->outError("WORLD: unknown spell id %u", spellId); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown spell id %u", spellId); recvPacket.rfinish(); // prevent spam at ignore packet return; } @@ -444,7 +444,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError("WORLD: unknown PET spell id %u", spellId); + sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %u", spellId); return; } @@ -452,13 +452,13 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket) if (!pet) { - sLog->outError("HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %u by player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %u by player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); return; } if (pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharm()) { - sLog->outError("HandlePetCancelAura: Pet %u is not a pet of player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetCancelAura: Pet %u is not a pet of player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName()); return; } diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index 9d7fa7da396..f50b9ebd311 100755 --- a/src/server/game/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -192,21 +192,21 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) if (myItems[i]) { if (!traderCanTrade) - sLog->outError("trader can't store item: %u", myItems[i]->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "trader can't store item: %u", myItems[i]->GetGUIDLow()); if (_player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, myItems[i], false) == EQUIP_ERR_OK) _player->MoveItemToInventory(playerDst, myItems[i], true, true); else - sLog->outError("player can't take item back: %u", myItems[i]->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "player can't take item back: %u", myItems[i]->GetGUIDLow()); } // return the already removed items to the original owner if (hisItems[i]) { if (!playerCanTrade) - sLog->outError("player can't store item: %u", hisItems[i]->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "player can't store item: %u", hisItems[i]->GetGUIDLow()); if (trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK) trader->MoveItemToInventory(traderDst, hisItems[i], true, true); else - sLog->outError("trader can't take item back: %u", hisItems[i]->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "trader can't take item back: %u", hisItems[i]->GetGUIDLow()); } } } @@ -224,7 +224,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item* *m { if (Item* item = myTrade->GetItem(TradeSlots(i))) { - sLog->outStaticDebug("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot()); //Can return NULL myItems[i] = item; myItems[i]->SetInTrade(); @@ -232,7 +232,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item* *m if (Item* item = hisTrade->GetItem(TradeSlots(i))) { - sLog->outStaticDebug("partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot()); hisItems[i] = item; hisItems[i]->SetInTrade(); } diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp index cfd73c2c987..f0ccfc44e60 100644 --- a/src/server/game/Handlers/VehicleHandler.cpp +++ b/src/server/game/Handlers/VehicleHandler.cpp @@ -63,7 +63,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) if (!seat->CanSwitchFromSeat()) { recv_data.rfinish(); // prevent warnings spam - sLog->outError("HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %u tried to switch seats but current seatflags %u don't permit that.", + sLog->outError(LOG_FILTER_NETWORKIO, "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %u tried to switch seats but current seatflags %u don't permit that.", recv_data.GetOpcode(), GetPlayer()->GetGUIDLow(), seat->m_flags); return; } @@ -150,7 +150,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) if (!vehicle) { data.rfinish(); // prevent warnings spam - sLog->outError("HandleEjectPassenger: Player %u is not in a vehicle!", GetPlayer()->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "HandleEjectPassenger: Player %u is not in a vehicle!", GetPlayer()->GetGUIDLow()); return; } @@ -162,13 +162,13 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) Player* player = ObjectAccessor::FindPlayer(guid); if (!player) { - sLog->outError("Player %u tried to eject player %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u tried to eject player %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); return; } if (!player->IsOnVehicle(vehicle->GetBase())) { - sLog->outError("Player %u tried to eject player %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u tried to eject player %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); return; } @@ -177,7 +177,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) if (seat->IsEjectable()) player->ExitVehicle(); else - sLog->outError("Player %u attempted to eject player %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u attempted to eject player %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); } else if (IS_CREATURE_GUID(guid)) @@ -185,13 +185,13 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) Unit* unit = ObjectAccessor::GetUnit(*_player, guid); if (!unit) // creatures can be ejected too from player mounts { - sLog->outError("Player %u tried to eject creature guid %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u tried to eject creature guid %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); return; } if (!unit->IsOnVehicle(vehicle->GetBase())) { - sLog->outError("Player %u tried to eject unit %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u tried to eject unit %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); return; } @@ -203,10 +203,10 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) unit->ExitVehicle(); } else - sLog->outError("Player %u attempted to eject creature GUID %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u attempted to eject creature GUID %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); } else - sLog->outError("HandleEjectPassenger: Player %u tried to eject invalid GUID "UI64FMTD, GetPlayer()->GetGUIDLow(), guid); + sLog->outError(LOG_FILTER_NETWORKIO, "HandleEjectPassenger: Player %u tried to eject invalid GUID "UI64FMTD, GetPlayer()->GetGUIDLow(), guid); } void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recv_data*/) @@ -220,7 +220,7 @@ void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recv_data*/) if (seat->CanEnterOrExit()) GetPlayer()->ExitVehicle(); else - sLog->outError("Player %u tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.", + sLog->outError(LOG_FILTER_NETWORKIO, "Player %u tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.", GetPlayer()->GetGUIDLow(), seat->m_ID, seat->m_flags); } } diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 59bb86cb68e..6e76f37c9d6 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -75,19 +75,19 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance const MapEntry* entry = sMapStore.LookupEntry(mapId); if (!entry) { - sLog->outError("InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId); return NULL; } if (instanceId == 0) { - sLog->outError("InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId); return NULL; } if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY)) { - sLog->outError("InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty); return NULL; } @@ -275,8 +275,8 @@ void InstanceSaveManager::LoadInstances() // Load reset times and clean expired instances sInstanceSaveMgr->LoadResetTimes(); - sLog->outString(">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } void InstanceSaveManager::LoadResetTimes() @@ -364,7 +364,7 @@ void InstanceSaveManager::LoadResetTimes() MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); if (!mapDiff) { - sLog->outError("InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty); CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, difficulty); continue; } @@ -458,7 +458,7 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev } if (itr == m_resetTimeQueue.end()) - sLog->outError("InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId); } } else @@ -566,7 +566,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); if (!mapDiff || !mapDiff->resetTime) { - sLog->outError("InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid); return; } diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index d2c256e08f7..be9ee67b341 100755 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -46,7 +46,7 @@ void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject* go) if (go) go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY); else - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: InstanceScript: HandleGameObject failed"); + sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript: HandleGameObject failed"); } bool InstanceScript::IsEncounterInProgress() const @@ -197,7 +197,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state) if (bossInfo->state == TO_BE_DECIDED) // loading { bossInfo->state = state; - //sLog->outError("Inialize boss %u state as %u.", id, (uint32)state); + //sLog->outError(LOG_FILTER_GENERAL, "Inialize boss %u state as %u.", id, (uint32)state); return false; } else @@ -267,7 +267,7 @@ void InstanceScript::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, go->ResetDoorOrButton(); } else - sLog->outError("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType()); + sLog->outError(LOG_FILTER_GENERAL, "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType()); } } @@ -298,7 +298,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) player->SendUpdateWorldState(uiStateId, uiStateData); } else - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: DoUpdateWorldState attempt send data but no players in map."); + sLog->outDebug(LOG_FILTER_TSCR, "DoUpdateWorldState attempt send data but no players in map."); } // Send Notify to all players in instance @@ -384,7 +384,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell) bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/) { - sLog->outError("Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u", + sLog->outError(LOG_FILTER_GENERAL, "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u", instance->GetId(), criteria_id); return false; } diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 71f1572624b..ba6d327e631 100755 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -25,11 +25,11 @@ //#include "GameObject.h" //#include "Map.h" -#define OUT_SAVE_INST_DATA sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_SAVE_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_LOAD_INST_DATA(a) sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) -#define OUT_LOAD_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_LOAD_INST_DATA_FAIL sLog->outError("TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_SAVE_INST_DATA sLog->outDebug(LOG_FILTER_TSCR, "Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_SAVE_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA(a) sLog->outDebug(LOG_FILTER_TSCR, "Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) +#define OUT_LOAD_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA_FAIL sLog->outError(LOG_FILTER_TSCR, "Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) class Map; class Unit; @@ -131,7 +131,6 @@ typedef std::map MinionInfoMap; class InstanceScript : public ZoneScript { public: - explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) {} virtual ~InstanceScript() {} diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 0520392461f..ddacf64507f 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -121,7 +121,7 @@ uint32 LootStore::LoadLootTable() if (maxcount > std::numeric_limits::max()) { - sLog->outErrorDb("Table '%s' entry %d item %d: maxcount value (%u) to large. must be less %u - skipped", GetName(), entry, item, maxcount, std::numeric_limits::max()); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: maxcount value (%u) to large. must be less %u - skipped", GetName(), entry, item, maxcount, std::numeric_limits::max()); continue; // error already printed to log/console. } @@ -225,12 +225,12 @@ void LootStore::ReportUnusedIds(LootIdSet const& lootIdSet) const { // all still listed ids isn't referenced for (LootIdSet::const_iterator itr = lootIdSet.begin(); itr != lootIdSet.end(); ++itr) - sLog->outErrorDb("Table '%s' entry %d isn't %s and not referenced from loot, and then useless.", GetName(), *itr, GetEntryName()); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d isn't %s and not referenced from loot, and then useless.", GetName(), *itr, GetEntryName()); } void LootStore::ReportNotExistedId(uint32 id) const { - sLog->outErrorDb("Table '%s' entry %d (%s) does not exist but used as loot id in DB.", GetName(), id, GetEntryName()); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d (%s) does not exist but used as loot id in DB.", GetName(), id, GetEntryName()); } // @@ -259,13 +259,13 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const { if (group >= 1 << 7) // it stored in 7 bit field { - sLog->outErrorDb("Table '%s' entry %d item %d: group (%u) must be less %u - skipped", store.GetName(), entry, itemid, group, 1 << 7); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: group (%u) must be less %u - skipped", store.GetName(), entry, itemid, group, 1 << 7); return false; } if (mincountOrRef == 0) { - sLog->outErrorDb("Table '%s' entry %d item %d: wrong mincountOrRef (%d) - skipped", store.GetName(), entry, itemid, mincountOrRef); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: wrong mincountOrRef (%d) - skipped", store.GetName(), entry, itemid, mincountOrRef); return false; } @@ -274,36 +274,36 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid); if (!proto) { - sLog->outErrorDb("Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid); return false; } if (chance == 0 && group == 0) // Zero chance is allowed for grouped entries only { - sLog->outErrorDb("Table '%s' entry %d item %d: equal-chanced grouped entry, but group not defined - skipped", store.GetName(), entry, itemid); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: equal-chanced grouped entry, but group not defined - skipped", store.GetName(), entry, itemid); return false; } if (chance != 0 && chance < 0.000001f) // loot with low chance { - sLog->outErrorDb("Table '%s' entry %d item %d: low chance (%f) - skipped", + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: low chance (%f) - skipped", store.GetName(), entry, itemid, chance); return false; } if (maxcount < mincountOrRef) // wrong max count { - sLog->outErrorDb("Table '%s' entry %d item %d: max count (%u) less that min count (%i) - skipped", store.GetName(), entry, itemid, int32(maxcount), mincountOrRef); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: max count (%u) less that min count (%i) - skipped", store.GetName(), entry, itemid, int32(maxcount), mincountOrRef); return false; } } else // mincountOrRef < 0 { if (needs_quest) - sLog->outErrorDb("Table '%s' entry %d item %d: quest chance will be treated as non-quest chance", store.GetName(), entry, itemid); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: quest chance will be treated as non-quest chance", store.GetName(), entry, itemid); else if (chance == 0) // no chance for the reference { - sLog->outErrorDb("Table '%s' entry %d item %d: zero chance is specified for a reference, skipped", store.GetName(), entry, itemid); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %d item %d: zero chance is specified for a reference, skipped", store.GetName(), entry, itemid); return false; } } @@ -409,7 +409,7 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo if (!tab) { if (!noEmptyError) - sLog->outErrorDb("Table '%s' loot id #%u used but it doesn't have records.", store.GetName(), lootId); + sLog->outError(LOG_FILTER_SQL, "Table '%s' loot id #%u used but it doesn't have records.", store.GetName(), lootId); return false; } @@ -1178,12 +1178,12 @@ void LootTemplate::LootGroup::Verify(LootStore const& lootstore, uint32 id, uint float chance = RawTotalChance(); if (chance > 101.0f) // TODO: replace with 100% when DBs will be ready { - sLog->outErrorDb("Table '%s' entry %u group %d has total chance > 100%% (%f)", lootstore.GetName(), id, group_id, chance); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %u group %d has total chance > 100%% (%f)", lootstore.GetName(), id, group_id, chance); } if (chance >= 100.0f && !EqualChanced.empty()) { - sLog->outErrorDb("Table '%s' entry %u group %d has items with chance=0%% but group total chance >= 100%% (%f)", lootstore.GetName(), id, group_id, chance); + sLog->outError(LOG_FILTER_SQL, "Table '%s' entry %u group %d has items with chance=0%% but group total chance >= 100%% (%f)", lootstore.GetName(), id, group_id, chance); } } @@ -1391,7 +1391,7 @@ bool LootTemplate::addConditionItem(Condition* cond) { if (!cond || !cond->isLoaded())//should never happen, checked at loading { - sLog->outError("LootTemplate::addConditionItem: condition is null"); + sLog->outError(LOG_FILTER_LOOT, "LootTemplate::addConditionItem: condition is null"); return false; } if (!Entries.empty()) @@ -1450,7 +1450,7 @@ bool LootTemplate::isReference(uint32 id) void LoadLootTemplates_Creature() { - sLog->outString("Loading creature loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading creature loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1477,16 +1477,16 @@ void LoadLootTemplates_Creature() LootTemplates_Creature.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Disenchant() { - sLog->outString("Loading disenchanting loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading disenchanting loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1512,15 +1512,15 @@ void LoadLootTemplates_Disenchant() LootTemplates_Disenchant.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty"); + } void LoadLootTemplates_Fishing() { - sLog->outString("Loading fishing loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading fishing loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1537,16 +1537,16 @@ void LoadLootTemplates_Fishing() LootTemplates_Fishing.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Gameobject() { - sLog->outString("Loading gameobject loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading gameobject loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1573,16 +1573,16 @@ void LoadLootTemplates_Gameobject() LootTemplates_Gameobject.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Item() { - sLog->outString("Loading item loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading item loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1599,16 +1599,16 @@ void LoadLootTemplates_Item() LootTemplates_Item.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 item loot templates. DB table `item_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Milling() { - sLog->outString("Loading milling loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading milling loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1630,16 +1630,16 @@ void LoadLootTemplates_Milling() LootTemplates_Milling.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Pickpocketing() { - sLog->outString("Loading pickpocketing loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading pickpocketing loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1666,16 +1666,16 @@ void LoadLootTemplates_Pickpocketing() LootTemplates_Pickpocketing.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Prospecting() { - sLog->outString("Loading prospecting loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading prospecting loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1697,16 +1697,16 @@ void LoadLootTemplates_Prospecting() LootTemplates_Prospecting.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Mail() { - sLog->outString("Loading mail loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading mail loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1723,16 +1723,16 @@ void LoadLootTemplates_Mail() LootTemplates_Mail.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Skinning() { - sLog->outString("Loading skinning loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading skinning loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1759,16 +1759,16 @@ void LoadLootTemplates_Skinning() LootTemplates_Skinning.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty"); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty"); - sLog->outString(); + } void LoadLootTemplates_Spell() { - sLog->outString("Loading spell loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading spell loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1803,15 +1803,15 @@ void LoadLootTemplates_Spell() LootTemplates_Spell.ReportUnusedIds(lootIdSet); if (count) - sLog->outString(">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outErrorDb(">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty"); + } void LoadLootTemplates_Reference() { - sLog->outString("Loading reference loot templates..."); + sLog->outInfo(LOG_FILTER_LOOT, "Loading reference loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1834,6 +1834,6 @@ void LoadLootTemplates_Reference() // output error for any still listed ids (not referenced from any loot table) LootTemplates_Reference.ReportUnusedIds(lootIdSet); - sLog->outString(">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index 3c3888eb9f8..929a1d81d57 100755 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -50,7 +50,7 @@ MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery default: m_messageType = MAIL_NORMAL; m_senderId = 0; // will show mail from not existed player - sLog->outError("MailSender::MailSender - Mail have unexpected sender typeid (%u)", sender->GetTypeId()); + sLog->outError(LOG_FILTER_GENERAL, "MailSender::MailSender - Mail have unexpected sender typeid (%u)", sender->GetTypeId()); break; } } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 270c4c782b6..53b2f9cf437 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -81,14 +81,14 @@ bool Map::ExistMap(uint32 mapid, int gx, int gy) FILE* pf=fopen(tmp, "rb"); if (!pf) - sLog->outError("Map file '%s': does not exist!", tmp); + sLog->outError(LOG_FILTER_MAPS, "Map file '%s': does not exist!", tmp); else { map_fileheader header; if (fread(&header, sizeof(header), 1, pf) == 1) { if (header.mapMagic != MapMagic.asUInt || header.versionMagic != MapVersionMagic.asUInt) - sLog->outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", tmp); + sLog->outError(LOG_FILTER_MAPS, "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", tmp); else ret = true; } @@ -108,7 +108,7 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy) if (!exists) { std::string name = vmgr->getDirFileName(mapid, gx, gy); - sLog->outError("VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str()); + sLog->outError(LOG_FILTER_MAPS, "VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str()); return false; } } @@ -124,13 +124,13 @@ void Map::LoadVMap(int gx, int gy) switch (vmapLoadResult) { case VMAP::VMAP_LOAD_RESULT_OK: - sLog->outDetail("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); + sLog->outInfo(LOG_FILTER_MAPS, "VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); break; case VMAP::VMAP_LOAD_RESULT_ERROR: - sLog->outDetail("Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); + sLog->outInfo(LOG_FILTER_MAPS, "Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); break; case VMAP::VMAP_LOAD_RESULT_IGNORED: - sLog->outStaticDebug("Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); + sLog->outDebug(LOG_FILTER_MAPS, "Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy); break; } } @@ -157,7 +157,7 @@ void Map::LoadMap(int gx, int gy, bool reload) //map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?) if (GridMaps[gx][gy]) { - sLog->outDetail("Unloading previously loaded map %u before reloading.", GetId()); + sLog->outInfo(LOG_FILTER_MAPS, "Unloading previously loaded map %u before reloading.", GetId()); sScriptMgr->OnUnloadGridMap(this, GridMaps[gx][gy], gx, gy); delete (GridMaps[gx][gy]); @@ -169,12 +169,12 @@ void Map::LoadMap(int gx, int gy, bool reload) int len = sWorld->GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1; tmp = new char[len]; snprintf(tmp, len, (char *)(sWorld->GetDataPath()+"maps/%03u%02u%02u.map").c_str(), GetId(), gx, gy); - sLog->outDetail("Loading map %s", tmp); + sLog->outInfo(LOG_FILTER_MAPS, "Loading map %s", tmp); // loading data GridMaps[gx][gy] = new GridMap(); if (!GridMaps[gx][gy]->loadData(tmp)) { - sLog->outError("Error loading map file: \n %s\n", tmp); + sLog->outError(LOG_FILTER_MAPS, "Error loading map file: \n %s\n", tmp); } delete [] tmp; @@ -264,7 +264,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on) CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY()); if (!p.IsCoordValid()) { - sLog->outError("Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); + sLog->outError(LOG_FILTER_MAPS, "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); return; } @@ -272,7 +272,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on) if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y))) return; - sLog->outStaticDebug("Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); + sLog->outDebug(LOG_FILTER_MAPS, "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(ngrid != NULL); @@ -346,7 +346,7 @@ void Map::EnsureGridLoadedForActiveObject(const Cell &cell, WorldObject* object) // refresh grid state & timer if (grid->GetGridState() != GRID_STATE_ACTIVE) { - sLog->outStaticDebug("Active object "UI64FMTD" triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "Active object "UI64FMTD" triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId()); ResetGridExpiry(*grid, 0.1f); grid->SetGridState(GRID_STATE_ACTIVE); } @@ -387,7 +387,7 @@ bool Map::AddPlayerToMap(Player* player) CellCoord cellCoord = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()); if (!cellCoord.IsCoordValid()) { - sLog->outError("Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord); + sLog->outError(LOG_FILTER_MAPS, "Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord); return false; } @@ -439,7 +439,7 @@ bool Map::AddToMap(T *obj) ASSERT(cellCoord.IsCoordValid()); if (!cellCoord.IsCoordValid()) { - sLog->outError("Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord); + sLog->outError(LOG_FILTER_MAPS, "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord); return false; //Should delete object } @@ -449,7 +449,7 @@ bool Map::AddToMap(T *obj) else EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY())); AddToGrid(obj, cell); - sLog->outStaticDebug("Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY()); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY()); //Must already be set before AddToMap. Usually during obj->Create. //obj->SetMap(this); @@ -715,7 +715,7 @@ void Map::PlayerRelocation(Player* player, float x, float y, float z, float orie if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { - sLog->outStaticDebug("Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); player->RemoveFromGrid(); @@ -1002,7 +1002,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) GridMaps[gx][gy] = NULL; } - sLog->outStaticDebug("Unloading grid[%u, %u] for map %u finished", x, y, GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "Unloading grid[%u, %u] for map %u finished", x, y, GetId()); return true; } @@ -1016,7 +1016,7 @@ void Map::RemoveAllPlayers() if (!player->IsBeingTeleportedFar()) { // this is happening for bg - sLog->outError("Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName(), GetId()); + sLog->outError(LOG_FILTER_MAPS, "Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName(), GetId()); player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation()); } } @@ -1089,28 +1089,28 @@ bool GridMap::loadData(char *filename) // loadup area data if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize)) { - sLog->outError("Error loading map area data\n"); + sLog->outError(LOG_FILTER_MAPS, "Error loading map area data\n"); fclose(in); return false; } // loadup height data if (header.heightMapOffset && !loadHeihgtData(in, header.heightMapOffset, header.heightMapSize)) { - sLog->outError("Error loading map height data\n"); + sLog->outError(LOG_FILTER_MAPS, "Error loading map height data\n"); fclose(in); return false; } // loadup liquid data if (header.liquidMapOffset && !loadLiquidData(in, header.liquidMapOffset, header.liquidMapSize)) { - sLog->outError("Error loading map liquids data\n"); + sLog->outError(LOG_FILTER_MAPS, "Error loading map liquids data\n"); fclose(in); return false; } fclose(in); return true; } - sLog->outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename); + sLog->outError(LOG_FILTER_MAPS, "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename); fclose(in); return false; } @@ -1700,7 +1700,7 @@ bool Map::IsOutdoors(float x, float y, float z) const WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); if (wmoEntry) { - sLog->outStaticDebug("Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId); + sLog->outDebug(LOG_FILTER_MAPS, "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId); atEntry = GetAreaEntryByAreaID(wmoEntry->areaId); } return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry); @@ -1987,7 +1987,7 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpa void Map::SendInitSelf(Player* player) { - sLog->outDetail("Creating player data for himself %u", player->GetGUIDLow()); + sLog->outInfo(LOG_FILTER_MAPS, "Creating player data for himself %u", player->GetGUIDLow()); UpdateData data; @@ -2071,7 +2071,7 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y) { if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS) { - sLog->outError("map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y); + sLog->outError(LOG_FILTER_MAPS, "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y); ASSERT(false); } i_grids[x][y] = grid; @@ -2144,7 +2144,7 @@ void Map::RemoveAllObjectsInRemoveList() { Corpse* corpse = ObjectAccessor::GetCorpse(*obj, obj->GetGUID()); if (!corpse) - sLog->outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow()); + sLog->outError(LOG_FILTER_MAPS, "Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow()); else RemoveFromMap(corpse, true); break; @@ -2162,7 +2162,7 @@ void Map::RemoveAllObjectsInRemoveList() RemoveFromMap(obj->ToCreature(), true); break; default: - sLog->outError("Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId()); + sLog->outError(LOG_FILTER_MAPS, "Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId()); break; } @@ -2239,7 +2239,7 @@ void Map::AddToActive(Creature* c) else { GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); - sLog->outError("Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.", + sLog->outError(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.", c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); } } @@ -2260,7 +2260,7 @@ void Map::RemoveFromActive(Creature* c) else { GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY()); - sLog->outError("Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.", + sLog->outError(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.", c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); } } @@ -2311,7 +2311,7 @@ bool InstanceMap::CanEnter(Player* player) { if (player->GetMapRef().getTarget() == this) { - sLog->outError("InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); + sLog->outError(LOG_FILTER_MAPS, "InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); ASSERT(false); return false; } @@ -2324,7 +2324,7 @@ bool InstanceMap::CanEnter(Player* player) uint32 maxPlayers = GetMaxPlayers(); if (GetPlayersCountExceptGMs() >= maxPlayers) { - sLog->outDetail("MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName()); + sLog->outInfo(LOG_FILTER_MAPS, "MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName()); player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS); return false; } @@ -2394,7 +2394,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); if (!mapSave) { - sLog->outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId()); + sLog->outInfo(LOG_FILTER_MAPS, "InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId()); mapSave = sInstanceSaveMgr->AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true); } @@ -2405,7 +2405,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) // cannot enter other instances if bound permanently if (playerBind->save != mapSave) { - sLog->outError("InstanceMap::Add: player %s(%d) is permanently bound to instance %d, %d, %d, %d, %d, %d but he is being put into instance %d, %d, %d, %d, %d, %d", player->GetName(), player->GetGUIDLow(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset()); + sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is permanently bound to instance %d, %d, %d, %d, %d, %d but he is being put into instance %d, %d, %d, %d, %d, %d", player->GetName(), player->GetGUIDLow(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset()); return false; } } @@ -2417,9 +2417,9 @@ bool InstanceMap::AddPlayerToMap(Player* player) InstanceGroupBind* groupBind = group->GetBoundInstance(this); if (playerBind) { - sLog->outError("InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); + sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); if (groupBind) - sLog->outError("InstanceMap::Add: the group is bound to the instance %d, %d, %d, %d, %d, %d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); + sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: the group is bound to the instance %d, %d, %d, %d, %d, %d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); //ASSERT(false); return false; } @@ -2431,15 +2431,15 @@ bool InstanceMap::AddPlayerToMap(Player* player) // cannot jump to a different instance without resetting it if (groupBind->save != mapSave) { - sLog->outError("InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d but he is in group %d which is bound to instance %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty()); + sLog->outError(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d but he is in group %d which is bound to instance %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty()); if (mapSave) - sLog->outError("MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount()); + sLog->outError(LOG_FILTER_MAPS, "MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount()); else - sLog->outError("MapSave NULL"); + sLog->outError(LOG_FILTER_MAPS, "MapSave NULL"); if (groupBind->save) - sLog->outError("GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount()); + sLog->outError(LOG_FILTER_MAPS, "GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount()); else - sLog->outError("GroupBind save NULL"); + sLog->outError(LOG_FILTER_MAPS, "GroupBind save NULL"); return false; } // if the group/leader is permanently bound to the instance @@ -2478,7 +2478,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) // first player enters (no players yet) SetResetSchedule(false); - sLog->outDetail("MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName()); + sLog->outInfo(LOG_FILTER_MAPS, "MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName()); // initialize unload state m_unloadTimer = 0; m_resetAfterUnload = false; @@ -2504,7 +2504,7 @@ void InstanceMap::Update(const uint32 t_diff) void InstanceMap::RemovePlayerFromMap(Player* player, bool remove) { - sLog->outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); + sLog->outInfo(LOG_FILTER_MAPS, "MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); //if last player set unload timer if (!m_unloadTimer && m_mapRefManager.getSize() == 1) m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); @@ -2599,7 +2599,7 @@ void InstanceMap::PermBindAllPlayers(Player* source) InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); if (!save) { - sLog->outError("Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", source->GetGUIDLow(), source->GetName(), source->GetMap()->GetMapName(), source->GetMapId(), GetInstanceId()); + sLog->outError(LOG_FILTER_MAPS, "Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", source->GetGUIDLow(), source->GetName(), source->GetMap()->GetMapName(), source->GetMapId(), GetInstanceId()); return; } @@ -2653,7 +2653,7 @@ void InstanceMap::SetResetSchedule(bool on) if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId())) sInstanceSaveMgr->ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId())); else - sLog->outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)", + sLog->outError(LOG_FILTER_MAPS, "InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)", on ? "on" : "off", GetId(), GetMapName(), GetInstanceId(), Difficulty(GetSpawnMode())); } } @@ -2715,7 +2715,7 @@ bool BattlegroundMap::CanEnter(Player* player) { if (player->GetMapRef().getTarget() == this) { - sLog->outError("BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow()); + sLog->outError(LOG_FILTER_MAPS, "BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow()); ASSERT(false); return false; } @@ -2743,7 +2743,7 @@ bool BattlegroundMap::AddPlayerToMap(Player* player) void BattlegroundMap::RemovePlayerFromMap(Player* player, bool remove) { - sLog->outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); + sLog->outInfo(LOG_FILTER_MAPS, "MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); Map::RemovePlayerFromMap(player, remove); } diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 2c1bdb00834..5fcca05361b 100755 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -193,13 +193,13 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, const MapEntry* entry = sMapStore.LookupEntry(GetId()); if (!entry) { - sLog->outError("CreateInstance: no entry for map %d", GetId()); + sLog->outError(LOG_FILTER_MAPS, "CreateInstance: no entry for map %d", GetId()); ASSERT(false); } const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(GetId()); if (!iTemplate) { - sLog->outError("CreateInstance: no instance template for map %d", GetId()); + sLog->outError(LOG_FILTER_MAPS, "CreateInstance: no instance template for map %d", GetId()); ASSERT(false); } diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index e9de3ae001f..b49d7db0a27 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -77,7 +77,7 @@ void MapManager::checkAndCorrectGridStatesArray() { if (i_GridStates[i] != si_GridStates[i]) { - sLog->outError("MapManager::checkGridStates(), GridState: si_GridStates is currupt !!!"); + sLog->outError(LOG_FILTER_MAPS, "MapManager::checkGridStates(), GridState: si_GridStates is currupt !!!"); ok = false; si_GridStates[i] = i_GridStates[i]; } @@ -411,7 +411,7 @@ uint32 MapManager::GenerateInstanceId() if (newInstanceId == _nextInstanceId) { - sLog->outError("Instance ID overflow!! Can't continue, shutting down server. "); + sLog->outError(LOG_FILTER_MAPS, "Instance ID overflow!! Can't continue, shutting down server. "); World::StopNow(ERROR_EXIT_CODE); } diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index bf00514000e..dac5b1ef9a2 100755 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -127,7 +127,7 @@ namespace Trinity nBaseExp = 580; break; default: - sLog->outError("BaseGain: Unsupported content level %u", content); + sLog->outError(LOG_FILTER_GENERAL, "BaseGain: Unsupported content level %u", content); nBaseExp = 45; break; } diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index cde176443f0..26e83773228 100755 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -189,7 +189,7 @@ void MotionMaster::MoveRandom(float spawndist) { if (_owner->GetTypeId() == TYPEID_UNIT) { - sLog->outStaticDebug("Creature (GUID: %u) start moving random", _owner->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (GUID: %u) start moving random", _owner->GetGUIDLow()); Mutate(new RandomMovementGenerator(spawndist), MOTION_SLOT_IDLE); } } @@ -200,22 +200,22 @@ void MotionMaster::MoveTargetedHome() if (_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)_owner)->GetCharmerOrOwnerGUID()) { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow()); Mutate(new HomeMovementGenerator(), MOTION_SLOT_ACTIVE); } else if (_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)_owner)->GetCharmerOrOwnerGUID()) { - sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow()); Unit *target = ((Creature*)_owner)->GetCharmerOrOwner(); if (target) { - sLog->outStaticDebug("Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow()); Mutate(new FollowMovementGenerator(*target,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE), MOTION_SLOT_ACTIVE); } } else { - sLog->outError("Player (GUID: %u) attempt targeted home", _owner->GetGUIDLow()); + sLog->outError(LOG_FILTER_GENERAL, "Player (GUID: %u) attempt targeted home", _owner->GetGUIDLow()); } } @@ -223,12 +223,12 @@ void MotionMaster::MoveConfused() { if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) move confused", _owner->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) move confused", _owner->GetGUIDLow()); Mutate(new ConfusedMovementGenerator(), MOTION_SLOT_CONTROLLED); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) move confused", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) move confused", _owner->GetEntry(), _owner->GetGUIDLow()); Mutate(new ConfusedMovementGenerator(), MOTION_SLOT_CONTROLLED); } @@ -243,7 +243,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) //_owner->ClearUnitState(UNIT_STATE_FOLLOW); if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) chase to %s (GUID: %u)", + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) chase to %s (GUID: %u)", _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); @@ -251,7 +251,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)", _owner->GetEntry(), _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); @@ -268,14 +268,14 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo //_owner->AddUnitState(UNIT_STATE_FOLLOW); if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(), + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); Mutate(new FollowMovementGenerator(*target,dist,angle), slot); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)", _owner->GetEntry(), _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); @@ -287,12 +287,12 @@ void MotionMaster::MovePoint(uint32 id, float x, float y, float z) { if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), id, x, y, z); + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), id, x, y, z); Mutate(new PointMovementGenerator(id, x, y, z), MOTION_SLOT_ACTIVE); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), _owner->GetGUIDLow(), id, x, y, z); Mutate(new PointMovementGenerator(id, x, y, z), MOTION_SLOT_ACTIVE); } @@ -303,7 +303,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos) float x, y, z; pos.GetPosition(x, y, z); - sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z); + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z); Movement::MoveSplineInit init(*_owner); init.MoveTo(x,y,z); @@ -317,7 +317,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos) float x, y, z; pos.GetPosition(x, y, z); - sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z); + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z); Movement::MoveSplineInit init(*_owner); init.MoveTo(x,y,z); @@ -364,7 +364,7 @@ void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ) void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id) { - sLog->outStaticDebug("Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z); + sLog->outDebug(LOG_FILTER_GENERAL, "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z); float moveTimeHalf = speedZ / Movement::gravity; float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ); @@ -383,7 +383,7 @@ void MotionMaster::MoveFall(uint32 id/*=0*/) float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE); if (tz <= INVALID_HEIGHT) { - sLog->outStaticDebug("MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).", + sLog->outDebug(LOG_FILTER_GENERAL, "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).", _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionX(), _owner->GetPositionZ()); return; } @@ -412,12 +412,12 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id) if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z); + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z); Mutate(new PointMovementGenerator(id, x, y, z, speed), MOTION_SLOT_CONTROLLED); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetEntry(), _owner->GetGUIDLow(), x, y, z); Mutate(new PointMovementGenerator(id, x, y, z, speed), MOTION_SLOT_CONTROLLED); } @@ -427,11 +427,11 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z) { if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outError("Player (GUID: %u) attempt to seek assistance", _owner->GetGUIDLow()); + sLog->outError(LOG_FILTER_GENERAL, "Player (GUID: %u) attempt to seek assistance", _owner->GetGUIDLow()); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", _owner->GetEntry(), _owner->GetGUIDLow(), x, y, z); _owner->AttackStop(); _owner->ToCreature()->SetReactState(REACT_PASSIVE); @@ -443,11 +443,11 @@ void MotionMaster::MoveSeekAssistanceDistract(uint32 time) { if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outError("Player (GUID: %u) attempt to call distract after assistance", _owner->GetGUIDLow()); + sLog->outError(LOG_FILTER_GENERAL, "Player (GUID: %u) attempt to call distract after assistance", _owner->GetGUIDLow()); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)", _owner->GetEntry(), _owner->GetGUIDLow(), time); Mutate(new AssistanceDistractMovementGenerator(time), MOTION_SLOT_ACTIVE); } @@ -463,14 +463,14 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time) if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(), + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(), enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow()); Mutate(new FleeingMovementGenerator(enemy->GetGUID()), MOTION_SLOT_CONTROLLED); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s", _owner->GetEntry(), _owner->GetGUIDLow(), enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow(), @@ -488,19 +488,19 @@ void MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode) { if (path < sTaxiPathNodesByPath.size()) { - sLog->outStaticDebug("%s taxi to (Path %u node %u)", _owner->GetName(), path, pathnode); + sLog->outDebug(LOG_FILTER_GENERAL, "%s taxi to (Path %u node %u)", _owner->GetName(), path, pathnode); FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path], pathnode); Mutate(mgen, MOTION_SLOT_CONTROLLED); } else { - sLog->outError("%s attempt taxi to (not existed Path %u node %u)", + sLog->outError(LOG_FILTER_GENERAL, "%s attempt taxi to (not existed Path %u node %u)", _owner->GetName(), path, pathnode); } } else { - sLog->outError("Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)", + sLog->outError(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)", _owner->GetEntry(), _owner->GetGUIDLow(), path, pathnode); } } @@ -512,11 +512,11 @@ void MotionMaster::MoveDistract(uint32 timer) if (_owner->GetTypeId() == TYPEID_PLAYER) { - sLog->outStaticDebug("Player (GUID: %u) distracted (timer: %u)", _owner->GetGUIDLow(), timer); + sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) distracted (timer: %u)", _owner->GetGUIDLow(), timer); } else { - sLog->outStaticDebug("Creature (Entry: %u GUID: %u) (timer: %u)", + sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) (timer: %u)", _owner->GetEntry(), _owner->GetGUIDLow(), timer); } @@ -568,7 +568,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable) //Mutate(new WaypointMovementGenerator(path_id, repeatable)): Mutate(new WaypointMovementGenerator(path_id, repeatable), MOTION_SLOT_IDLE); - sLog->outStaticDebug("%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)", + sLog->outDebug(LOG_FILTER_GENERAL, "%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)", _owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature", _owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO"); } @@ -627,7 +627,7 @@ void MotionMaster::DirectDelete(_Ty curr) void MotionMaster::DelayedDelete(_Ty curr) { - sLog->outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType()); + sLog->outFatal(LOG_FILTER_GENERAL, "Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType()); if (isStatic(curr)) return; if (!_expList) diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 25730f92161..12b85b10922 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -41,7 +41,7 @@ void WaypointMovementGenerator::LoadPath(Creature &creature) if (!i_path) { // No movement found for entry - sLog->outErrorDb("WaypointMovementGenerator::LoadPath: creature %s (Entry: %u GUID: %u) doesn't have waypoint path id: %u", creature.GetName(), creature.GetEntry(), creature.GetGUIDLow(), path_id); + sLog->outError(LOG_FILTER_SQL, "WaypointMovementGenerator::LoadPath: creature %s (Entry: %u GUID: %u) doesn't have waypoint path id: %u", creature.GetName(), creature.GetEntry(), creature.GetGUIDLow(), path_id); return; } @@ -314,11 +314,11 @@ void FlightPathMovementGenerator::PreloadEndGrid() // Load the grid if (endMap) { - sLog->outDetail("Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path->size()-1)); + sLog->outInfo(LOG_FILTER_GENERAL, "Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path->size()-1)); endMap->LoadGrid(_endGridX, _endGridY); } else - sLog->outDetail("Unable to determine map to preload flightmaster grid"); + sLog->outInfo(LOG_FILTER_GENERAL, "Unable to determine map to preload flightmaster grid"); } diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp index b1c25aedfd7..61bd3900b9d 100644 --- a/src/server/game/Movement/Spline/MoveSpline.cpp +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -153,7 +153,7 @@ void MoveSpline::init_spline(const MoveSplineInitArgs& args) // TODO: what to do in such cases? problem is in input data (all points are at same coords) if (spline.length() < minimal_duration) { - sLog->outError("MoveSpline::init_spline: zero length spline, wrong input data?"); + sLog->outError(LOG_FILTER_GENERAL, "MoveSpline::init_spline: zero length spline, wrong input data?"); spline.set_length(spline.last(), spline.isCyclic() ? 1000 : 1); } point_Idx = spline.first(); @@ -199,7 +199,7 @@ bool MoveSplineInitArgs::Validate() const #define CHECK(exp) \ if (!(exp))\ {\ - sLog->outError("MoveSplineInitArgs::Validate: expression '%s' failed", #exp);\ + sLog->outError(LOG_FILTER_GENERAL, "MoveSplineInitArgs::Validate: expression '%s' failed", #exp);\ return false;\ } CHECK(path.size() > 1); @@ -226,7 +226,7 @@ bool MoveSplineInitArgs::_checkPathBounds() const offset = path[i] - middle; if (fabs(offset.x) >= MAX_OFFSET || fabs(offset.y) >= MAX_OFFSET || fabs(offset.z) >= MAX_OFFSET) { - sLog->outError("MoveSplineInitArgs::_checkPathBounds check failed"); + sLog->outError(LOG_FILTER_GENERAL, "MoveSplineInitArgs::_checkPathBounds check failed"); return false; } } diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index 296c9eee50f..a23c84b0134 100755 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -48,8 +48,8 @@ void WaypointMgr::Load() if (!result) { - sLog->outErrorDb(">> Loaded 0 waypoints. DB table `waypoint_data` is empty!"); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!"); + return; } @@ -86,8 +86,8 @@ void WaypointMgr::Load() } while (result->NextRow()); - sLog->outString(">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void WaypointMgr::ReloadPath(uint32 id) diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index dfdd4fc4ffc..4db35d5bc79 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -123,7 +123,7 @@ bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, fl GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry); if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT) { - sLog->outError("OutdoorPvP: GO %u is not capture point!", entry); + sLog->outError(LOG_FILTER_OUTDOORPVP, "OutdoorPvP: GO %u is not capture point!", entry); return false; } @@ -382,7 +382,7 @@ bool OPvPCapturePoint::Update(uint32 diff) if (m_OldState != m_State) { - //sLog->outError("%u->%u", m_OldState, m_State); + //sLog->outError(LOG_FILTER_OUTDOORPVP, "%u->%u", m_OldState, m_State); if (oldTeam != m_team) ChangeTeam(oldTeam); ChangeState(); diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index a079d2f643b..3da3efe4823 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -46,8 +46,8 @@ void OutdoorPvPMgr::InitOutdoorPvP() if (!result) { - sLog->outErrorDb(">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty."); + return; } @@ -65,7 +65,7 @@ void OutdoorPvPMgr::InitOutdoorPvP() if (typeId >= MAX_OUTDOORPVP_TYPES) { - sLog->outErrorDb("Invalid OutdoorPvPTypes value %u in outdoorpvp_template; skipped.", typeId); + sLog->outError(LOG_FILTER_SQL, "Invalid OutdoorPvPTypes value %u in outdoorpvp_template; skipped.", typeId); continue; } @@ -85,20 +85,20 @@ void OutdoorPvPMgr::InitOutdoorPvP() OutdoorPvPDataMap::iterator iter = m_OutdoorPvPDatas.find(OutdoorPvPTypes(i)); if (iter == m_OutdoorPvPDatas.end()) { - sLog->outErrorDb("Could not initialize OutdoorPvP object for type ID %u; no entry in database.", uint32(i)); + sLog->outError(LOG_FILTER_SQL, "Could not initialize OutdoorPvP object for type ID %u; no entry in database.", uint32(i)); continue; } pvp = sScriptMgr->CreateOutdoorPvP(iter->second); if (!pvp) { - sLog->outError("Could not initialize OutdoorPvP object for type ID %u; got NULL pointer from script.", uint32(i)); + sLog->outError(LOG_FILTER_OUTDOORPVP, "Could not initialize OutdoorPvP object for type ID %u; got NULL pointer from script.", uint32(i)); continue; } if (!pvp->SetupOutdoorPvP()) { - sLog->outError("Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i)); + sLog->outError(LOG_FILTER_OUTDOORPVP, "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i)); delete pvp; continue; } @@ -106,8 +106,8 @@ void OutdoorPvPMgr::InitOutdoorPvP() m_OutdoorPvPSet.push_back(pvp); } - sLog->outString(">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_OUTDOORPVP, ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle) diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index d8548b552d3..6ee70101af7 100755 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -571,8 +571,7 @@ void PoolMgr::LoadFromDB() if (!result) { mPoolTemplate.clear(); - sLog->outString(">> Loaded 0 object pools. DB table `pool_template` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 object pools. DB table `pool_template` is empty."); return; } @@ -590,13 +589,12 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } // Creatures - sLog->outString("Loading Creatures Pooling Data..."); + sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Creatures Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -605,8 +603,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 creatures in pools. DB table `pool_creature` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty."); } else { @@ -622,17 +619,17 @@ void PoolMgr::LoadFromDB() CreatureData const* data = sObjectMgr->GetCreatureData(guid); if (!data) { - sLog->outErrorDb("`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id); continue; } if (pool_id > max_pool_id) { - sLog->outErrorDb("`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); continue; } if (chance < 0 || chance > 100) { - sLog->outErrorDb("`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id); continue; } PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id]; @@ -647,14 +644,13 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // Gameobjects - sLog->outString("Loading Gameobject Pooling Data..."); + sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Gameobject Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -663,8 +659,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty."); } else { @@ -680,7 +675,7 @@ void PoolMgr::LoadFromDB() GameObjectData const* data = sObjectMgr->GetGOData(guid); if (!data) { - sLog->outErrorDb("`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id); continue; } @@ -689,19 +684,19 @@ void PoolMgr::LoadFromDB() goinfo->type != GAMEOBJECT_TYPE_GOOBER && goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE) { - sLog->outErrorDb("`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id); continue; } if (pool_id > max_pool_id) { - sLog->outErrorDb("`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); continue; } if (chance < 0 || chance > 100) { - sLog->outErrorDb("`pool_gameobject` has an invalid chance (%f) for gameobject guid (%u) in pool id (%u), skipped.", chance, guid, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_gameobject` has an invalid chance (%f) for gameobject guid (%u) in pool id (%u), skipped.", chance, guid, pool_id); continue; } @@ -717,14 +712,13 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // Pool of pools - sLog->outString("Loading Mother Pooling Data..."); + sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Mother Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -733,8 +727,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 pools in pools"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 pools in pools"); } else { @@ -749,22 +742,22 @@ void PoolMgr::LoadFromDB() if (mother_pool_id > max_pool_id) { - sLog->outErrorDb("`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id); continue; } if (child_pool_id > max_pool_id) { - sLog->outErrorDb("`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id); continue; } if (mother_pool_id == child_pool_id) { - sLog->outErrorDb("`pool_pool` pool_id (%u) includes itself, dead-lock detected, skipped.", child_pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_pool` pool_id (%u) includes itself, dead-lock detected, skipped.", child_pool_id); continue; } if (chance < 0 || chance > 100) { - sLog->outErrorDb("`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id); continue; } PoolTemplateData* pPoolTemplateMother = &mPoolTemplate[mother_pool_id]; @@ -794,7 +787,7 @@ void PoolMgr::LoadFromDB() ss << *itr << ' '; ss << "create(s) a circular reference, which can cause the server to freeze.\nRemoving the last link between mother pool " << poolItr->first << " and child pool " << poolItr->second; - sLog->outErrorDb("%s", ss.str().c_str()); + sLog->outError(LOG_FILTER_SQL, "%s", ss.str().c_str()); mPoolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first); mPoolSearchMap.erase(poolItr); --count; @@ -803,12 +796,11 @@ void PoolMgr::LoadFromDB() } } - sLog->outString(">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outString("Loading Quest Pooling Data..."); + sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Quest Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -817,8 +809,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outString(">> Loaded 0 quests in pools"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 quests in pools"); } else { @@ -844,19 +835,19 @@ void PoolMgr::LoadFromDB() Quest const* quest = sObjectMgr->GetQuestTemplate(entry); if (!quest) { - sLog->outErrorDb("`pool_quest` has a non existing quest template (Entry: %u) defined for pool id (%u), skipped.", entry, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_quest` has a non existing quest template (Entry: %u) defined for pool id (%u), skipped.", entry, pool_id); continue; } if (pool_id > max_pool_id) { - sLog->outErrorDb("`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id); continue; } if (!quest->IsDailyOrWeekly()) { - sLog->outErrorDb("`pool_quest` has an quest (%u) which is not daily or weekly in pool id (%u), use ExclusiveGroup instead, skipped.", entry, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_quest` has an quest (%u) which is not daily or weekly in pool id (%u), use ExclusiveGroup instead, skipped.", entry, pool_id); continue; } @@ -867,7 +858,7 @@ void PoolMgr::LoadFromDB() if (poolTypeMap[pool_id] != currType) { - sLog->outErrorDb("`pool_quest` quest %u is %s but pool (%u) is specified for %s, mixing not allowed, skipped.", + sLog->outError(LOG_FILTER_SQL, "`pool_quest` quest %u is %s but pool (%u) is specified for %s, mixing not allowed, skipped.", entry, currType == QUEST_DAILY ? "QUEST_DAILY" : "QUEST_WEEKLY", pool_id, poolTypeMap[pool_id] == QUEST_DAILY ? "QUEST_DAILY" : "QUEST_WEEKLY"); continue; } @@ -877,7 +868,7 @@ void PoolMgr::LoadFromDB() if (creBounds.first == creBounds.second && goBounds.first == goBounds.second) { - sLog->outErrorDb("`pool_quest` lists entry (%u) as member of pool (%u) but is not started anywhere, skipped.", entry, pool_id); + sLog->outError(LOG_FILTER_SQL, "`pool_quest` lists entry (%u) as member of pool (%u) but is not started anywhere, skipped.", entry, pool_id); continue; } @@ -893,13 +884,12 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outString(">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // The initialize method will spawn all pools not in an event and not in another pool, this is why there is 2 left joins with 2 null checks - sLog->outString("Starting objects pooling system..."); + sLog->outInfo(LOG_FILTER_POOLSYS, "Starting objects pooling system..."); { uint32 oldMSTime = getMSTime(); @@ -909,8 +899,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outString(">> Pool handling system initialized, 0 pools spawned."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_POOLSYS, ">> Pool handling system initialized, 0 pools spawned."); } else { @@ -926,9 +915,9 @@ void PoolMgr::LoadFromDB() if (pool_pool_id) // The pool is a child pool in pool_pool table. Ideally we should remove it from the pool handler to ensure it never gets spawned, // however that could recursively invalidate entire chain of mother pools. It can be done in the future but for now we'll do nothing. - sLog->outErrorDb("Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. This broken pool is a child pool of Id %u and cannot be safely removed.", pool_entry, fields[2].GetUInt32()); + sLog->outError(LOG_FILTER_SQL, "Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. This broken pool is a child pool of Id %u and cannot be safely removed.", pool_entry, fields[2].GetUInt32()); else - sLog->outErrorDb("Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. The pool will not be spawned.", pool_entry); + sLog->outError(LOG_FILTER_SQL, "Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. The pool will not be spawned.", pool_entry); continue; } @@ -941,8 +930,8 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outBasic("Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outDebug(LOG_FILTER_POOLSYS, "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } } } diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 94a6590cc4a..05b224fb024 100755 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -45,7 +45,7 @@ bool ReputationMgr::IsAtWar(uint32 faction_id) const if (!factionEntry) { - sLog->outError("ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id); + sLog->outError(LOG_FILTER_GENERAL, "ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id); return 0; } @@ -68,7 +68,7 @@ int32 ReputationMgr::GetReputation(uint32 faction_id) const if (!factionEntry) { - sLog->outError("ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id); + sLog->outError(LOG_FILTER_GENERAL, "ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id); return 0; } diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 5387a3132c6..517ea6cb6bd 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -102,7 +102,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe { Player* player = NULL; if (!source && !target) - sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else { // Check target first, then source. @@ -112,7 +112,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe player = source->ToPlayer(); if (!player) - sLog->outError("%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); @@ -124,7 +124,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t { Creature* creature = NULL; if (!source && !target) - sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else { if (bReverse) @@ -145,7 +145,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t } if (!creature) - sLog->outError("%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); @@ -157,15 +157,15 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s { Unit* unit = NULL; if (!obj) - sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); + sLog->outError(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else if (!obj->isType(TYPEMASK_UNIT)) - sLog->outError("%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); else { unit = obj->ToUnit(); if (!unit) - sLog->outError("%s %s object could not be casted to unit.", + sLog->outError(LOG_FILTER_TSCR, "%s %s object could not be casted to unit.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); } return unit; @@ -175,12 +175,12 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInf { Player* player = NULL; if (!obj) - sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); + sLog->outError(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else { player = obj->ToPlayer(); if (!player) - sLog->outError("%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).", + sLog->outError(LOG_FILTER_TSCR, "%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); } return player; @@ -190,12 +190,12 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, const Scrip { Creature* creature = NULL; if (!obj) - sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); + sLog->outError(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else { creature = obj->ToCreature(); if (!creature) - sLog->outError("%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), + sLog->outError(LOG_FILTER_TSCR, "%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); } return creature; @@ -205,13 +205,13 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, const { WorldObject* pWorldObject = NULL; if (!obj) - sLog->outError("%s %s object is NULL.", + sLog->outError(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target"); else { pWorldObject = dynamic_cast(obj); if (!pWorldObject) - sLog->outError("%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).", + sLog->outError(LOG_FILTER_TSCR, "%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow()); } return pWorldObject; @@ -227,29 +227,29 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script case SCRIPT_COMMAND_OPEN_DOOR: bOpen = true; break; case SCRIPT_COMMAND_CLOSE_DOOR: break; default: - sLog->outError("%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str()); return; } if (!guid) - sLog->outError("%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str()); else if (!source) - sLog->outError("%s source object is NULL.", scriptInfo->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s source object is NULL.", scriptInfo->GetDebugInfo().c_str()); else if (!source->isType(TYPEMASK_UNIT)) - sLog->outError("%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), + sLog->outError(LOG_FILTER_TSCR, "%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else { WorldObject* wSource = dynamic_cast (source); if (!wSource) - sLog->outError("%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else { GameObject* pDoor = _FindGameObject(wSource, guid); if (!pDoor) - sLog->outError("%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); + sLog->outError(LOG_FILTER_TSCR, "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR) - sLog->outError("%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", + sLog->outError(LOG_FILTER_TSCR, "%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(), pDoor->GetGoType(), pDoor->GetEntry(), pDoor->GetGUIDLow()); else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY)) { @@ -331,7 +331,7 @@ void Map::ScriptsProcess() } break; default: - sLog->outError("%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).", + sLog->outError(LOG_FILTER_TSCR, "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).", step.script->GetDebugInfo().c_str(), step.sourceGUID, GUID_HIPART(step.sourceGUID)); break; } @@ -359,7 +359,7 @@ void Map::ScriptsProcess() target = HashMapHolder::Find(step.targetGUID); break; default: - sLog->outError("%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).", + sLog->outError(LOG_FILTER_TSCR, "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).", step.script->GetDebugInfo().c_str(), step.targetGUID, GUID_HIPART(step.targetGUID)); break; } @@ -370,7 +370,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_TALK: if (step.script->Talk.ChatType > CHAT_TYPE_WHISPER && step.script->Talk.ChatType != CHAT_MSG_RAID_BOSS_WHISPER) { - sLog->outError("%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType); + sLog->outError(LOG_FILTER_TSCR, "%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType); break; } if (step.script->Talk.Flags & SF_TALK_USE_PLAYER) @@ -397,7 +397,7 @@ void Map::ScriptsProcess() { uint64 targetGUID = target ? target->GetGUID() : 0; if (!targetGUID || !IS_PLAYER_GUID(targetGUID)) - sLog->outError("%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); else player->Whisper(text, LANG_UNIVERSAL, targetGUID); break; @@ -429,13 +429,13 @@ void Map::ScriptsProcess() break; case CHAT_TYPE_WHISPER: if (!targetGUID || !IS_PLAYER_GUID(targetGUID)) - sLog->outError("%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); else cSource->Whisper(step.script->Talk.TextID, targetGUID); break; case CHAT_MSG_RAID_BOSS_WHISPER: if (!targetGUID || !IS_PLAYER_GUID(targetGUID)) - sLog->outError("%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str()); else cSource->MonsterWhisper(step.script->Talk.TextID, targetGUID, true); break; @@ -463,7 +463,7 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount()) - sLog->outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FieldSet.FieldID, cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow()); else @@ -492,7 +492,7 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) - sLog->outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else @@ -506,7 +506,7 @@ void Map::ScriptsProcess() { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) - sLog->outError("%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else @@ -533,12 +533,12 @@ void Map::ScriptsProcess() { if (!source) { - sLog->outError("%s source object is NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s source object is NULL.", step.script->GetDebugInfo().c_str()); break; } if (!target) { - sLog->outError("%s target object is NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s target object is NULL.", step.script->GetDebugInfo().c_str()); break; } @@ -549,7 +549,7 @@ void Map::ScriptsProcess() { if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER) { - sLog->outError("%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); break; } @@ -562,7 +562,7 @@ void Map::ScriptsProcess() { if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER) { - sLog->outError("%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); break; } @@ -570,7 +570,7 @@ void Map::ScriptsProcess() } else { - sLog->outError("%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); break; @@ -601,7 +601,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT: if (!step.script->RespawnGameobject.GOGuid) { - sLog->outError("%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str()); break; } @@ -611,7 +611,7 @@ void Map::ScriptsProcess() GameObject* pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid); if (!pGO) { - sLog->outError("%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid); + sLog->outError(LOG_FILTER_TSCR, "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid); break; } @@ -620,7 +620,7 @@ void Map::ScriptsProcess() pGO->GetGoType() == GAMEOBJECT_TYPE_BUTTON || pGO->GetGoType() == GAMEOBJECT_TYPE_TRAP) { - sLog->outError("%s can not be used with gameobject of type %u (guid: %u).", + sLog->outError(LOG_FILTER_TSCR, "%s can not be used with gameobject of type %u (guid: %u).", step.script->GetDebugInfo().c_str(), uint32(pGO->GetGoType()), step.script->RespawnGameobject.GOGuid); break; } @@ -643,7 +643,7 @@ void Map::ScriptsProcess() if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script)) { if (!step.script->TempSummonCreature.CreatureEntry) - sLog->outError("%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str()); else { float x = step.script->TempSummonCreature.PosX; @@ -652,7 +652,7 @@ void Map::ScriptsProcess() float o = step.script->TempSummonCreature.Orientation; if (!pSummoner->SummonCreature(step.script->TempSummonCreature.CreatureEntry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->TempSummonCreature.DespawnDelay)) - sLog->outError("%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry); + sLog->outError(LOG_FILTER_TSCR, "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry); } } break; @@ -670,13 +670,13 @@ void Map::ScriptsProcess() // Target must be GameObject. if (!target) { - sLog->outError("%s target object is NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s target object is NULL.", step.script->GetDebugInfo().c_str()); break; } if (target->GetTypeId() != TYPEID_GAMEOBJECT) { - sLog->outError("%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog->outError(LOG_FILTER_TSCR, "%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow()); break; } @@ -700,7 +700,7 @@ void Map::ScriptsProcess() // TODO: Allow gameobjects to be targets and casters if (!source && !target) { - sLog->outError("%s source and target objects are NULL.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s source and target objects are NULL.", step.script->GetDebugInfo().c_str()); break; } @@ -733,13 +733,13 @@ void Map::ScriptsProcess() if (!uSource || !uSource->isType(TYPEMASK_UNIT)) { - sLog->outError("%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); + sLog->outError(LOG_FILTER_TSCR, "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); break; } if (!uTarget || !uTarget->isType(TYPEMASK_UNIT)) { - sLog->outError("%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); + sLog->outError(LOG_FILTER_TSCR, "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID); break; } @@ -799,7 +799,7 @@ void Map::ScriptsProcess() if (Unit* unit = _GetScriptUnit(source, true, step.script)) { if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID)) - sLog->outError("%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID); + sLog->outError(LOG_FILTER_TSCR, "%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID); else unit->GetMotionMaster()->MovePath(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable); } @@ -809,12 +809,12 @@ void Map::ScriptsProcess() { if (!step.script->CallScript.CreatureEntry) { - sLog->outError("%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str()); break; } if (!step.script->CallScript.ScriptID) { - sLog->outError("%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str()); break; } @@ -840,7 +840,7 @@ void Map::ScriptsProcess() if (!cTarget) { - sLog->outError("%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry); + sLog->outError(LOG_FILTER_TSCR, "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry); break; } @@ -849,7 +849,7 @@ void Map::ScriptsProcess() //if no scriptmap present... if (!datamap) { - sLog->outError("%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType); + sLog->outError(LOG_FILTER_TSCR, "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType); break; } @@ -863,7 +863,7 @@ void Map::ScriptsProcess() if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (cSource->isDead()) - sLog->outError("%s creature is already dead (Entry: %u, GUID: %u)", + sLog->outError(LOG_FILTER_TSCR, "%s creature is already dead (Entry: %u, GUID: %u)", step.script->GetDebugInfo().c_str(), cSource->GetEntry(), cSource->GetGUIDLow()); else { @@ -919,7 +919,7 @@ void Map::ScriptsProcess() break; default: - sLog->outError("Unknown script command %s.", step.script->GetDebugInfo().c_str()); + sLog->outError(LOG_FILTER_TSCR, "Unknown script command %s.", step.script->GetDebugInfo().c_str()); break; } diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index b6381594145..0ce3878db96 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -54,7 +54,7 @@ class ScriptRegistry { if (it->second == script) { - sLog->outError("Script '%s' has same memory pointer as '%s'.", + sLog->outError(LOG_FILTER_TSCR, "Script '%s' has same memory pointer as '%s'.", script->GetName().c_str(), it->second->GetName().c_str()); return; @@ -90,7 +90,7 @@ class ScriptRegistry else { // If the script is already assigned -> delete it! - sLog->outError("Script '%s' already assigned with the same script name, so the script can't work.", + sLog->outError(LOG_FILTER_TSCR, "Script '%s' already assigned with the same script name, so the script can't work.", script->GetName().c_str()); ASSERT(false); // Error that should be fixed ASAP. @@ -100,7 +100,7 @@ class ScriptRegistry { // The script uses a script name from database, but isn't assigned to anything. if (script->GetName().find("example") == std::string::npos && script->GetName().find("Smart") == std::string::npos) - sLog->outErrorDb("Script named '%s' does not have a script name assigned in database.", + sLog->outError(LOG_FILTER_SQL, "Script named '%s' does not have a script name assigned in database.", script->GetName().c_str()); } } @@ -162,13 +162,13 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target) { if (!pSource) { - sLog->outError("TSCR: DoScriptText entry %i, invalid Source pointer.", iTextEntry); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i, invalid Source pointer.", iTextEntry); return; } if (iTextEntry >= 0) { - sLog->outError("TSCR: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); return; } @@ -176,18 +176,18 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target) if (!pData) { - sLog->outError("TSCR: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); return; } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + sLog->outDebug(LOG_FILTER_TSCR, "DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); if (pData->uiSoundId) { if (sSoundEntriesStore.LookupEntry(pData->uiSoundId)) pSource->SendPlaySound(pData->uiSoundId, false); else - sLog->outError("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); } if (pData->uiEmote) @@ -195,7 +195,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target) if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER) ((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote); else - sLog->outError("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); } switch (pData->uiType) @@ -217,7 +217,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target) if (target && target->GetTypeId() == TYPEID_PLAYER) pSource->MonsterWhisper(iTextEntry, target->GetGUID()); else - sLog->outError("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); break; } @@ -226,7 +226,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* target) if (target && target->GetTypeId() == TYPEID_PLAYER) pSource->MonsterWhisper(iTextEntry, target->GetGUID(), true); else - sLog->outError("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); + sLog->outError(LOG_FILTER_TSCR, "DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); break; } @@ -251,13 +251,13 @@ void ScriptMgr::Initialize() LoadDatabase(); - sLog->outString("Loading C++ scripts"); + sLog->outInfo(LOG_FILTER_TSCR, "Loading C++ scripts"); FillSpellSummary(); AddScripts(); - sLog->outString(">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); + } void ScriptMgr::Unload() @@ -1443,7 +1443,7 @@ WorldMapScript::WorldMapScript(const char* name, uint32 mapId) : ScriptObject(name), MapScript(mapId) { if (GetEntry() && !GetEntry()->IsWorldMap()) - sLog->outError("WorldMapScript for map %u is invalid.", mapId); + sLog->outError(LOG_FILTER_TSCR, "WorldMapScript for map %u is invalid.", mapId); ScriptRegistry::AddScript(this); } @@ -1452,7 +1452,7 @@ InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId) : ScriptObject(name), MapScript(mapId) { if (GetEntry() && !GetEntry()->IsDungeon()) - sLog->outError("InstanceMapScript for map %u is invalid.", mapId); + sLog->outError(LOG_FILTER_TSCR, "InstanceMapScript for map %u is invalid.", mapId); ScriptRegistry::AddScript(this); } @@ -1461,7 +1461,7 @@ BattlegroundMapScript::BattlegroundMapScript(const char* name, uint32 mapId) : ScriptObject(name), MapScript(mapId) { if (GetEntry() && !GetEntry()->IsBattleground()) - sLog->outError("BattlegroundMapScript for map %u is invalid.", mapId); + sLog->outError(LOG_FILTER_TSCR, "BattlegroundMapScript for map %u is invalid.", mapId); ScriptRegistry::AddScript(this); } diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index b3d445af0c6..3c2ee81afff 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -314,7 +314,7 @@ template class MapScript : public UpdatableScript : _mapEntry(sMapStore.LookupEntry(mapId)) { if (!_mapEntry) - sLog->outError("Invalid MapScript for %u; no such map ID.", mapId); + sLog->outError(LOG_FILTER_TSCR, "Invalid MapScript for %u; no such map ID.", mapId); } public: diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index fb954662525..6337a358866 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -25,10 +25,10 @@ ScriptPointVector const SystemMgr::_empty; void SystemMgr::LoadScriptTexts() { - sLog->outString("TSCR: Loading Script Texts..."); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Texts..."); LoadTrinityStrings("script_texts", TEXT_SOURCE_RANGE, 1+(TEXT_SOURCE_RANGE*2)); - sLog->outString("TSCR: Loading Script Texts additional data..."); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Texts additional data..."); uint32 oldMSTime = getMSTime(); // 0 1 2 3 @@ -36,8 +36,8 @@ void SystemMgr::LoadScriptTexts() if (!result) { - sLog->outString(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); + return; } @@ -56,50 +56,50 @@ void SystemMgr::LoadScriptTexts() if (iId >= 0) { - sLog->outErrorDb("TSCR: Entry %i in table `script_texts` is not a negative value.", iId); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` is not a negative value.", iId); continue; } if (iId > TEXT_SOURCE_RANGE || iId <= TEXT_SOURCE_RANGE*2) { - sLog->outErrorDb("TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId); continue; } if (temp.uiSoundId) { if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId)) - sLog->outErrorDb("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId); } if (!GetLanguageDescByID(temp.uiLanguage)) - sLog->outErrorDb("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage); if (temp.uiType > CHAT_TYPE_ZONE_YELL) - sLog->outErrorDb("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType); m_mTextDataMap[iId] = temp; ++uiCount; } while (result->NextRow()); - sLog->outString(">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime)); + } void SystemMgr::LoadScriptTextsCustom() { - sLog->outString("TSCR: Loading Custom Texts..."); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Custom Texts..."); LoadTrinityStrings("custom_texts", TEXT_SOURCE_RANGE*2, 1+(TEXT_SOURCE_RANGE*3)); - sLog->outString("TSCR: Loading Custom Texts additional data..."); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Custom Texts additional data..."); QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts"); if (!result) { - sLog->outString(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); + return; } @@ -118,35 +118,35 @@ void SystemMgr::LoadScriptTextsCustom() if (iId >= 0) { - sLog->outErrorDb("TSCR: Entry %i in table `custom_texts` is not a negative value.", iId); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` is not a negative value.", iId); continue; } if (iId > TEXT_SOURCE_RANGE*2 || iId <= TEXT_SOURCE_RANGE*3) { - sLog->outErrorDb("TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId); continue; } if (temp.uiSoundId) { if (!sSoundEntriesStore.LookupEntry(temp.uiSoundId)) - sLog->outErrorDb("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, temp.uiSoundId); } if (!GetLanguageDescByID(temp.uiLanguage)) - sLog->outErrorDb("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, temp.uiLanguage); if (temp.uiType > CHAT_TYPE_ZONE_YELL) - sLog->outErrorDb("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType); + sLog->outError(LOG_FILTER_SQL, "TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, temp.uiType); m_mTextDataMap[iId] = temp; ++uiCount; } while (result->NextRow()); - sLog->outString(">> Loaded %u additional Custom Texts data.", uiCount); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u additional Custom Texts data.", uiCount); + } void SystemMgr::LoadScriptWaypoints() @@ -163,15 +163,15 @@ void SystemMgr::LoadScriptWaypoints() if (result) uiCreatureCount = result->GetRowCount(); - sLog->outString("TSCR: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount); // 0 1 2 3 4 5 result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid"); if (!result) { - sLog->outString(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); + return; } @@ -194,18 +194,18 @@ void SystemMgr::LoadScriptWaypoints() if (!pCInfo) { - sLog->outErrorDb("TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", temp.uiCreatureEntry); + sLog->outError(LOG_FILTER_SQL, "TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", temp.uiCreatureEntry); continue; } if (!pCInfo->ScriptID) - sLog->outErrorDb("TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", temp.uiCreatureEntry); + sLog->outError(LOG_FILTER_SQL, "TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", temp.uiCreatureEntry); m_mPointMoveMap[uiEntry].push_back(temp); ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } diff --git a/src/server/game/Server/Protocol/PacketLog.cpp b/src/server/game/Server/Protocol/PacketLog.cpp deleted file mode 100644 index cb6dcdbdb9e..00000000000 --- a/src/server/game/Server/Protocol/PacketLog.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2008-2012 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "PacketLog.h" -#include "Config.h" -#include "ByteBuffer.h" -#include "WorldPacket.h" - -PacketLog::PacketLog() : _file(NULL) -{ - Initialize(); -} - -PacketLog::~PacketLog() -{ - if (_file) - fclose(_file); - - _file = NULL; -} - -void PacketLog::Initialize() -{ - std::string logsDir = ConfigMgr::GetStringDefault("LogsDir", ""); - - if (!logsDir.empty()) - if ((logsDir.at(logsDir.length()-1) != '/') && (logsDir.at(logsDir.length()-1) != '\\')) - logsDir.push_back('/'); - - std::string logname = ConfigMgr::GetStringDefault("PacketLogFile", ""); - if (!logname.empty()) - _file = fopen((logsDir + logname).c_str(), "wb"); -} - -void PacketLog::LogPacket(WorldPacket const& packet, Direction direction) -{ - ByteBuffer data(4+4+4+1+packet.size()); - data << int32(packet.GetOpcode()); - data << int32(packet.size()); - data << uint32(time(NULL)); - data << uint8(direction); - - for (uint32 i = 0; i < packet.size(); i++) - data << const_cast(packet)[i]; - - fwrite(data.contents(), 1, data.size(), _file); - fflush(_file); -} diff --git a/src/server/game/Server/Protocol/PacketLog.h b/src/server/game/Server/Protocol/PacketLog.h deleted file mode 100644 index b899daae198..00000000000 --- a/src/server/game/Server/Protocol/PacketLog.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2008-2012 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef TRINITY_PACKETLOG_H -#define TRINITY_PACKETLOG_H - -#include "Common.h" -#include - -enum Direction -{ - CLIENT_TO_SERVER, - SERVER_TO_CLIENT -}; - -class WorldPacket; - -class PacketLog -{ - friend class ACE_Singleton; - - private: - PacketLog(); - ~PacketLog(); - - public: - void Initialize(); - bool CanLogPacket() const { return (_file != NULL); } - void LogPacket(WorldPacket const& packet, Direction direction); - - private: - FILE* _file; -}; - -#define sPacketLog ACE_Singleton::instance() -#endif diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 81ec5495421..6e45ebf37c1 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -139,7 +139,7 @@ WorldSession::~WorldSession() void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const { - sLog->outError("Client (account %u) send packet %s (%u) with size " SIZEFMTD " but expected %u (attempt to crash server?), skipped", + sLog->outError(LOG_FILTER_GENERAL, "Client (account %u) send packet %s (%u) with size " SIZEFMTD " but expected %u (attempt to crash server?), skipped", GetAccountId(), LookupOpcodeName(packet.GetOpcode()), packet.GetOpcode(), packet.size(), size); } @@ -186,8 +186,8 @@ void WorldSession::SendPacket(WorldPacket const* packet) { uint64 minTime = uint64(cur_time - lastTime); uint64 fullTime = uint64(lastTime - firstTime); - sLog->outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime)); - sLog->outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime); + sLog->outInfo(LOG_FILTER_GENERAL, "Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime)); + sLog->outInfo(LOG_FILTER_GENERAL, "Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime); lastTime = cur_time; sendLastPacketCount = 1; @@ -250,7 +250,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) { if (packet->GetOpcode() >= NUM_MSG_TYPES) { - sLog->outError("SESSION: received non-existed opcode %s (0x%.4X)", LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode()); + sLog->outError(LOG_FILTER_GENERAL, "SESSION: received non-existed opcode %s (0x%.4X)", LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode()); sScriptMgr->OnUnknownPacketReceive(m_Socket, WorldPacket(*packet)); } else @@ -284,7 +284,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) { sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet)); (this->*opHandle.handler)(*packet); - if (sLog->IsOutDebug() && packet->rpos() < packet->wpos()) + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE) && packet->rpos() < packet->wpos()) LogUnprocessedTail(packet); } // lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer @@ -298,7 +298,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) // not expected _player or must checked in packet handler sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet)); (this->*opHandle.handler)(*packet); - if (sLog->IsOutDebug() && packet->rpos() < packet->wpos()) + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE) && packet->rpos() < packet->wpos()) LogUnprocessedTail(packet); } break; @@ -311,7 +311,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) { sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet)); (this->*opHandle.handler)(*packet); - if (sLog->IsOutDebug() && packet->rpos() < packet->wpos()) + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE) && packet->rpos() < packet->wpos()) LogUnprocessedTail(packet); } break; @@ -330,7 +330,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet)); (this->*opHandle.handler)(*packet); - if (sLog->IsOutDebug() && packet->rpos() < packet->wpos()) + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE) && packet->rpos() < packet->wpos()) LogUnprocessedTail(packet); break; case STATUS_NEVER: @@ -347,13 +347,10 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) } catch(ByteBufferException &) { - sLog->outError("WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.", + sLog->outError(LOG_FILTER_GENERAL, "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.", packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId()); - if (sLog->IsOutDebug()) - { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Dumping error causing packet:"); - packet->hexlike(); - } + sLog->outTrace(LOG_FILTER_NETWORKIO, "Dumping error causing packet:"); + packet->hexlike(); } } @@ -537,7 +534,7 @@ void WorldSession::LogoutPlayer(bool Save) // e.g if he got disconnected during a transfer to another map // calls to GetMap in this case may cause crashes _player->CleanupsBeforeDelete(); - sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow(), _player->getLevel()); + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow(), _player->getLevel()); if (Map* _map = _player->FindMap()) _map->RemovePlayerFromMap(_player, true); @@ -610,22 +607,30 @@ const char *WorldSession::GetTrinityString(int32 entry) const void WorldSession::Handle_NULL(WorldPacket& recvPacket) { - sLog->outError("SESSION: received unhandled opcode %s (0x%.4X)", LookupOpcodeName(recvPacket.GetOpcode()), recvPacket.GetOpcode()); + sLog->outError(LOG_FILTER_GENERAL, "SESSION: received unhandled opcode %s (0x%.4X)", + LookupOpcodeName(recvPacket.GetOpcode()), + recvPacket.GetOpcode()); } void WorldSession::Handle_EarlyProccess(WorldPacket& recvPacket) { - sLog->outError("SESSION: received opcode %s (0x%.4X) that must be processed in WorldSocket::OnRead", LookupOpcodeName(recvPacket.GetOpcode()), recvPacket.GetOpcode()); + sLog->outError(LOG_FILTER_GENERAL, "SESSION: received opcode %s (0x%.4X) that must be processed in WorldSocket::OnRead", + LookupOpcodeName(recvPacket.GetOpcode()), + recvPacket.GetOpcode()); } void WorldSession::Handle_ServerSide(WorldPacket& recvPacket) { - sLog->outError("SESSION: received server-side opcode %s (0x%.4X)", LookupOpcodeName(recvPacket.GetOpcode()), recvPacket.GetOpcode()); + sLog->outError(LOG_FILTER_GENERAL, "SESSION: received server-side opcode %s (0x%.4X)", + LookupOpcodeName(recvPacket.GetOpcode()), + recvPacket.GetOpcode()); } void WorldSession::Handle_Deprecated(WorldPacket& recvPacket) { - sLog->outError("SESSION: received deprecated opcode %s (0x%.4X)", LookupOpcodeName(recvPacket.GetOpcode()), recvPacket.GetOpcode()); + sLog->outError(LOG_FILTER_GENERAL, "SESSION: received deprecated opcode %s (0x%.4X)", + LookupOpcodeName(recvPacket.GetOpcode()), + recvPacket.GetOpcode()); } void WorldSession::SendAuthWaitQue(uint32 position) @@ -668,13 +673,15 @@ void WorldSession::LoadAccountData(PreparedQueryResult result, uint32 mask) uint32 type = fields[0].GetUInt8(); if (type >= NUM_ACCOUNT_DATA_TYPES) { - sLog->outError("Table `%s` have invalid account data type (%u), ignore.", mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type); + sLog->outError(LOG_FILTER_GENERAL, "Table `%s` have invalid account data type (%u), ignore.", + mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type); continue; } if ((mask & (1 << type)) == 0) { - sLog->outError("Table `%s` have non appropriate for table account data type (%u), ignore.", mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type); + sLog->outError(LOG_FILTER_GENERAL, "Table `%s` have non appropriate for table account data type (%u), ignore.", + mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type); continue; } @@ -928,7 +935,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) if (size > 0xFFFFF) { - sLog->outError("WorldSession::ReadAddonsInfo addon info too big, size %u", size); + sLog->outError(LOG_FILTER_GENERAL, "WorldSession::ReadAddonsInfo addon info too big, size %u", size); return; } @@ -958,7 +965,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) addonInfo >> enabled >> crc >> unk1; - sLog->outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1); + sLog->outInfo(LOG_FILTER_GENERAL, "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1); AddonInfo addon(addonName, enabled, crc, 2, true); @@ -971,15 +978,15 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) match = false; if (!match) - sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC); + sLog->outInfo(LOG_FILTER_GENERAL, "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC); else - sLog->outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC); + sLog->outInfo(LOG_FILTER_GENERAL, "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC); } else { AddonMgr::SaveAddon(addon); - sLog->outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC); + sLog->outInfo(LOG_FILTER_GENERAL, "ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC); } // TODO: Find out when to not use CRC/pubkey, and other possible states. @@ -994,7 +1001,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under-read!"); } else - sLog->outError("Addon packet uncompress error!"); + sLog->outError(LOG_FILTER_GENERAL, "Addon packet uncompress error!"); } void WorldSession::SendAddonsInfo() @@ -1033,7 +1040,7 @@ void WorldSession::SendAddonsInfo() data << uint8(usepk); if (usepk) // if CRC is wrong, add public key (client need it) { - sLog->outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey", + sLog->outInfo(LOG_FILTER_GENERAL, "ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey", itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC); data.append(addonPublicKey, sizeof(addonPublicKey)); diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 646e9c13392..5b04c3dc714 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -42,7 +42,6 @@ #include "WorldSession.h" #include "WorldSocketMgr.h" #include "Log.h" -#include "PacketLog.h" #include "ScriptMgr.h" #include "AccountMgr.h" @@ -63,19 +62,19 @@ struct ServerPktHeader if (isLargePacket()) { sLog->outDebug(LOG_FILTER_NETWORKIO, "initializing large server to client packet. Size: %u, cmd: %u", size, cmd); - header[headerIndex++] = 0x80|(0xFF &(size>>16)); + header[headerIndex++] = 0x80 | (0xFF & (size >> 16)); } - header[headerIndex++] = 0xFF &(size>>8); - header[headerIndex++] = 0xFF &size; + header[headerIndex++] = 0xFF &(size >> 8); + header[headerIndex++] = 0xFF & size; header[headerIndex++] = 0xFF & cmd; - header[headerIndex++] = 0xFF & (cmd>>8); + header[headerIndex++] = 0xFF & (cmd >> 8); } uint8 getHeaderLength() { // cmd = 2 bytes, size= 2||3bytes - return 2+(isLargePacket()?3:2); + return 2 + (isLargePacket() ? 3 : 2); } bool isLargePacket() const @@ -107,8 +106,8 @@ m_Seed(static_cast (rand32())) { reference_counting_policy().value (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); - msg_queue()->high_water_mark(8*1024*1024); - msg_queue()->low_water_mark(8*1024*1024); + msg_queue()->high_water_mark(8 * 1024 * 1024); + msg_queue()->low_water_mark(8 * 1024 * 1024); } WorldSocket::~WorldSocket (void) @@ -160,8 +159,30 @@ int WorldSocket::SendPacket(WorldPacket const& pct) return -1; // Dump outgoing packet. - if (sPacketLog->CanLogPacket()) - sPacketLog->LogPacket(pct, SERVER_TO_CLIENT); + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) + { + char buff[250]; + snprintf(buff, 250, "SERVER:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n", + uint32(get_handle()), + uint32(pct.size()), + LookupOpcodeName (pct.GetOpcode()), + pct.GetOpcode()); + + std::string data(buff); + uint32 p = 0; + while (p < pct.size()) + { + for (uint32 j = 0; j < 16 && p < pct.size(); j++) + { + snprintf(buff, 250, "%.2X ", const_cast(pct)[p++]); + data.append(buff); + } + data.append("\n"); + } + + data.append("\n"); + sLog->outTrace(LOG_FILTER_NETWORKIO, "%s", data.c_str()); + } // Create a copy of the original packet; this is to avoid issues if a hook modifies it. sScriptMgr->OnPacketSend(this, WorldPacket(pct)); @@ -193,7 +214,7 @@ int WorldSocket::SendPacket(WorldPacket const& pct) if (msg_queue()->enqueue_tail(mb, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1) { - sLog->outError("WorldSocket::SendPacket enqueue_tail failed"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::SendPacket enqueue_tail failed"); mb->release(); return -1; } @@ -236,7 +257,7 @@ int WorldSocket::open (void *a) if (peer().get_remote_addr(remote_addr) == -1) { - sLog->outError("WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno)); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno)); return -1; } @@ -261,7 +282,7 @@ int WorldSocket::open (void *a) // Register with ACE Reactor if (reactor()->register_handler(this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK) == -1) { - sLog->outError("WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno)); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno)); return -1; } @@ -297,14 +318,14 @@ int WorldSocket::handle_input (ACE_HANDLE) return Update(); // interesting line, isn't it ? } - sLog->outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno)); + sLog->outDebug(LOG_FILTER_GENERAL, "WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno)); errno = ECONNRESET; return -1; } case 0: { - sLog->outStaticDebug("WorldSocket::handle_input: Peer has closed connection"); + sLog->outDebug(LOG_FILTER_GENERAL, "WorldSocket::handle_input: Peer has closed connection"); errno = ECONNRESET; return -1; @@ -373,7 +394,7 @@ int WorldSocket::handle_output_queue (GuardType& g) if (msg_queue()->dequeue_head(mblk, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1) { - sLog->outError("WorldSocket::handle_output_queue dequeue_head"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::handle_output_queue dequeue_head"); return -1; } @@ -408,7 +429,7 @@ int WorldSocket::handle_output_queue (GuardType& g) if (msg_queue()->enqueue_head(mblk, (ACE_Time_Value*) &ACE_Time_Value::zero) == -1) { - sLog->outError("WorldSocket::handle_output_queue enqueue_head"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::handle_output_queue enqueue_head"); mblk->release(); return -1; } @@ -480,7 +501,7 @@ int WorldSocket::handle_input_header (void) if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240)) { Player* _player = m_Session ? m_Session->GetPlayer() : NULL; - sLog->outError("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)", + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)", m_Session ? m_Session->GetAccountId() : 0, _player ? _player->GetGUIDLow() : 0, _player ? _player->GetName() : "", @@ -586,7 +607,7 @@ int WorldSocket::handle_input_missing_data (void) // hope this is not hack, as proper m_RecvWPct is asserted around if (!m_RecvWPct) { - sLog->outError("Forcing close on input m_RecvWPct = NULL"); + sLog->outError(LOG_FILTER_GENERAL, "Forcing close on input m_RecvWPct = NULL"); errno = EINVAL; return -1; } @@ -632,7 +653,7 @@ int WorldSocket::cancel_wakeup_output (GuardType& g) (this, ACE_Event_Handler::WRITE_MASK) == -1) { // would be good to store errno from reactor with errno guard - sLog->outError("WorldSocket::cancel_wakeup_output"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::cancel_wakeup_output"); return -1; } @@ -651,7 +672,7 @@ int WorldSocket::schedule_wakeup_output (GuardType& g) if (reactor()->schedule_wakeup (this, ACE_Event_Handler::WRITE_MASK) == -1) { - sLog->outError("WorldSocket::schedule_wakeup_output"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::schedule_wakeup_output"); return -1; } @@ -670,9 +691,30 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct) if (closing_) return -1; - // Dump received packet. - if (sPacketLog->CanLogPacket()) - sPacketLog->LogPacket(*new_pct, CLIENT_TO_SERVER); + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) + { + char buff[250]; + snprintf(buff, 250, "CLIENT:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n", + uint32(get_handle()), + uint32(new_pct->size()), + LookupOpcodeName (new_pct->GetOpcode()), + new_pct->GetOpcode()); + + std::string data(buff); + uint32 p = 0; + while (p < new_pct->size()) + { + for (uint32 j = 0; j < 16 && p < new_pct->size(); j++) + { + snprintf(buff, 250, "%.2X ", const_cast(*new_pct)[p++]); + data.append(buff); + } + data.append("\n"); + } + + data.append("\n"); + sLog->outTrace(LOG_FILTER_NETWORKIO, "%s", data.c_str()); + } try { @@ -683,14 +725,14 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct) case CMSG_AUTH_SESSION: if (m_Session) { - sLog->outError("WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again"); return -1; } sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct)); return HandleAuthSession (*new_pct); case CMSG_KEEP_ALIVE: - sLog->outStaticDebug ("CMSG_KEEP_ALIVE, size: " UI64FMTD, uint64(new_pct->size())); + sLog->outDebug(LOG_FILTER_GENERAL, "CMSG_KEEP_ALIVE, size: " UI64FMTD, uint64(new_pct->size())); sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct)); return 0; default: @@ -712,7 +754,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct) } else { - sLog->outError("WorldSocket::ProcessIncoming: Client not authed opcode = %u", uint32(opcode)); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::ProcessIncoming: Client not authed opcode = %u", uint32(opcode)); return -1; } } @@ -720,9 +762,9 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct) } catch (ByteBufferException &) { - sLog->outError("WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet (opcode: %u) from client %s, accountid=%i. Disconnected client.", - opcode, GetRemoteAddress().c_str(), m_Session?m_Session->GetAccountId():-1); - if (sLog->IsOutDebug()) + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet (opcode: %u) from client %s, accountid=%i. Disconnected client.", + opcode, GetRemoteAddress().c_str(), m_Session ? int32(m_Session->GetAccountId()) : -1); + if (sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_DEBUG)) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Dumping error causing packet:"); new_pct->hexlike(); @@ -734,7 +776,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct) ACE_NOTREACHED (return 0); } -int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) +int WorldSocket::HandleAuthSession(WorldPacket& recvPacket) { // NOTE: ATM the socket is singlethread, have this in mind ... uint8 digest[20]; @@ -758,7 +800,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) packet << uint8(AUTH_REJECT); SendPacket(packet); - sLog->outError("WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str()); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str()); return -1; } @@ -772,7 +814,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) recvPacket >> unk4; recvPacket.read(digest, 20); - sLog->outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u", + sLog->outDebug(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u", BuiltNumberClient, unk2, account.c_str(), @@ -794,7 +836,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) SendPacket(packet); - sLog->outError("WorldSocket::HandleAuthSession: Sent Auth Response (unknown account)."); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: Sent Auth Response (unknown account)."); return -1; } @@ -814,7 +856,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) const char* sStr = s.AsHexStr(); //Must be freed by OPENSSL_free() const char* vStr = v.AsHexStr(); //Must be freed by OPENSSL_free() - sLog->outStaticDebug ("WorldSocket::HandleAuthSession: (s, v) check s: %s v: %s", + sLog->outDebug(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: (s, v) check s: %s v: %s", sStr, vStr); @@ -830,7 +872,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) packet << uint8 (AUTH_FAILED); SendPacket(packet); - sLog->outBasic ("WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs)."); + sLog->outDebug(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs)."); return -1; } } @@ -894,7 +936,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) packet << uint8 (AUTH_BANNED); SendPacket(packet); - sLog->outError("WorldSocket::HandleAuthSession: Sent Auth Response (Account banned)."); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: Sent Auth Response (Account banned)."); return -1; } @@ -908,7 +950,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) SendPacket(packet); - sLog->outDetail("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough"); + sLog->outInfo(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: User tries to login but his security level is not enough"); return -1; } @@ -932,11 +974,11 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) SendPacket(packet); - sLog->outError("WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", id, account.c_str(), address.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", id, account.c_str(), address.c_str()); return -1; } - sLog->outStaticDebug("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.", + sLog->outDebug(LOG_FILTER_GENERAL, "WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.", account.c_str(), address.c_str()); @@ -1013,7 +1055,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket) if (m_Session && AccountMgr::IsPlayerAccount(m_Session->GetSecurity())) { Player* _player = m_Session->GetPlayer(); - sLog->outError("WorldSocket::HandlePing: Player (account: %u, GUID: %u, name: %s) kicked for over-speed pings (address: %s)", + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::HandlePing: Player (account: %u, GUID: %u, name: %s) kicked for over-speed pings (address: %s)", m_Session->GetAccountId(), _player ? _player->GetGUIDLow() : 0, _player ? _player->GetName() : "", @@ -1035,7 +1077,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket) m_Session->SetLatency (latency); else { - sLog->outError("WorldSocket::HandlePing: peer sent CMSG_PING, " + sLog->outError(LOG_FILTER_GENERAL, "WorldSocket::HandlePing: peer sent CMSG_PING, " "but is not authenticated or got recently kicked, " " address = %s", GetRemoteAddress().c_str()); diff --git a/src/server/game/Server/WorldSocketAcceptor.h b/src/server/game/Server/WorldSocketAcceptor.h index a16c5c2189f..d4ff7823b02 100644 --- a/src/server/game/Server/WorldSocketAcceptor.h +++ b/src/server/game/Server/WorldSocketAcceptor.h @@ -44,7 +44,7 @@ protected: virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/) { - sLog->outBasic("Resuming acceptor"); + sLog->outDebug(LOG_FILTER_GENERAL, "Resuming acceptor"); reactor()->cancel_timer(this, 1); return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK); } @@ -54,7 +54,7 @@ protected: #if defined(ENFILE) && defined(EMFILE) if (errno == ENFILE || errno == EMFILE) { - sLog->outError("Out of file descriptors, suspending incoming connections for 10 seconds"); + sLog->outError(LOG_FILTER_GENERAL, "Out of file descriptors, suspending incoming connections for 10 seconds"); reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL); reactor()->schedule_timer(this, NULL, ACE_Time_Value(10)); } diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index d357651a5bf..ed960258c41 100755 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -155,7 +155,7 @@ class ReactorRunnable : protected ACE_Task_Base virtual int svc() { - sLog->outStaticDebug ("Network Thread Starting"); + sLog->outDebug(LOG_FILTER_GENERAL, "Network Thread Starting"); ACE_ASSERT (m_Reactor); @@ -192,7 +192,7 @@ class ReactorRunnable : protected ACE_Task_Base } } - sLog->outStaticDebug ("Network Thread exits"); + sLog->outDebug(LOG_FILTER_GENERAL, "Network Thread exits"); return 0; } @@ -236,7 +236,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) if (num_threads <= 0) { - sLog->outError("Network.Threads is wrong in your config file"); + sLog->outError(LOG_FILTER_GENERAL, "Network.Threads is wrong in your config file"); return -1; } @@ -244,7 +244,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) m_NetThreads = new ReactorRunnable[m_NetThreadsCount]; - sLog->outBasic ("Max allowed socket connections %d", ACE::max_handles()); + sLog->outDebug(LOG_FILTER_GENERAL, "Max allowed socket connections %d", ACE::max_handles()); // -1 means use default m_SockOutKBuff = ConfigMgr::GetIntDefault ("Network.OutKBuff", -1); @@ -253,7 +253,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) if (m_SockOutUBuff <= 0) { - sLog->outError("Network.OutUBuff is wrong in your config file"); + sLog->outError(LOG_FILTER_GENERAL, "Network.OutUBuff is wrong in your config file"); return -1; } @@ -263,7 +263,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) if (m_Acceptor->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1) { - sLog->outError("Failed to open acceptor, check if the port is free"); + sLog->outError(LOG_FILTER_GENERAL, "Failed to open acceptor, check if the port is free"); return -1; } @@ -276,7 +276,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) int WorldSocketMgr::StartNetwork (ACE_UINT16 port, const char* address) { - if (!sLog->IsOutDebug()) + if (!sLog->ShouldLog(LOG_FILTER_GENERAL, LOG_LEVEL_DEBUG)) ACE_Log_Msg::instance()->priority_mask (LM_ERROR, ACE_Log_Msg::PROCESS); if (StartReactiveIO(port, address) == -1) @@ -327,7 +327,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock) (void*) & m_SockOutKBuff, sizeof (int)) == -1 && errno != ENOTSUP) { - sLog->outError("WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF"); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF"); return -1; } } @@ -342,7 +342,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock) (void*)&ndoption, sizeof (int)) == -1) { - sLog->outError("WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno)); + sLog->outError(LOG_FILTER_GENERAL, "WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno)); return -1; } } diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index e314fab07be..96a3538c759 100755 --- a/src/server/game/Skills/SkillDiscovery.cpp +++ b/src/server/game/Skills/SkillDiscovery.cpp @@ -55,8 +55,8 @@ void LoadSkillDiscoveryTable() if (!result) { - sLog->outErrorDb(">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty."); + return; } @@ -89,7 +89,7 @@ void LoadSkillDiscoveryTable() { if (reportedReqSpells.find(absReqSkillOrSpell) == reportedReqSpells.end()) { - sLog->outErrorDb("Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table", spellId, reqSkillOrSpell); + sLog->outError(LOG_FILTER_SQL, "Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table", spellId, reqSkillOrSpell); reportedReqSpells.insert(absReqSkillOrSpell); } continue; @@ -102,7 +102,7 @@ void LoadSkillDiscoveryTable() { if (reportedReqSpells.find(absReqSkillOrSpell) == reportedReqSpells.end()) { - sLog->outErrorDb("Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc" + sLog->outError(LOG_FILTER_SQL, "Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc" " and not 100%% chance random discovery ability but listed for spellId %u (and maybe more) in `skill_discovery_template` table", absReqSkillOrSpell, spellId); reportedReqSpells.insert(absReqSkillOrSpell); @@ -118,7 +118,7 @@ void LoadSkillDiscoveryTable() if (bounds.first == bounds.second) { - sLog->outErrorDb("Spell (ID: %u) not listed in `SkillLineAbility.dbc` but listed with `reqSpell`=0 in `skill_discovery_template` table", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell (ID: %u) not listed in `SkillLineAbility.dbc` but listed with `reqSpell`=0 in `skill_discovery_template` table", spellId); continue; } @@ -127,7 +127,7 @@ void LoadSkillDiscoveryTable() } else { - sLog->outErrorDb("Spell (ID: %u) have negative value in `reqSpell` field in `skill_discovery_template` table", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell (ID: %u) have negative value in `reqSpell` field in `skill_discovery_template` table", spellId); continue; } @@ -136,7 +136,7 @@ void LoadSkillDiscoveryTable() while (result->NextRow()); if (!ssNonDiscoverableEntries.str().empty()) - sLog->outErrorDb("Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s", ssNonDiscoverableEntries.str().c_str()); + sLog->outError(LOG_FILTER_SQL, "Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s", ssNonDiscoverableEntries.str().c_str()); // report about empty data for explicit discovery spells for (uint32 spell_id = 1; spell_id < sSpellMgr->GetSpellInfoStoreSize(); ++spell_id) @@ -150,11 +150,11 @@ void LoadSkillDiscoveryTable() continue; if (SkillDiscoveryStore.find(int32(spell_id)) == SkillDiscoveryStore.end()) - sLog->outErrorDb("Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table", spell_id); + sLog->outError(LOG_FILTER_SQL, "Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table", spell_id); } - sLog->outString(">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player) diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp index 3bb435145f1..869f5476719 100755 --- a/src/server/game/Skills/SkillExtraItems.cpp +++ b/src/server/game/Skills/SkillExtraItems.cpp @@ -60,8 +60,8 @@ void LoadSkillExtraItemTable() if (!result) { - sLog->outErrorDb(">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty."); + return; } @@ -75,28 +75,28 @@ void LoadSkillExtraItemTable() if (!sSpellMgr->GetSpellInfo(spellId)) { - sLog->outError("Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId); + sLog->outError(LOG_FILTER_GENERAL, "Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId); continue; } uint32 requiredSpecialization = fields[1].GetUInt32(); if (!sSpellMgr->GetSpellInfo(requiredSpecialization)) { - sLog->outError("Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization); + sLog->outError(LOG_FILTER_GENERAL, "Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization); continue; } float additionalCreateChance = fields[2].GetFloat(); if (additionalCreateChance <= 0.0f) { - sLog->outError("Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId); + sLog->outError(LOG_FILTER_GENERAL, "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId); continue; } uint8 additionalMaxNum = fields[3].GetUInt8(); if (!additionalMaxNum) { - sLog->outError("Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId); + sLog->outError(LOG_FILTER_GENERAL, "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId); continue; } @@ -110,8 +110,8 @@ void LoadSkillExtraItemTable() } while (result->NextRow()); - sLog->outString(">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } bool canCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 4bb9ff9273e..610cd7d1533 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1107,7 +1107,7 @@ void AuraEffect::UpdatePeriodic(Unit* caster) if (aurEff->GetAuraType() != SPELL_AURA_MOD_POWER_REGEN) { m_isPeriodic = false; - sLog->outError("Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId()); } else { @@ -1933,7 +1933,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo case FORM_SPIRITOFREDEMPTION: // 0x20 break; default: - sLog->outError("Auras: Unknown Shapeshift Type: %u", GetMiscValue()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Auras: Unknown Shapeshift Type: %u", GetMiscValue()); } modelid = target->GetModelForForm(form); @@ -2288,7 +2288,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, if (!ci) { target->SetDisplayId(16358); // pig pink ^_^ - sLog->outError("Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId()); } else { @@ -2807,7 +2807,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(creatureEntry); if (!ci) { - sLog->outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)", GetMiscValue()); + sLog->outError(LOG_FILTER_SQL, "AuraMounted: `creature_template`='%u' not found in database (only need its modelid)", GetMiscValue()); return; } @@ -3883,7 +3883,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo if (GetMiscValue() < -2 || GetMiscValue() > 4) { - sLog->outError("WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue()); return; } @@ -3909,7 +3909,7 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode, if (GetMiscValue() < -1 || GetMiscValue() > 4) { - sLog->outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); return; } @@ -4007,7 +4007,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 if (GetMiscValue() < -1 || GetMiscValue() > 4) { - sLog->outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); return; } @@ -4045,7 +4045,7 @@ void AuraEffect::HandleAuraModResistenceOfStatPercent(AuraApplication const* aur { // support required adding replace UpdateArmor by loop by UpdateResistence at intellect update // and include in UpdateResistence same code as in UpdateArmor for aura mod apply. - sLog->outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!"); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!"); return; } @@ -6234,7 +6234,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo()); - sLog->outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(), absorb); caster->DealDamageMods(target, damage, &absorb); @@ -6304,7 +6304,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c if (target->GetHealth() < damage) damage = uint32(target->GetHealth()); - sLog->outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(), absorb); caster->SendSpellNonMeleeDamageLog(target, GetId(), damage, GetSpellInfo()->GetSchoolMask(), absorb, resist, false, 0, crit); @@ -6436,7 +6436,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const if (crit) damage = caster->SpellCriticalHealingBonus(m_spellInfo, damage, target); - sLog->outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u", + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId()); uint32 absorb = 0; @@ -6505,7 +6505,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con drainAmount = maxmana; } - sLog->outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u", + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), drainAmount, GetId()); // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) @@ -6566,7 +6566,7 @@ void AuraEffect::HandleObsModPowerAuraTick(Unit* target, Unit* caster) const // ignore negative values (can be result apply spellmods to aura damage uint32 amount = std::max(m_amount, 0) * target->GetMaxPower(powerType) /100; - sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId()); SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false); @@ -6601,7 +6601,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false); target->SendPeriodicAuraLog(&pInfo); - sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId()); int32 gain = target->ModifyPower(powerType, amount); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 8a320ae35e7..9ee05b9a2a4 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -424,7 +424,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraA // TODO: Figure out why this happens if (itr == m_applications.end()) { - sLog->outError("Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!", + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!", target->GetGUIDLow(), caster->GetGUIDLow(), auraApp->GetBase()->GetSpellInfo()->Id); ASSERT(false); } @@ -566,7 +566,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) if (!GetOwner()->IsSelfOrInSameMap(itr->first)) { //TODO: There is a crash caused by shadowfiend load addon - sLog->outCrash("Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id, + sLog->outFatal(LOG_FILTER_SPELLS_AURAS, "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id, GetOwner()->GetName(), GetOwner()->IsInWorld() ? GetOwner()->GetMap()->GetId() : uint32(-1), itr->first->GetName(), itr->first->IsInWorld() ? itr->first->GetMap()->GetId() : uint32(-1)); ASSERT(false); @@ -1181,7 +1181,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case 31571: spellId = 57529; break; case 31572: spellId = 57531; break; default: - sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId()); } if (spellId) caster->CastSpell(caster, spellId, true); @@ -1277,7 +1277,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case 49631: spellId = 50509; break; case 49032: spellId = 50508; break; default: - sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId()); } caster->CastSpell(target, spellId, true, 0, GetEffect(0)); } @@ -1384,7 +1384,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case 53759: spellId = 60947; break; case 53754: spellId = 60946; break; default: - sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId()); } if (spellId) caster->CastSpell(target, spellId, true); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index eef11ab25a9..3742ee5fc52 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -458,23 +458,23 @@ void SpellCastTargets::Update(Unit* caster) void SpellCastTargets::OutDebug() const { if (!m_targetMask) - sLog->outString("No targets"); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "No targets"); - sLog->outString("target mask: %u", m_targetMask); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "target mask: %u", m_targetMask); if (m_targetMask & (TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK | TARGET_FLAG_GAMEOBJECT_MASK)) - sLog->outString("Object target: " UI64FMTD, m_objectTargetGUID); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Object target: " UI64FMTD, m_objectTargetGUID); if (m_targetMask & TARGET_FLAG_ITEM) - sLog->outString("Item target: " UI64FMTD, m_itemTargetGUID); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Item target: " UI64FMTD, m_itemTargetGUID); if (m_targetMask & TARGET_FLAG_TRADE_ITEM) - sLog->outString("Trade item target: " UI64FMTD, m_itemTargetGUID); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Trade item target: " UI64FMTD, m_itemTargetGUID); if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION) - sLog->outString("Source location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_src._transportGUID, m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str()); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Source location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_src._transportGUID, m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str()); if (m_targetMask & TARGET_FLAG_DEST_LOCATION) - sLog->outString("Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dst._transportGUID, m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str()); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dst._transportGUID, m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str()); if (m_targetMask & TARGET_FLAG_STRING) - sLog->outString("String: %s", m_strTarget.c_str()); - sLog->outString("speed: %f", m_speed); - sLog->outString("elevation: %f", m_elevation); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "String: %s", m_strTarget.c_str()); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "speed: %f", m_speed); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "elevation: %f", m_elevation); } SpellValue::SpellValue(SpellInfo const* proto) @@ -603,7 +603,7 @@ Spell::~Spell() { // Clean the reference to avoid later crash. // If this error is repeating, we may have to add an ASSERT to better track down how we get into this case. - sLog->outError("SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id); *m_selfContainer = NULL; } @@ -1637,7 +1637,7 @@ void Spell::SelectImplicitTrajTargets() float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d); if (a > -0.0001f) a = 0; - DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: a %f b %f", a, b);) + DEBUG_TRAJ(sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: a %f b %f", a, b);) float bestDist = m_spellInfo->GetMaxRange(false); @@ -1653,11 +1653,11 @@ void Spell::SelectImplicitTrajTargets() const float objDist2d = m_targets.GetSrcPos()->GetExactDist2d(*itr) * cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr)); const float dz = (*itr)->GetPositionZ() - m_targets.GetSrcPos()->m_positionZ; - DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);) + DEBUG_TRAJ(sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);) float dist = objDist2d - size; float height = dist * (a * dist + b); - DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);) + DEBUG_TRAJ(sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);) if (dist < bestDist && height < dz + size && height > dz - size) { bestDist = dist > 0 ? dist : 0; @@ -1665,7 +1665,7 @@ void Spell::SelectImplicitTrajTargets() } #define CHECK_DIST {\ - DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\ + DEBUG_TRAJ(sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\ if (dist > bestDist)\ continue;\ if (dist < objDist2d + size && dist > objDist2d - size)\ @@ -1727,7 +1727,7 @@ void Spell::SelectImplicitTrajTargets() float distSq = (*itr)->GetExactDistSq(x, y, z); float sizeSq = (*itr)->GetObjectSize(); sizeSq *= sizeSq; - DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) + DEBUG_TRAJ(sLog->outError(LOG_FILTER_SPELLS_AURAS, "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) if (distSq > sizeSq) { float factor = 1 - sqrt(sizeSq / distSq); @@ -1736,7 +1736,7 @@ void Spell::SelectImplicitTrajTargets() z += factor * ((*itr)->GetPositionZ() - z); distSq = (*itr)->GetExactDistSq(x, y, z); - DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) + DEBUG_TRAJ(sLog->outError(LOG_FILTER_SPELLS_AURAS, "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) } } @@ -4305,7 +4305,7 @@ void Spell::TakeCastItem() { // This code is to avoid a crash // I'm not sure, if this is really an error, but I guess every item needs a prototype - sLog->outError("Cast item has no item prototype highId=%d, lowId=%d", m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Cast item has no item prototype highId=%d, lowId=%d", m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow()); return; } @@ -4395,7 +4395,7 @@ void Spell::TakePower() if (powerType >= MAX_POWERS) { - sLog->outError("Spell::TakePower: Unknown power type '%d'", powerType); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::TakePower: Unknown power type '%d'", powerType); return; } @@ -5774,7 +5774,7 @@ SpellCastResult Spell::CheckPower() // Check valid power type if (m_spellInfo->PowerType >= MAX_POWERS) { - sLog->outError("Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType); return SPELL_FAILED_UNKNOWN; } @@ -6338,7 +6338,7 @@ void Spell::Delayed() // only called in DealDamage() else m_timer += delaytime; - sLog->outDetail("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime); WorldPacket data(SMSG_SPELL_DELAYED, 8+4); data.append(m_caster->GetPackGUID()); @@ -6554,7 +6554,7 @@ SpellEvent::~SpellEvent() } else { - sLog->outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.", + sLog->outError(LOG_FILTER_SPELLS_AURAS, "~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.", (m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id); ASSERT(false); } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index e43c64cd388..95f67d05e9a 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -764,7 +764,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id); return; } @@ -1022,7 +1022,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } @@ -1067,7 +1067,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex) if (!spellInfo) { - sLog->outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); return; } @@ -1176,7 +1176,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) // If not exist data for dest location - return if (!m_targets.HasDst()) { - sLog->outError("Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id); return; } @@ -1502,7 +1502,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/) if (!targetAura) { - sLog->outError("Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID()); return; } @@ -1977,7 +1977,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype) // Players shouldn't be able to loot gameobjects that are currently despawned if (!gameObjTarget->isSpawned() && !player->isGameMaster()) { - sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!", + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!", player->GetName(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow()); return; } @@ -2275,7 +2275,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB); if (!properties) { - sLog->outError("EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB); return; } @@ -2836,7 +2836,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) } if (!add_socket) { - sLog->outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.", + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.", m_spellInfo->Id, SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC, ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET); return; } @@ -2902,14 +2902,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) case 10: spell_id = 36758; break; // 14% case 11: spell_id = 36760; break; // 20% default: - sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage); return; } SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) { - sLog->outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id); return; } @@ -2936,14 +2936,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) if (!enchant_id) { - sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex); return; } SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) { - sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id); return; } @@ -4195,7 +4195,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case 31893: spell_heal = 48084; break; case 31883: spell_heal = 48085; break; default: - sLog->outError("Unknown Lightwell spell caster %u", m_caster->GetEntry()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Unknown Lightwell spell caster %u", m_caster->GetEntry()); return; } @@ -4312,7 +4312,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case 57774: spellId1 = 20185; break; // Judgement of Light case 53408: spellId1 = 20186; break; // Judgement of Wisdom default: - sLog->outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id); return; } // all seals have aura dummy in 2 effect @@ -4585,7 +4585,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/) Player* target = (Player*)m_caster; sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell Effect: Stuck"); - sLog->outDetail("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", target->GetName(), target->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", target->GetName(), target->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); if (target->isInFlight()) return; @@ -5502,7 +5502,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) if (!goinfo) { - sLog->outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id); + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id); return; } @@ -5606,7 +5606,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) ExecuteLogEffectSummonObject(effIndex, pGameObj); - sLog->outStaticDebug("AddObject at SpellEfects.cpp EffectTransmitted"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AddObject at SpellEfects.cpp EffectTransmitted"); //m_caster->AddGameObject(pGameObj); //m_ObjToDel.push_back(pGameObj); @@ -6149,7 +6149,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex) if (!sSoundEntriesStore.LookupEntry(soundid)) { - sLog->outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id); return; } @@ -6200,7 +6200,7 @@ void Spell::EffectPlayerNotification(SpellEffIndex effIndex) if (!sSoundEntriesStore.LookupEntry(soundid)) { - sLog->outError("EffectPlayerNotification: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "EffectPlayerNotification: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id); return; } @@ -6310,7 +6310,7 @@ void Spell::EffectBind(SpellEffIndex effIndex) SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id); if (!st) { - sLog->outError("Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id); return; } @@ -6338,11 +6338,11 @@ void Spell::EffectBind(SpellEffIndex effIndex) data << uint32(area_id); player->SendDirectMessage(&data); - sLog->outStaticDebug("New homebind X : %f", loc.m_positionX); - sLog->outStaticDebug("New homebind Y : %f", loc.m_positionY); - sLog->outStaticDebug("New homebind Z : %f", loc.m_positionZ); - sLog->outStaticDebug("New homebind MapId : %u", loc.m_mapId); - sLog->outStaticDebug("New homebind AreaId : %u", area_id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind X : %f", loc.m_positionX); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind Y : %f", loc.m_positionY); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind Z : %f", loc.m_positionZ); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind MapId : %u", loc.m_mapId); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "New homebind AreaId : %u", area_id); // zone update data.Initialize(SMSG_PLAYERBOUND, 8+4); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 16584086245..a397bb13709 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1262,7 +1262,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const shapeInfo = sSpellShapeshiftStore.LookupEntry(form); if (!shapeInfo) { - sLog->outError("GetErrorAtShapeshiftedCast: unknown shapeshift %u", form); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form); return SPELL_CAST_OK; } actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells @@ -2017,7 +2017,7 @@ uint32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) // Else drain all power if (PowerType < MAX_POWERS) return caster->GetPower(Powers(PowerType)); - sLog->outError("SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id); return 0; } @@ -2046,7 +2046,7 @@ uint32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "CalculateManaCost: Not implemented yet!"); break; default: - sLog->outError("CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id); return 0; } } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index d40c08f1c4c..2b0e71b4dd8 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -370,7 +370,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id); else - sLog->outErrorDb("Craft spell %u not have create item entry.", spellInfo->Id); + sLog->outError(LOG_FILTER_SQL, "Craft spell %u not have create item entry.", spellInfo->Id); } return false; } @@ -384,7 +384,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); else - sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); + sLog->outError(LOG_FILTER_SQL, "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); } return false; } @@ -402,7 +402,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); else - sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); } return false; } @@ -422,7 +422,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); else - sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); + sLog->outError(LOG_FILTER_SQL, "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); } return false; } @@ -454,7 +454,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con uint32 mode = uint32(caster->GetMap()->GetSpawnMode()); if (mode >= MAX_DIFFICULTY) { - sLog->outError("SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId); return spellId; //return source spell } @@ -477,7 +477,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con if (difficultyEntry->SpellID[mode] <= 0) { - sLog->outErrorDb("SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode); + sLog->outError(LOG_FILTER_SQL, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode); return spellId; } @@ -1155,8 +1155,8 @@ void SpellMgr::LoadSpellRanks() if (!result) { - sLog->outString(">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); + return; } @@ -1195,13 +1195,13 @@ void SpellMgr::LoadSpellRanks() SpellInfo const* first = GetSpellInfo(lastSpell); if (!first) { - sLog->outErrorDb("Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell); + sLog->outError(LOG_FILTER_SQL, "Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell); continue; } // check if chain is long enough if (rankChain.size() < 2) { - sLog->outErrorDb("There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell); + sLog->outError(LOG_FILTER_SQL, "There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell); continue; } int32 curRank = 0; @@ -1212,14 +1212,14 @@ void SpellMgr::LoadSpellRanks() SpellInfo const* spell = GetSpellInfo(itr->first); if (!spell) { - sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell); valid = false; break; } ++curRank; if (itr->second != curRank) { - sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank); + sLog->outError(LOG_FILTER_SQL, "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank); valid = false; break; } @@ -1251,8 +1251,8 @@ void SpellMgr::LoadSpellRanks() while (true); } while (!finished); - sLog->outString(">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellRequired() @@ -1267,8 +1267,8 @@ void SpellMgr::LoadSpellRequired() if (!result) { - sLog->outString(">> Loaded 0 spell required records. DB table `spell_required` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell required records. DB table `spell_required` is empty."); + return; } @@ -1284,26 +1284,26 @@ void SpellMgr::LoadSpellRequired() SpellInfo const* spell = GetSpellInfo(spell_id); if (!spell) { - sLog->outErrorDb("spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id); + sLog->outError(LOG_FILTER_SQL, "spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id); continue; } SpellInfo const* req_spell = GetSpellInfo(spell_req); if (!req_spell) { - sLog->outErrorDb("req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req); + sLog->outError(LOG_FILTER_SQL, "req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req); continue; } if (GetFirstSpellInChain(spell_id) == GetFirstSpellInChain(spell_req)) { - sLog->outErrorDb("req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id); + sLog->outError(LOG_FILTER_SQL, "req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id); continue; } if (IsSpellRequiringSpell(spell_id, spell_req)) { - sLog->outErrorDb("duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id); + sLog->outError(LOG_FILTER_SQL, "duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id); continue; } @@ -1312,8 +1312,8 @@ void SpellMgr::LoadSpellRequired() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellLearnSkills() @@ -1350,8 +1350,8 @@ void SpellMgr::LoadSpellLearnSkills() } } - sLog->outString(">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellLearnSpells() @@ -1364,8 +1364,8 @@ void SpellMgr::LoadSpellLearnSpells() QueryResult result = WorldDatabase.Query("SELECT entry, SpellID, Active FROM spell_learn_spell"); if (!result) { - sLog->outString(">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); + return; } @@ -1383,19 +1383,19 @@ void SpellMgr::LoadSpellLearnSpells() if (!GetSpellInfo(spell_id)) { - sLog->outErrorDb("Spell %u listed in `spell_learn_spell` does not exist", spell_id); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` does not exist", spell_id); continue; } if (!GetSpellInfo(node.spell)) { - sLog->outErrorDb("Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell); continue; } if (GetTalentSpellCost(node.spell)) { - sLog->outErrorDb("Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell); continue; } @@ -1437,7 +1437,7 @@ void SpellMgr::LoadSpellLearnSpells() { if (itr->second.spell == dbc_node.spell) { - sLog->outErrorDb("Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.", + sLog->outError(LOG_FILTER_SQL, "Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.", spell, dbc_node.spell); found = true; break; @@ -1453,8 +1453,8 @@ void SpellMgr::LoadSpellLearnSpells() } } - sLog->outString(">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellTargetPositions() @@ -1467,8 +1467,8 @@ void SpellMgr::LoadSpellTargetPositions() QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position"); if (!result) { - sLog->outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); + return; } @@ -1490,20 +1490,20 @@ void SpellMgr::LoadSpellTargetPositions() MapEntry const* mapEntry = sMapStore.LookupEntry(st.target_mapId); if (!mapEntry) { - sLog->outErrorDb("Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, st.target_mapId); + sLog->outError(LOG_FILTER_SQL, "Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, st.target_mapId); continue; } if (st.target_X==0 && st.target_Y==0 && st.target_Z==0) { - sLog->outErrorDb("Spell (ID:%u) target coordinates not provided.", Spell_ID); + sLog->outError(LOG_FILTER_SQL, "Spell (ID:%u) target coordinates not provided.", Spell_ID); continue; } SpellInfo const* spellInfo = GetSpellInfo(Spell_ID); if (!spellInfo) { - sLog->outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID); + sLog->outError(LOG_FILTER_SQL, "Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID); continue; } @@ -1518,7 +1518,7 @@ void SpellMgr::LoadSpellTargetPositions() uint32 area_id = sMapMgr->GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z); if (area_id != uint32(spellInfo->Effects[i].MiscValue)) { - sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.", Spell_ID, spellInfo->Effects[i].MiscValue, area_id); + sLog->outError(LOG_FILTER_SQL, "Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.", Spell_ID, spellInfo->Effects[i].MiscValue, area_id); break; } } @@ -1529,7 +1529,7 @@ void SpellMgr::LoadSpellTargetPositions() } if (!found) { - sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID); + sLog->outError(LOG_FILTER_SQL, "Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID); continue; } @@ -1573,8 +1573,8 @@ void SpellMgr::LoadSpellTargetPositions() } }*/ - sLog->outString(">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellGroups() @@ -1588,8 +1588,8 @@ void SpellMgr::LoadSpellGroups() QueryResult result = WorldDatabase.Query("SELECT id, spell_id FROM spell_group"); if (!result) { - sLog->outString(">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); + return; } @@ -1602,7 +1602,7 @@ void SpellMgr::LoadSpellGroups() uint32 group_id = fields[0].GetUInt32(); if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX) { - sLog->outErrorDb("SpellGroup id %u listed in `spell_group` is in core range, but is not defined in core!", group_id); + sLog->outError(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group` is in core range, but is not defined in core!", group_id); continue; } int32 spell_id = fields[1].GetInt32(); @@ -1618,7 +1618,7 @@ void SpellMgr::LoadSpellGroups() { if (groups.find(abs(itr->second)) == groups.end()) { - sLog->outErrorDb("SpellGroup id %u listed in `spell_group` does not exist", abs(itr->second)); + sLog->outError(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group` does not exist", abs(itr->second)); mSpellGroupSpell.erase(itr++); } else @@ -1630,12 +1630,12 @@ void SpellMgr::LoadSpellGroups() if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_group` does not exist", itr->second); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_group` does not exist", itr->second); mSpellGroupSpell.erase(itr++); } else if (spellInfo->GetRank() > 1) { - sLog->outErrorDb("Spell %u listed in `spell_group` is not first rank of spell", itr->second); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_group` is not first rank of spell", itr->second); mSpellGroupSpell.erase(itr++); } else @@ -1655,8 +1655,8 @@ void SpellMgr::LoadSpellGroups() } } - sLog->outString(">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellGroupStackRules() @@ -1669,8 +1669,8 @@ void SpellMgr::LoadSpellGroupStackRules() QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules"); if (!result) { - sLog->outString(">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); + return; } @@ -1683,7 +1683,7 @@ void SpellMgr::LoadSpellGroupStackRules() uint8 stack_rule = fields[1].GetInt8(); if (stack_rule >= SPELL_GROUP_STACK_RULE_MAX) { - sLog->outErrorDb("SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule); + sLog->outError(LOG_FILTER_SQL, "SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule); continue; } @@ -1691,7 +1691,7 @@ void SpellMgr::LoadSpellGroupStackRules() if (spellGroup.first == spellGroup.second) { - sLog->outErrorDb("SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id); + sLog->outError(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id); continue; } @@ -1700,8 +1700,8 @@ void SpellMgr::LoadSpellGroupStackRules() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellProcEvents() @@ -1714,8 +1714,8 @@ void SpellMgr::LoadSpellProcEvents() QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event"); if (!result) { - sLog->outString(">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); + return; } @@ -1730,7 +1730,7 @@ void SpellMgr::LoadSpellProcEvents() SpellInfo const* spell = GetSpellInfo(entry); if (!spell) { - sLog->outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` does not exist", entry); continue; } @@ -1753,7 +1753,7 @@ void SpellMgr::LoadSpellProcEvents() { if (spe.procFlags == 0) { - sLog->outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` probally not triggered spell", entry); continue; } customProc++; @@ -1762,10 +1762,10 @@ void SpellMgr::LoadSpellProcEvents() } while (result->NextRow()); if (customProc) - sLog->outString(">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outString(">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellProcs() @@ -1778,8 +1778,8 @@ void SpellMgr::LoadSpellProcs() QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc"); if (!result) { - sLog->outString(">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); + return; } @@ -1800,7 +1800,7 @@ void SpellMgr::LoadSpellProcs() SpellInfo const* spellEntry = GetSpellInfo(spellId); if (!spellEntry) { - sLog->outErrorDb("Spell %u listed in `spell_proc` does not exist", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` does not exist", spellId); continue; } @@ -1808,7 +1808,7 @@ void SpellMgr::LoadSpellProcs() { if (GetFirstSpellInChain(spellId) != uint32(spellId)) { - sLog->outErrorDb("Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32()); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32()); continue; } } @@ -1835,7 +1835,7 @@ void SpellMgr::LoadSpellProcs() { if (mSpellProcMap.find(spellId) != mSpellProcMap.end()) { - sLog->outErrorDb("Spell %u listed in `spell_proc` has duplicate entry in the table", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` has duplicate entry in the table", spellId); break; } SpellProcEntry procEntry = SpellProcEntry(baseProcEntry); @@ -1850,47 +1850,47 @@ void SpellMgr::LoadSpellProcs() // validate data if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask); if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16)) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName); if (procEntry.chance < 0) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId); procEntry.chance = 0; } if (procEntry.ratePerMinute < 0) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId); procEntry.ratePerMinute = 0; } if (cooldown < 0) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId); procEntry.cooldown = 0; } if (procEntry.chance == 0 && procEntry.ratePerMinute == 0) - sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId); if (procEntry.charges > 99) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId); procEntry.charges = 99; } if (!procEntry.typeMask) - sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId); if (procEntry.spellTypeMask & ~PROC_SPELL_PHASE_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask); if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK))) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId); if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK) - sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId); if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask); if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId); if (procEntry.hitMask & ~PROC_HIT_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask); if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH))))) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId); mSpellProcMap[spellId] = procEntry; @@ -1905,8 +1905,8 @@ void SpellMgr::LoadSpellProcs() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellBonusess() @@ -1919,8 +1919,8 @@ void SpellMgr::LoadSpellBonusess() QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data"); if (!result) { - sLog->outString(">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); + return; } @@ -1933,7 +1933,7 @@ void SpellMgr::LoadSpellBonusess() SpellInfo const* spell = GetSpellInfo(entry); if (!spell) { - sLog->outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_bonus_data` does not exist", entry); continue; } @@ -1946,8 +1946,8 @@ void SpellMgr::LoadSpellBonusess() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellThreats() @@ -1960,8 +1960,8 @@ void SpellMgr::LoadSpellThreats() QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat"); if (!result) { - sLog->outString(">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); + return; } @@ -1974,7 +1974,7 @@ void SpellMgr::LoadSpellThreats() if (!GetSpellInfo(entry)) { - sLog->outErrorDb("Spell %u listed in `spell_threat` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_threat` does not exist", entry); continue; } @@ -1987,8 +1987,8 @@ void SpellMgr::LoadSpellThreats() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSkillLineAbilityMap() @@ -2009,8 +2009,8 @@ void SpellMgr::LoadSkillLineAbilityMap() ++count; } - sLog->outString(">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellPetAuras() @@ -2023,8 +2023,8 @@ void SpellMgr::LoadSpellPetAuras() QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras"); if (!result) { - sLog->outString(">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); + return; } @@ -2046,21 +2046,21 @@ void SpellMgr::LoadSpellPetAuras() SpellInfo const* spellInfo = GetSpellInfo(spell); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_pet_auras` does not exist", spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_pet_auras` does not exist", spell); continue; } if (spellInfo->Effects[eff].Effect != SPELL_EFFECT_DUMMY && (spellInfo->Effects[eff].Effect != SPELL_EFFECT_APPLY_AURA || spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_DUMMY)) { - sLog->outError("Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell); continue; } SpellInfo const* spellInfo2 = GetSpellInfo(aura); if (!spellInfo2) { - sLog->outErrorDb("Aura %u listed in `spell_pet_auras` does not exist", aura); + sLog->outError(LOG_FILTER_SQL, "Aura %u listed in `spell_pet_auras` does not exist", aura); continue; } @@ -2071,8 +2071,8 @@ void SpellMgr::LoadSpellPetAuras() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } // Fill custom data about enchancments @@ -2112,8 +2112,8 @@ void SpellMgr::LoadEnchantCustomAttr() } } - sLog->outString(">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellEnchantProcData() @@ -2126,8 +2126,8 @@ void SpellMgr::LoadSpellEnchantProcData() QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data"); if (!result) { - sLog->outString(">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); + return; } @@ -2141,7 +2141,7 @@ void SpellMgr::LoadSpellEnchantProcData() SpellItemEnchantmentEntry const* ench = sSpellItemEnchantmentStore.LookupEntry(enchantId); if (!ench) { - sLog->outErrorDb("Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); + sLog->outError(LOG_FILTER_SQL, "Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); continue; } @@ -2156,8 +2156,8 @@ void SpellMgr::LoadSpellEnchantProcData() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellLinked() @@ -2170,8 +2170,8 @@ void SpellMgr::LoadSpellLinked() QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell"); if (!result) { - sLog->outString(">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); + return; } @@ -2187,13 +2187,13 @@ void SpellMgr::LoadSpellLinked() SpellInfo const* spellInfo = GetSpellInfo(abs(trigger)); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(trigger)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_linked_spell` does not exist", abs(trigger)); continue; } spellInfo = GetSpellInfo(abs(effect)); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(effect)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_linked_spell` does not exist", abs(effect)); continue; } @@ -2209,8 +2209,8 @@ void SpellMgr::LoadSpellLinked() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadPetLevelupSpellMap() @@ -2266,8 +2266,8 @@ void SpellMgr::LoadPetLevelupSpellMap() } } - sLog->outString(">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); + } bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells) @@ -2351,10 +2351,10 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog->outString(">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); + - sLog->outString("Loading summonable creature templates..."); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Loading summonable creature templates..."); oldMSTime = getMSTime(); // different summon spells @@ -2395,8 +2395,8 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog->outString(">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellAreas() @@ -2414,8 +2414,8 @@ void SpellMgr::LoadSpellAreas() if (!result) { - sLog->outString(">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); + return; } @@ -2443,7 +2443,7 @@ void SpellMgr::LoadSpellAreas() } else { - sLog->outErrorDb("Spell %u listed in `spell_area` does not exist", spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` does not exist", spell); continue; } @@ -2472,20 +2472,20 @@ void SpellMgr::LoadSpellAreas() if (!ok) { - sLog->outErrorDb("Spell %u listed in `spell_area` already listed with similar requirements.", spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` already listed with similar requirements.", spell); continue; } } if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId)) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId); continue; } if (spellArea.questStart && !sObjectMgr->GetQuestTemplate(spellArea.questStart)) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart); continue; } @@ -2493,13 +2493,13 @@ void SpellMgr::LoadSpellAreas() { if (!sObjectMgr->GetQuestTemplate(spellArea.questEnd)) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd); continue; } if (spellArea.questEnd == spellArea.questStart && !spellArea.questStartCanActive) { - sLog->outErrorDb("Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell, spellArea.questEnd); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell, spellArea.questEnd); continue; } } @@ -2509,13 +2509,13 @@ void SpellMgr::LoadSpellAreas() SpellInfo const* spellInfo = GetSpellInfo(abs(spellArea.auraSpell)); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell)); continue; } if (uint32(abs(spellArea.auraSpell)) == spellArea.spellId) { - sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell)); continue; } @@ -2535,7 +2535,7 @@ void SpellMgr::LoadSpellAreas() if (chain) { - sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); continue; } @@ -2551,7 +2551,7 @@ void SpellMgr::LoadSpellAreas() if (chain) { - sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); continue; } } @@ -2559,13 +2559,13 @@ void SpellMgr::LoadSpellAreas() if (spellArea.raceMask && (spellArea.raceMask & RACEMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask); continue; } if (spellArea.gender != GENDER_NONE && spellArea.gender != GENDER_FEMALE && spellArea.gender != GENDER_MALE) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender); continue; } @@ -2595,8 +2595,8 @@ void SpellMgr::LoadSpellAreas() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellInfoStore() @@ -2612,8 +2612,8 @@ void SpellMgr::LoadSpellInfoStore() mSpellInfoMap[i] = new SpellInfo(spellEntry); } - sLog->outString(">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::UnloadSpellInfoStore() @@ -2925,8 +2925,8 @@ void SpellMgr::LoadSpellCustomAttr() CreatureAI::FillAISpellInfo(); - sLog->outString(">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadDbcDataCorrections() @@ -3569,6 +3569,6 @@ void SpellMgr::LoadDbcDataCorrections() properties = const_cast(sSummonPropertiesStore.LookupEntry(647)); // 52893 properties->Type = SUMMON_TYPE_TOTEM; - sLog->outString(">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 3430c1b12e3..1399934efeb 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -25,7 +25,7 @@ bool _SpellScript::_Validate(SpellInfo const* entry) { if (!Validate(entry)) { - sLog->outError("TSCR: Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str()); return false; } return true; @@ -286,27 +286,27 @@ bool SpellScript::_Validate(SpellInfo const* entry) { for (std::list::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectLaunchTarget.begin(); itr != OnEffectLaunchTarget.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectHit.begin(); itr != OnEffectHit.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectHitTarget.begin(); itr != OnEffectHitTarget.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnObjectTargetSelect.begin(); itr != OnObjectTargetSelect.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); return _SpellScript::_Validate(entry); } @@ -414,7 +414,7 @@ Unit* SpellScript::GetHitUnit() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->unitTarget; @@ -424,7 +424,7 @@ Creature* SpellScript::GetHitCreature() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (m_spell->unitTarget) @@ -437,7 +437,7 @@ Player* SpellScript::GetHitPlayer() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (m_spell->unitTarget) @@ -450,7 +450,7 @@ Item* SpellScript::GetHitItem() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->itemTarget; @@ -460,7 +460,7 @@ GameObject* SpellScript::GetHitGObj() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->gameObjTarget; @@ -470,7 +470,7 @@ WorldLocation* SpellScript::GetHitDest() { if (!IsInEffectHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->destTarget; @@ -480,7 +480,7 @@ int32 SpellScript::GetHitDamage() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return 0; } return m_spell->m_damage; @@ -490,7 +490,7 @@ void SpellScript::SetHitDamage(int32 damage) { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; } m_spell->m_damage = damage; @@ -500,7 +500,7 @@ int32 SpellScript::GetHitHeal() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return 0; } return m_spell->m_healing; @@ -510,7 +510,7 @@ void SpellScript::SetHitHeal(int32 heal) { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; } m_spell->m_healing = heal; @@ -520,7 +520,7 @@ Aura* SpellScript::GetHitAura() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (!m_spell->m_spellAura) @@ -534,7 +534,7 @@ void SpellScript::PreventHitAura() { if (!IsInTargetHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; } if (m_spell->m_spellAura) @@ -545,7 +545,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex) { if (!IsInHitPhase() && !IsInEffectHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; } m_hitPreventEffectMask |= 1 << effIndex; @@ -556,7 +556,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex) { if (!IsInHitPhase() && !IsInEffectHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; } m_hitPreventDefaultEffectMask |= 1 << effIndex; @@ -566,7 +566,7 @@ int32 SpellScript::GetEffectValue() { if (!IsInEffectHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return 0; } return m_spell->damage; @@ -597,7 +597,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result) { if (!IsInCheckCastHook()) { - sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId); return; } @@ -613,67 +613,67 @@ bool AuraScript::_Validate(SpellInfo const* entry) { for (std::list::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr) if (!entry->HasAreaAuraEffect()) - sLog->outError("TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); for (std::list::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr) if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect()) - sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); for (std::list::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr) if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect()) - sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); for (std::list::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); return _SpellScript::_Validate(entry); } @@ -855,7 +855,7 @@ void AuraScript::PreventDefaultAction() m_defaultActionPrevented = true; break; default: - sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId); break; } } @@ -1035,7 +1035,7 @@ Unit* AuraScript::GetTarget() const case AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD: return m_auraApplication->GetTarget(); default: - sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId); } return NULL; diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 2f79eaff06a..32d361faa9a 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -77,8 +77,8 @@ void CreatureTextMgr::LoadCreatureTexts() if (!result) { - sLog->outString(">> Loaded 0 ceature texts. DB table `creature_texts` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 ceature texts. DB table `creature_texts` is empty."); + return; } @@ -104,25 +104,25 @@ void CreatureTextMgr::LoadCreatureTexts() if (temp.sound) { if (!sSoundEntriesStore.LookupEntry(temp.sound)){ - sLog->outErrorDb("CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound); temp.sound = 0; } } if (!GetLanguageDescByID(temp.lang)) { - sLog->outErrorDb("CreatureTextMgr: Entry %u, Group %u in table `creature_texts` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang)); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang)); temp.lang = LANG_UNIVERSAL; } if (temp.type >= MAX_CHAT_MSG_TYPE) { - sLog->outErrorDb("CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type)); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type)); temp.type = CHAT_MSG_SAY; } if (temp.emote) { if (!sEmotesStore.LookupEntry(temp.emote)) { - sLog->outErrorDb("CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote)); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote)); temp.emote = EMOTE_ONESHOT_NONE; } } @@ -136,8 +136,8 @@ void CreatureTextMgr::LoadCreatureTexts() ++textCount; } while (result->NextRow()); - sLog->outString(">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime)); + } void CreatureTextMgr::LoadCreatureTextLocales() @@ -166,8 +166,8 @@ void CreatureTextMgr::LoadCreatureTextLocales() ++textCount; } while (result->NextRow()); - sLog->outString(">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime)); + } uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid /*= 0*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, TextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= NULL*/) @@ -178,7 +178,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp CreatureTextMap::const_iterator sList = mTextMap.find(source->GetEntry()); if (sList == mTextMap.end()) { - sLog->outErrorDb("CreatureTextMgr: Could not find Text for Creature(%s) Entry %u in 'creature_text' table. Ignoring.", source->GetName(), source->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Could not find Text for Creature(%s) Entry %u in 'creature_text' table. Ignoring.", source->GetName(), source->GetEntry()); return 0; } @@ -186,7 +186,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp CreatureTextHolder::const_iterator itr = textHolder.find(textGroup); if (itr == textHolder.end()) { - sLog->outErrorDb("CreatureTextMgr: Could not find TextGroup %u for Creature(%s) GuidLow %u Entry %u. Ignoring.", uint32(textGroup), source->GetName(), source->GetGUIDLow(), source->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Could not find TextGroup %u for Creature(%s) GuidLow %u Entry %u. Ignoring.", uint32(textGroup), source->GetName(), source->GetGUIDLow(), source->GetEntry()); return 0; } @@ -383,7 +383,7 @@ void CreatureTextMgr::SetRepeatId(Creature* source, uint8 textGroup, uint8 id) if (std::find(repeats.begin(), repeats.end(), id) == repeats.end()) repeats.push_back(id); else - sLog->outErrorDb("CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), source->GetName(), source->GetGUIDLow(), source->GetEntry(), uint32(id)); + sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), source->GetName(), source->GetGUIDLow(), source->GetEntry(), uint32(id)); } CreatureTextRepeatIds CreatureTextMgr::GetRepeatGroup(Creature* source, uint8 textGroup) diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index e43d6ca5443..aedb27a040f 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -263,8 +263,8 @@ void TicketMgr::LoadTickets() PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) { - sLog->outString(">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!"); + return; } @@ -290,8 +290,8 @@ void TicketMgr::LoadTickets() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void TicketMgr::LoadSurveys() @@ -303,8 +303,8 @@ void TicketMgr::LoadSurveys() if (QueryResult result = CharacterDatabase.Query("SELECT MAX(surveyId) FROM gm_surveys")) _lastSurveyId = (*result)[0].GetUInt32(); - sLog->outString(">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } void TicketMgr::AddTicket(GmTicket* ticket) diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index b734d90b040..0619491f364 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -29,7 +29,7 @@ void CharacterDatabaseCleaner::CleanDatabase() if (!sWorld->getBoolConfig(CONFIG_CLEAN_CHARACTER_DB)) return; - sLog->outString("Cleaning character database..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Cleaning character database..."); uint32 oldMSTime = getMSTime(); @@ -63,8 +63,8 @@ void CharacterDatabaseCleaner::CleanDatabase() sWorld->SetCleaningFlags(flags); - sLog->outString(">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32)) @@ -72,7 +72,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table QueryResult result = CharacterDatabase.PQuery("SELECT DISTINCT %s FROM %s", column, table); if (!result) { - sLog->outString("Table %s is empty.", table); + sLog->outInfo(LOG_FILTER_GENERAL, "Table %s is empty.", table); return; } diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 476a19b6885..f6d0de28d28 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -320,7 +320,7 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, uint32 guid, char const*tabl case DTT_CHARACTER: { if (result->GetFieldCount() <= 68) // avoid crashes on next check - sLog->outCrash("PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table."); + sLog->outFatal(LOG_FILTER_GENERAL, "PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table."); if (result->Fetch()[68].GetUInt32()) // characters.deleteInfos_Account - if filled error return false; @@ -496,7 +496,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s std::string tn = gettablename(line); if (tn.empty()) { - sLog->outError("LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str()); ROLLBACK(DUMP_FILE_BROKEN); } @@ -513,7 +513,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s if (i == DUMP_TABLE_COUNT) { - sLog->outError("LoadPlayerDump: Unknown table: '%s'!", tn.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "LoadPlayerDump: Unknown table: '%s'!", tn.c_str()); ROLLBACK(DUMP_FILE_BROKEN); } @@ -662,7 +662,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s break; } default: - sLog->outError("Unknown dump table type: %u", type); + sLog->outError(LOG_FILTER_GENERAL, "Unknown dump table type: %u", type); break; } diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index 54e56174b1a..06f11cfaa2c 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -105,7 +105,7 @@ void Warden::Update() // Kick player if client response delays more than set in config if (_clientResponseTimer > maxClientResponseDelay * IN_MILLISECONDS) { - sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u, latency: %u, IP: %s) exceeded Warden module response delay for more than %s - disconnecting client", + sLog->outDebug(LOG_FILTER_WARDEN, "WARDEN: Player %s (guid: %u, account: %u, latency: %u, IP: %s) exceeded Warden module response delay for more than %s - disconnecting client", _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), _session->GetLatency(), _session->GetRemoteAddress().c_str(), secsToTimeString(maxClientResponseDelay, true).c_str()); _session->KickPlayer(); diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp index 0677758439f..177f373c978 100644 --- a/src/server/game/Warden/WardenCheckMgr.cpp +++ b/src/server/game/Warden/WardenCheckMgr.cpp @@ -43,8 +43,8 @@ void WardenCheckMgr::LoadWardenChecks() // Check if Warden is enabled by config before loading anything if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED)) { - sLog->outString(">> Warden disabled, loading checks skipped."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_WARDEN, ">> Warden disabled, loading checks skipped."); + return; } @@ -52,8 +52,8 @@ void WardenCheckMgr::LoadWardenChecks() if (!result) { - sLog->outString(">> Loaded 0 Warden checks. DB table `warden_checks` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!"); + return; } @@ -145,8 +145,8 @@ void WardenCheckMgr::LoadWardenChecks() } while (result->NextRow()); - sLog->outString(">> Loaded %u warden checks.", count); - sLog->outString(); + sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded %u warden checks.", count); + } void WardenCheckMgr::LoadWardenOverrides() @@ -154,8 +154,8 @@ void WardenCheckMgr::LoadWardenOverrides() // Check if Warden is enabled by config before loading anything if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED)) { - sLog->outString(">> Warden disabled, loading check overrides skipped."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_WARDEN, ">> Warden disabled, loading check overrides skipped."); + return; } @@ -164,8 +164,8 @@ void WardenCheckMgr::LoadWardenOverrides() if (!result) { - sLog->outString(">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!"); + return; } @@ -182,10 +182,10 @@ void WardenCheckMgr::LoadWardenOverrides() // Check if action value is in range (0-2, see WardenActions enum) if (action > WARDEN_ACTION_BAN) - sLog->outError("Warden check override action out of range (ID: %u, action: %u)", checkId, action); + sLog->outError(LOG_FILTER_WARDEN, "Warden check override action out of range (ID: %u, action: %u)", checkId, action); // Check if check actually exists before accessing the CheckStore vector else if (checkId > CheckStore.size()) - sLog->outError("Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action); + sLog->outError(LOG_FILTER_WARDEN, "Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action); else { CheckStore[checkId]->Action = WardenActions(action); @@ -194,8 +194,8 @@ void WardenCheckMgr::LoadWardenOverrides() } while (result->NextRow()); - sLog->outString(">> Loaded %u warden action overrides.", count); - sLog->outString(); + sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded %u warden action overrides.", count); + } WardenCheck* WardenCheckMgr::GetWardenDataById(uint16 Id) diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp index 3cc95b9f3f7..96b71912421 100644 --- a/src/server/game/Warden/WardenMac.cpp +++ b/src/server/game/Warden/WardenMac.cpp @@ -153,7 +153,7 @@ void WardenMac::HandleHashResult(ByteBuffer &buff) if (memcmp(buff.contents() + 1, sha1.GetDigest(), 20) != 0) { sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed"); - sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed hash reply. Action: %s", + sLog->outDebug(LOG_FILTER_WARDEN, "WARDEN: Player %s (guid: %u, account: %u) failed hash reply. Action: %s", _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str()); return; } diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp index 9aa439ec8c0..7aea6794e01 100644 --- a/src/server/game/Warden/WardenWin.cpp +++ b/src/server/game/Warden/WardenWin.cpp @@ -157,7 +157,7 @@ void WardenWin::HandleHashResult(ByteBuffer &buff) if (memcmp(buff.contents() + 1, Module.ClientKeySeedHash, 20) != 0) { sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed"); - sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed hash reply. Action: %s", + sLog->outDebug(LOG_FILTER_WARDEN, "WARDEN: Player %s (guid: %u, account: %u) failed hash reply. Action: %s", _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str()); return; } @@ -344,7 +344,7 @@ void WardenWin::HandleData(ByteBuffer &buff) { buff.rpos(buff.wpos()); sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM FAIL"); - sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed checksum. Action: %s", + sLog->outDebug(LOG_FILTER_WARDEN, "WARDEN: Player %s (guid: %u, account: %u) failed checksum. Action: %s", _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str()); return; } @@ -357,7 +357,7 @@ void WardenWin::HandleData(ByteBuffer &buff) if (result == 0x00) { sLog->outDebug(LOG_FILTER_WARDEN, "TIMING CHECK FAIL result 0x00"); - sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed timing check. Action: %s", + sLog->outDebug(LOG_FILTER_WARDEN, "WARDEN: Player %s (guid: %u, account: %u) failed timing check. Action: %s", _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str()); return; } @@ -501,7 +501,7 @@ void WardenWin::HandleData(ByteBuffer &buff) { WardenCheck* check = sWardenCheckMgr->GetWardenDataById(checkFailed); - sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed Warden check %u. Action: %s", + sLog->outDebug(LOG_FILTER_WARDEN, "WARDEN: Player %s (guid: %u, account: %u) failed Warden check %u. Action: %s", _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), checkFailed, Penalty(check).c_str()); } diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 965e6bf3805..896e7161606 100755 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -37,7 +37,7 @@ Weather::Weather(uint32 zone, WeatherData const* weatherChances) m_type = WEATHER_TYPE_FINE; m_grade = 0; - sLog->outDetail("WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS))); + sLog->outInfo(LOG_FILTER_GENERAL, "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS))); } /// Launch a weather update @@ -97,7 +97,7 @@ bool Weather::ReGenerate() static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" }; - sLog->outDetail("Generating a change in %s weather for zone %u.", seasonName[season], m_zone); + sLog->outInfo(LOG_FILTER_GENERAL, "Generating a change in %s weather for zone %u.", seasonName[season], m_zone); if ((u < 60) && (m_grade < 0.33333334f)) // Get fair { @@ -258,7 +258,7 @@ bool Weather::UpdateWeather() wthstr = "fine"; break; } - sLog->outDetail("Change the weather of zone %u to %s.", m_zone, wthstr); + sLog->outInfo(LOG_FILTER_GENERAL, "Change the weather of zone %u to %s.", m_zone, wthstr); sScriptMgr->OnWeatherChange(this, state, m_grade); return true; diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index bb8fadf08bc..150e9f845ec 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -93,8 +93,8 @@ void LoadWeatherData() if (!result) { - sLog->outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty."); - sLog->outString(); + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 weather definitions. DB table `game_weather` is empty."); + return; } @@ -115,19 +115,19 @@ void LoadWeatherData() if (wzc.data[season].rainChance > 100) { wzc.data[season].rainChance = 25; - sLog->outErrorDb("Weather for zone %u season %u has wrong rain chance > 100%%", zone_id, season); + sLog->outError(LOG_FILTER_SQL, "Weather for zone %u season %u has wrong rain chance > 100%%", zone_id, season); } if (wzc.data[season].snowChance > 100) { wzc.data[season].snowChance = 25; - sLog->outErrorDb("Weather for zone %u season %u has wrong snow chance > 100%%", zone_id, season); + sLog->outError(LOG_FILTER_SQL, "Weather for zone %u season %u has wrong snow chance > 100%%", zone_id, season); } if (wzc.data[season].stormChance > 100) { wzc.data[season].stormChance = 25; - sLog->outErrorDb("Weather for zone %u season %u has wrong storm chance > 100%%", zone_id, season); + sLog->outError(LOG_FILTER_SQL, "Weather for zone %u season %u has wrong storm chance > 100%%", zone_id, season); } } @@ -137,8 +137,8 @@ void LoadWeatherData() } while (result->NextRow()); - sLog->outString(">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SendFineWeatherUpdateToPlayer(Player* player) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 94e42f26dbd..717cfd67ac6 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -267,7 +267,7 @@ void World::AddSession_(WorldSession* s) { AddQueuedPlayer (s); UpdateMaxSessionCounters(); - sLog->outDetail("PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize); + sLog->outInfo(LOG_FILTER_GENERAL, "PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize); return; } @@ -284,7 +284,7 @@ void World::AddSession_(WorldSession* s) float popu = (float)GetActiveSessionCount(); // updated number of users on the server popu /= pLimit; popu *= 2; - sLog->outDetail("Server Population (%f).", popu); + sLog->outInfo(LOG_FILTER_GENERAL, "Server Population (%f).", popu); } } @@ -395,11 +395,9 @@ void World::LoadConfigSettings(bool reload) { if (!ConfigMgr::Load()) { - sLog->outError("World settings reload fail: can't read settings from %s.", ConfigMgr::GetFilename().c_str()); + sLog->outError(LOG_FILTER_GENERAL, "World settings reload fail: can't read settings from %s.", ConfigMgr::GetFilename().c_str()); return; } - - sLog->ReloadConfig(); // Reload log levels and filters } ///- Read the player limit and the Message of the day from the config file @@ -419,27 +417,27 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_HEALTH] = ConfigMgr::GetFloatDefault("Rate.Health", 1); if (rate_values[RATE_HEALTH] < 0) { - sLog->outError("Rate.Health (%f) must be > 0. Using 1 instead.", rate_values[RATE_HEALTH]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.Health (%f) must be > 0. Using 1 instead.", rate_values[RATE_HEALTH]); rate_values[RATE_HEALTH] = 1; } rate_values[RATE_POWER_MANA] = ConfigMgr::GetFloatDefault("Rate.Mana", 1); if (rate_values[RATE_POWER_MANA] < 0) { - sLog->outError("Rate.Mana (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_MANA]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.Mana (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_MANA]); rate_values[RATE_POWER_MANA] = 1; } rate_values[RATE_POWER_RAGE_INCOME] = ConfigMgr::GetFloatDefault("Rate.Rage.Income", 1); rate_values[RATE_POWER_RAGE_LOSS] = ConfigMgr::GetFloatDefault("Rate.Rage.Loss", 1); if (rate_values[RATE_POWER_RAGE_LOSS] < 0) { - sLog->outError("Rate.Rage.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RAGE_LOSS]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.Rage.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RAGE_LOSS]); rate_values[RATE_POWER_RAGE_LOSS] = 1; } rate_values[RATE_POWER_RUNICPOWER_INCOME] = ConfigMgr::GetFloatDefault("Rate.RunicPower.Income", 1); rate_values[RATE_POWER_RUNICPOWER_LOSS] = ConfigMgr::GetFloatDefault("Rate.RunicPower.Loss", 1); if (rate_values[RATE_POWER_RUNICPOWER_LOSS] < 0) { - sLog->outError("Rate.RunicPower.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RUNICPOWER_LOSS]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.RunicPower.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RUNICPOWER_LOSS]); rate_values[RATE_POWER_RUNICPOWER_LOSS] = 1; } rate_values[RATE_POWER_FOCUS] = ConfigMgr::GetFloatDefault("Rate.Focus", 1.0f); @@ -463,7 +461,7 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_REPAIRCOST] = ConfigMgr::GetFloatDefault("Rate.RepairCost", 1.0f); if (rate_values[RATE_REPAIRCOST] < 0.0f) { - sLog->outError("Rate.RepairCost (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_REPAIRCOST]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.RepairCost (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_REPAIRCOST]); rate_values[RATE_REPAIRCOST] = 0.0f; } rate_values[RATE_REPUTATION_GAIN] = ConfigMgr::GetFloatDefault("Rate.Reputation.Gain", 1.0f); @@ -500,13 +498,13 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_TALENT] = ConfigMgr::GetFloatDefault("Rate.Talent", 1.0f); if (rate_values[RATE_TALENT] < 0.0f) { - sLog->outError("Rate.Talent (%f) must be > 0. Using 1 instead.", rate_values[RATE_TALENT]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.Talent (%f) must be > 0. Using 1 instead.", rate_values[RATE_TALENT]); rate_values[RATE_TALENT] = 1.0f; } rate_values[RATE_MOVESPEED] = ConfigMgr::GetFloatDefault("Rate.MoveSpeed", 1.0f); if (rate_values[RATE_MOVESPEED] < 0) { - sLog->outError("Rate.MoveSpeed (%f) must be > 0. Using 1 instead.", rate_values[RATE_MOVESPEED]); + sLog->outError(LOG_FILTER_GENERAL, "Rate.MoveSpeed (%f) must be > 0. Using 1 instead.", rate_values[RATE_MOVESPEED]); rate_values[RATE_MOVESPEED] = 1.0f; } for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i) playerBaseMoveSpeed[i] = baseMoveSpeed[i] * rate_values[RATE_MOVESPEED]; @@ -515,12 +513,12 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = ConfigMgr::GetFloatDefault("TargetPosRecalculateRange", 1.5f); if (rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] < CONTACT_DISTANCE) { - sLog->outError("TargetPosRecalculateRange (%f) must be >= %f. Using %f instead.", rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE); + sLog->outError(LOG_FILTER_GENERAL, "TargetPosRecalculateRange (%f) must be >= %f. Using %f instead.", rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE); rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = CONTACT_DISTANCE; } else if (rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] > NOMINAL_MELEE_RANGE) { - sLog->outError("TargetPosRecalculateRange (%f) must be <= %f. Using %f instead.", + sLog->outError(LOG_FILTER_GENERAL, "TargetPosRecalculateRange (%f) must be <= %f. Using %f instead.", rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], NOMINAL_MELEE_RANGE, NOMINAL_MELEE_RANGE); rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = NOMINAL_MELEE_RANGE; } @@ -528,12 +526,12 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = ConfigMgr::GetFloatDefault("DurabilityLoss.OnDeath", 10.0f); if (rate_values[RATE_DURABILITY_LOSS_ON_DEATH] < 0.0f) { - sLog->outError("DurabilityLoss.OnDeath (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]); + sLog->outError(LOG_FILTER_GENERAL, "DurabilityLoss.OnDeath (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]); rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = 0.0f; } if (rate_values[RATE_DURABILITY_LOSS_ON_DEATH] > 100.0f) { - sLog->outError("DurabilityLoss.OnDeath (%f) must be <= 100. Using 100.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]); + sLog->outError(LOG_FILTER_GENERAL, "DurabilityLoss.OnDeath (%f) must be <= 100. Using 100.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]); rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = 0.0f; } rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = rate_values[RATE_DURABILITY_LOSS_ON_DEATH] / 100.0f; @@ -541,25 +539,25 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_DURABILITY_LOSS_DAMAGE] = ConfigMgr::GetFloatDefault("DurabilityLossChance.Damage", 0.5f); if (rate_values[RATE_DURABILITY_LOSS_DAMAGE] < 0.0f) { - sLog->outError("DurabilityLossChance.Damage (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_DAMAGE]); + sLog->outError(LOG_FILTER_GENERAL, "DurabilityLossChance.Damage (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_DAMAGE]); rate_values[RATE_DURABILITY_LOSS_DAMAGE] = 0.0f; } rate_values[RATE_DURABILITY_LOSS_ABSORB] = ConfigMgr::GetFloatDefault("DurabilityLossChance.Absorb", 0.5f); if (rate_values[RATE_DURABILITY_LOSS_ABSORB] < 0.0f) { - sLog->outError("DurabilityLossChance.Absorb (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ABSORB]); + sLog->outError(LOG_FILTER_GENERAL, "DurabilityLossChance.Absorb (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ABSORB]); rate_values[RATE_DURABILITY_LOSS_ABSORB] = 0.0f; } rate_values[RATE_DURABILITY_LOSS_PARRY] = ConfigMgr::GetFloatDefault("DurabilityLossChance.Parry", 0.05f); if (rate_values[RATE_DURABILITY_LOSS_PARRY] < 0.0f) { - sLog->outError("DurabilityLossChance.Parry (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_PARRY]); + sLog->outError(LOG_FILTER_GENERAL, "DurabilityLossChance.Parry (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_PARRY]); rate_values[RATE_DURABILITY_LOSS_PARRY] = 0.0f; } rate_values[RATE_DURABILITY_LOSS_BLOCK] = ConfigMgr::GetFloatDefault("DurabilityLossChance.Block", 0.05f); if (rate_values[RATE_DURABILITY_LOSS_BLOCK] < 0.0f) { - sLog->outError("DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_BLOCK]); + sLog->outError(LOG_FILTER_GENERAL, "DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_BLOCK]); rate_values[RATE_DURABILITY_LOSS_BLOCK] = 0.0f; } ///- Read other configuration items from the config file @@ -569,7 +567,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_COMPRESSION] = ConfigMgr::GetIntDefault("Compression", 1); if (m_int_configs[CONFIG_COMPRESSION] < 1 || m_int_configs[CONFIG_COMPRESSION] > 9) { - sLog->outError("Compression level (%i) must be in range 1..9. Using default compression level (1).", m_int_configs[CONFIG_COMPRESSION]); + sLog->outError(LOG_FILTER_GENERAL, "Compression level (%i) must be in range 1..9. Using default compression level (1).", m_int_configs[CONFIG_COMPRESSION]); m_int_configs[CONFIG_COMPRESSION] = 1; } m_bool_configs[CONFIG_ADDON_CHANNEL] = ConfigMgr::GetBoolDefault("AddonChannel", true); @@ -593,14 +591,14 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = ConfigMgr::GetIntDefault("PlayerSave.Stats.MinLevel", 0); if (m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] > MAX_LEVEL) { - sLog->outError("PlayerSave.Stats.MinLevel (%i) must be in range 0..80. Using default, do not save character stats (0).", m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]); + sLog->outError(LOG_FILTER_GENERAL, "PlayerSave.Stats.MinLevel (%i) must be in range 0..80. Using default, do not save character stats (0).", m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]); m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0; } m_int_configs[CONFIG_INTERVAL_GRIDCLEAN] = ConfigMgr::GetIntDefault("GridCleanUpDelay", 5 * MINUTE * IN_MILLISECONDS); if (m_int_configs[CONFIG_INTERVAL_GRIDCLEAN] < MIN_GRID_DELAY) { - sLog->outError("GridCleanUpDelay (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY); + sLog->outError(LOG_FILTER_GENERAL, "GridCleanUpDelay (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY); m_int_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY; } if (reload) @@ -609,7 +607,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_INTERVAL_MAPUPDATE] = ConfigMgr::GetIntDefault("MapUpdateInterval", 100); if (m_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY) { - sLog->outError("MapUpdateInterval (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY); + sLog->outError(LOG_FILTER_GENERAL, "MapUpdateInterval (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY); m_int_configs[CONFIG_INTERVAL_MAPUPDATE] = MIN_MAP_UPDATE_DELAY; } if (reload) @@ -621,7 +619,7 @@ void World::LoadConfigSettings(bool reload) { uint32 val = ConfigMgr::GetIntDefault("WorldServerPort", 8085); if (val != m_int_configs[CONFIG_PORT_WORLD]) - sLog->outError("WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_PORT_WORLD]); + sLog->outError(LOG_FILTER_GENERAL, "WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_PORT_WORLD]); } else m_int_configs[CONFIG_PORT_WORLD] = ConfigMgr::GetIntDefault("WorldServerPort", 8085); @@ -640,7 +638,7 @@ void World::LoadConfigSettings(bool reload) { uint32 val = ConfigMgr::GetIntDefault("GameType", 0); if (val != m_int_configs[CONFIG_GAME_TYPE]) - sLog->outError("GameType option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_GAME_TYPE]); + sLog->outError(LOG_FILTER_GENERAL, "GameType option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_GAME_TYPE]); } else m_int_configs[CONFIG_GAME_TYPE] = ConfigMgr::GetIntDefault("GameType", 0); @@ -649,7 +647,7 @@ void World::LoadConfigSettings(bool reload) { uint32 val = ConfigMgr::GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT); if (val != m_int_configs[CONFIG_REALM_ZONE]) - sLog->outError("RealmZone option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_REALM_ZONE]); + sLog->outError(LOG_FILTER_GENERAL, "RealmZone option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_REALM_ZONE]); } else m_int_configs[CONFIG_REALM_ZONE] = ConfigMgr::GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT); @@ -671,21 +669,21 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MIN_PLAYER_NAME] = ConfigMgr::GetIntDefault ("MinPlayerName", 2); if (m_int_configs[CONFIG_MIN_PLAYER_NAME] < 1 || m_int_configs[CONFIG_MIN_PLAYER_NAME] > MAX_PLAYER_NAME) { - sLog->outError("MinPlayerName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PLAYER_NAME], MAX_PLAYER_NAME); + sLog->outError(LOG_FILTER_GENERAL, "MinPlayerName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PLAYER_NAME], MAX_PLAYER_NAME); m_int_configs[CONFIG_MIN_PLAYER_NAME] = 2; } m_int_configs[CONFIG_MIN_CHARTER_NAME] = ConfigMgr::GetIntDefault ("MinCharterName", 2); if (m_int_configs[CONFIG_MIN_CHARTER_NAME] < 1 || m_int_configs[CONFIG_MIN_CHARTER_NAME] > MAX_CHARTER_NAME) { - sLog->outError("MinCharterName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_CHARTER_NAME], MAX_CHARTER_NAME); + sLog->outError(LOG_FILTER_GENERAL, "MinCharterName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_CHARTER_NAME], MAX_CHARTER_NAME); m_int_configs[CONFIG_MIN_CHARTER_NAME] = 2; } m_int_configs[CONFIG_MIN_PET_NAME] = ConfigMgr::GetIntDefault ("MinPetName", 2); if (m_int_configs[CONFIG_MIN_PET_NAME] < 1 || m_int_configs[CONFIG_MIN_PET_NAME] > MAX_PET_NAME) { - sLog->outError("MinPetName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PET_NAME], MAX_PET_NAME); + sLog->outError(LOG_FILTER_GENERAL, "MinPetName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PET_NAME], MAX_PET_NAME); m_int_configs[CONFIG_MIN_PET_NAME] = 2; } @@ -696,7 +694,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_CHARACTERS_PER_REALM] = ConfigMgr::GetIntDefault("CharactersPerRealm", 10); if (m_int_configs[CONFIG_CHARACTERS_PER_REALM] < 1 || m_int_configs[CONFIG_CHARACTERS_PER_REALM] > 10) { - sLog->outError("CharactersPerRealm (%i) must be in range 1..10. Set to 10.", m_int_configs[CONFIG_CHARACTERS_PER_REALM]); + sLog->outError(LOG_FILTER_GENERAL, "CharactersPerRealm (%i) must be in range 1..10. Set to 10.", m_int_configs[CONFIG_CHARACTERS_PER_REALM]); m_int_configs[CONFIG_CHARACTERS_PER_REALM] = 10; } @@ -704,14 +702,14 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = ConfigMgr::GetIntDefault("CharactersPerAccount", 50); if (m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < m_int_configs[CONFIG_CHARACTERS_PER_REALM]) { - sLog->outError("CharactersPerAccount (%i) can't be less than CharactersPerRealm (%i).", m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT], m_int_configs[CONFIG_CHARACTERS_PER_REALM]); + sLog->outError(LOG_FILTER_GENERAL, "CharactersPerAccount (%i) can't be less than CharactersPerRealm (%i).", m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT], m_int_configs[CONFIG_CHARACTERS_PER_REALM]); m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = m_int_configs[CONFIG_CHARACTERS_PER_REALM]; } m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = ConfigMgr::GetIntDefault("HeroicCharactersPerRealm", 1); if (int32(m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]) < 0 || m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10) { - sLog->outError("HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.", m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]); + sLog->outError(LOG_FILTER_GENERAL, "HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.", m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]); m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1; } @@ -720,7 +718,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_SKIP_CINEMATICS] = ConfigMgr::GetIntDefault("SkipCinematics", 0); if (int32(m_int_configs[CONFIG_SKIP_CINEMATICS]) < 0 || m_int_configs[CONFIG_SKIP_CINEMATICS] > 2) { - sLog->outError("SkipCinematics (%i) must be in range 0..2. Set to 0.", m_int_configs[CONFIG_SKIP_CINEMATICS]); + sLog->outError(LOG_FILTER_GENERAL, "SkipCinematics (%i) must be in range 0..2. Set to 0.", m_int_configs[CONFIG_SKIP_CINEMATICS]); m_int_configs[CONFIG_SKIP_CINEMATICS] = 0; } @@ -728,14 +726,14 @@ void World::LoadConfigSettings(bool reload) { uint32 val = ConfigMgr::GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL); if (val != m_int_configs[CONFIG_MAX_PLAYER_LEVEL]) - sLog->outError("MaxPlayerLevel option can't be changed at config reload, using current value (%u).", m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); + sLog->outError(LOG_FILTER_GENERAL, "MaxPlayerLevel option can't be changed at config reload, using current value (%u).", m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); } else m_int_configs[CONFIG_MAX_PLAYER_LEVEL] = ConfigMgr::GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL); if (m_int_configs[CONFIG_MAX_PLAYER_LEVEL] > MAX_LEVEL) { - sLog->outError("MaxPlayerLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_MAX_PLAYER_LEVEL], MAX_LEVEL, MAX_LEVEL); + sLog->outError(LOG_FILTER_GENERAL, "MaxPlayerLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_MAX_PLAYER_LEVEL], MAX_LEVEL, MAX_LEVEL); m_int_configs[CONFIG_MAX_PLAYER_LEVEL] = MAX_LEVEL; } @@ -744,25 +742,25 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_START_PLAYER_LEVEL] = ConfigMgr::GetIntDefault("StartPlayerLevel", 1); if (m_int_configs[CONFIG_START_PLAYER_LEVEL] < 1) { - sLog->outError("StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 1.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); + sLog->outError(LOG_FILTER_GENERAL, "StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 1.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); m_int_configs[CONFIG_START_PLAYER_LEVEL] = 1; } else if (m_int_configs[CONFIG_START_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL]) { - sLog->outError("StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); + sLog->outError(LOG_FILTER_GENERAL, "StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); m_int_configs[CONFIG_START_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL]; } m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = ConfigMgr::GetIntDefault("StartHeroicPlayerLevel", 55); if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] < 1) { - sLog->outError("StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.", + sLog->outError(LOG_FILTER_GENERAL, "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.", m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = 55; } else if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL]) { - sLog->outError("StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.", m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]); m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL]; } @@ -770,12 +768,12 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_START_PLAYER_MONEY] = ConfigMgr::GetIntDefault("StartPlayerMoney", 0); if (int32(m_int_configs[CONFIG_START_PLAYER_MONEY]) < 0) { - sLog->outError("StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0); + sLog->outError(LOG_FILTER_GENERAL, "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0); m_int_configs[CONFIG_START_PLAYER_MONEY] = 0; } else if (m_int_configs[CONFIG_START_PLAYER_MONEY] > MAX_MONEY_AMOUNT) { - sLog->outError("StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, MAX_MONEY_AMOUNT); m_int_configs[CONFIG_START_PLAYER_MONEY] = MAX_MONEY_AMOUNT; } @@ -783,20 +781,20 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MAX_HONOR_POINTS] = ConfigMgr::GetIntDefault("MaxHonorPoints", 75000); if (int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]) < 0) { - sLog->outError("MaxHonorPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS]); + sLog->outError(LOG_FILTER_GENERAL, "MaxHonorPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS]); m_int_configs[CONFIG_MAX_HONOR_POINTS] = 0; } m_int_configs[CONFIG_START_HONOR_POINTS] = ConfigMgr::GetIntDefault("StartHonorPoints", 0); if (int32(m_int_configs[CONFIG_START_HONOR_POINTS]) < 0) { - sLog->outError("StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.", m_int_configs[CONFIG_START_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS], 0); m_int_configs[CONFIG_START_HONOR_POINTS] = 0; } else if (m_int_configs[CONFIG_START_HONOR_POINTS] > m_int_configs[CONFIG_MAX_HONOR_POINTS]) { - sLog->outError("StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.", m_int_configs[CONFIG_START_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS]); m_int_configs[CONFIG_START_HONOR_POINTS] = m_int_configs[CONFIG_MAX_HONOR_POINTS]; } @@ -804,20 +802,20 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MAX_ARENA_POINTS] = ConfigMgr::GetIntDefault("MaxArenaPoints", 10000); if (int32(m_int_configs[CONFIG_MAX_ARENA_POINTS]) < 0) { - sLog->outError("MaxArenaPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_ARENA_POINTS]); + sLog->outError(LOG_FILTER_GENERAL, "MaxArenaPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_ARENA_POINTS]); m_int_configs[CONFIG_MAX_ARENA_POINTS] = 0; } m_int_configs[CONFIG_START_ARENA_POINTS] = ConfigMgr::GetIntDefault("StartArenaPoints", 0); if (int32(m_int_configs[CONFIG_START_ARENA_POINTS]) < 0) { - sLog->outError("StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.", m_int_configs[CONFIG_START_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS], 0); m_int_configs[CONFIG_START_ARENA_POINTS] = 0; } else if (m_int_configs[CONFIG_START_ARENA_POINTS] > m_int_configs[CONFIG_MAX_ARENA_POINTS]) { - sLog->outError("StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.", m_int_configs[CONFIG_START_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS]); m_int_configs[CONFIG_START_ARENA_POINTS] = m_int_configs[CONFIG_MAX_ARENA_POINTS]; } @@ -825,7 +823,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] = ConfigMgr::GetIntDefault("RecruitAFriend.MaxLevel", 60); if (m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL]) { - sLog->outError("RecruitAFriend.MaxLevel (%i) must be in the range 0..MaxLevel(%u). Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "RecruitAFriend.MaxLevel (%i) must be in the range 0..MaxLevel(%u). Set to %u.", m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], 60); m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] = 60; } @@ -845,7 +843,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MIN_PETITION_SIGNS] = ConfigMgr::GetIntDefault("MinPetitionSigns", 9); if (m_int_configs[CONFIG_MIN_PETITION_SIGNS] > 9) { - sLog->outError("MinPetitionSigns (%i) must be in range 0..9. Set to 9.", m_int_configs[CONFIG_MIN_PETITION_SIGNS]); + sLog->outError(LOG_FILTER_GENERAL, "MinPetitionSigns (%i) must be in range 0..9. Set to 9.", m_int_configs[CONFIG_MIN_PETITION_SIGNS]); m_int_configs[CONFIG_MIN_PETITION_SIGNS] = 9; } @@ -860,13 +858,13 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_START_GM_LEVEL] = ConfigMgr::GetIntDefault("GM.StartLevel", 1); if (m_int_configs[CONFIG_START_GM_LEVEL] < m_int_configs[CONFIG_START_PLAYER_LEVEL]) { - sLog->outError("GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..%u. Set to %u.", + sLog->outError(LOG_FILTER_GENERAL, "GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..%u. Set to %u.", m_int_configs[CONFIG_START_GM_LEVEL], m_int_configs[CONFIG_START_PLAYER_LEVEL], MAX_LEVEL, m_int_configs[CONFIG_START_PLAYER_LEVEL]); m_int_configs[CONFIG_START_GM_LEVEL] = m_int_configs[CONFIG_START_PLAYER_LEVEL]; } else if (m_int_configs[CONFIG_START_GM_LEVEL] > MAX_LEVEL) { - sLog->outError("GM.StartLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_START_GM_LEVEL], MAX_LEVEL, MAX_LEVEL); + sLog->outError(LOG_FILTER_GENERAL, "GM.StartLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_START_GM_LEVEL], MAX_LEVEL, MAX_LEVEL); m_int_configs[CONFIG_START_GM_LEVEL] = MAX_LEVEL; } m_bool_configs[CONFIG_ALLOW_GM_GROUP] = ConfigMgr::GetBoolDefault("GM.AllowInvite", false); @@ -881,7 +879,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_UPTIME_UPDATE] = ConfigMgr::GetIntDefault("UpdateUptimeInterval", 10); if (int32(m_int_configs[CONFIG_UPTIME_UPDATE]) <= 0) { - sLog->outError("UpdateUptimeInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_UPTIME_UPDATE]); + sLog->outError(LOG_FILTER_GENERAL, "UpdateUptimeInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_UPTIME_UPDATE]); m_int_configs[CONFIG_UPTIME_UPDATE] = 10; } if (reload) @@ -894,7 +892,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_LOGDB_CLEARINTERVAL] = ConfigMgr::GetIntDefault("LogDB.Opt.ClearInterval", 10); if (int32(m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]) <= 0) { - sLog->outError("LogDB.Opt.ClearInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]); + sLog->outError(LOG_FILTER_GENERAL, "LogDB.Opt.ClearInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]); m_int_configs[CONFIG_LOGDB_CLEARINTERVAL] = 10; } if (reload) @@ -903,7 +901,7 @@ void World::LoadConfigSettings(bool reload) m_timers[WUPDATE_CLEANDB].Reset(); } m_int_configs[CONFIG_LOGDB_CLEARTIME] = ConfigMgr::GetIntDefault("LogDB.Opt.ClearTime", 1209600); // 14 days default - sLog->outString("Will clear `logs` table of entries older than %i seconds every %u minutes.", + sLog->outInfo(LOG_FILTER_GENERAL, "Will clear `logs` table of entries older than %i seconds every %u minutes.", m_int_configs[CONFIG_LOGDB_CLEARTIME], m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]); m_int_configs[CONFIG_SKILL_CHANCE_ORANGE] = ConfigMgr::GetIntDefault("SkillChance.Orange", 100); @@ -928,7 +926,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] = ConfigMgr::GetIntDefault("MaxOverspeedPings", 2); if (m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] != 0 && m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] < 2) { - sLog->outError("MaxOverspeedPings (%i) must be in range 2..infinity (or 0 to disable check). Set to 2.", m_int_configs[CONFIG_MAX_OVERSPEED_PINGS]); + sLog->outError(LOG_FILTER_GENERAL, "MaxOverspeedPings (%i) must be in range 2..infinity (or 0 to disable check). Set to 2.", m_int_configs[CONFIG_MAX_OVERSPEED_PINGS]); m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] = 2; } @@ -943,7 +941,7 @@ void World::LoadConfigSettings(bool reload) { uint32 val = ConfigMgr::GetIntDefault("Expansion", 1); if (val != m_int_configs[CONFIG_EXPANSION]) - sLog->outError("Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]); + sLog->outError(LOG_FILTER_GENERAL, "Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]); } else m_int_configs[CONFIG_EXPANSION] = ConfigMgr::GetIntDefault("Expansion", 1); @@ -975,7 +973,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = ConfigMgr::GetIntDefault("Battleground.Random.ResetHour", 6); if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23) { - sLog->outError("Battleground.Random.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR]); + sLog->outError(LOG_FILTER_GENERAL, "Battleground.Random.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR]); m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = 6; } @@ -1042,10 +1040,10 @@ void World::LoadConfigSettings(bool reload) if (clientCacheId > 0) { m_int_configs[CONFIG_CLIENTCACHE_VERSION] = clientCacheId; - sLog->outString("Client cache version set to: %u", clientCacheId); + sLog->outInfo(LOG_FILTER_GENERAL, "Client cache version set to: %u", clientCacheId); } else - sLog->outError("ClientCacheVersion can't be negative %d, ignored.", clientCacheId); + sLog->outError(LOG_FILTER_GENERAL, "ClientCacheVersion can't be negative %d, ignored.", clientCacheId); } m_int_configs[CONFIG_INSTANT_LOGOUT] = ConfigMgr::GetIntDefault("InstantLogout", SEC_MODERATOR); @@ -1061,12 +1059,12 @@ void World::LoadConfigSettings(bool reload) m_MaxVisibleDistanceOnContinents = ConfigMgr::GetFloatDefault("Visibility.Distance.Continents", DEFAULT_VISIBILITY_DISTANCE); if (m_MaxVisibleDistanceOnContinents < 45*sWorld->getRate(RATE_CREATURE_AGGRO)) { - sLog->outError("Visibility.Distance.Continents can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO)); + sLog->outError(LOG_FILTER_GENERAL, "Visibility.Distance.Continents can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO)); m_MaxVisibleDistanceOnContinents = 45*sWorld->getRate(RATE_CREATURE_AGGRO); } else if (m_MaxVisibleDistanceOnContinents > MAX_VISIBILITY_DISTANCE) { - sLog->outError("Visibility.Distance.Continents can't be greater %f", MAX_VISIBILITY_DISTANCE); + sLog->outError(LOG_FILTER_GENERAL, "Visibility.Distance.Continents can't be greater %f", MAX_VISIBILITY_DISTANCE); m_MaxVisibleDistanceOnContinents = MAX_VISIBILITY_DISTANCE; } @@ -1074,12 +1072,12 @@ void World::LoadConfigSettings(bool reload) m_MaxVisibleDistanceInInstances = ConfigMgr::GetFloatDefault("Visibility.Distance.Instances", DEFAULT_VISIBILITY_INSTANCE); if (m_MaxVisibleDistanceInInstances < 45*sWorld->getRate(RATE_CREATURE_AGGRO)) { - sLog->outError("Visibility.Distance.Instances can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO)); + sLog->outError(LOG_FILTER_GENERAL, "Visibility.Distance.Instances can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO)); m_MaxVisibleDistanceInInstances = 45*sWorld->getRate(RATE_CREATURE_AGGRO); } else if (m_MaxVisibleDistanceInInstances > MAX_VISIBILITY_DISTANCE) { - sLog->outError("Visibility.Distance.Instances can't be greater %f", MAX_VISIBILITY_DISTANCE); + sLog->outError(LOG_FILTER_GENERAL, "Visibility.Distance.Instances can't be greater %f", MAX_VISIBILITY_DISTANCE); m_MaxVisibleDistanceInInstances = MAX_VISIBILITY_DISTANCE; } @@ -1087,12 +1085,12 @@ void World::LoadConfigSettings(bool reload) m_MaxVisibleDistanceInBGArenas = ConfigMgr::GetFloatDefault("Visibility.Distance.BGArenas", DEFAULT_VISIBILITY_BGARENAS); if (m_MaxVisibleDistanceInBGArenas < 45*sWorld->getRate(RATE_CREATURE_AGGRO)) { - sLog->outError("Visibility.Distance.BGArenas can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO)); + sLog->outError(LOG_FILTER_GENERAL, "Visibility.Distance.BGArenas can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO)); m_MaxVisibleDistanceInBGArenas = 45*sWorld->getRate(RATE_CREATURE_AGGRO); } else if (m_MaxVisibleDistanceInBGArenas > MAX_VISIBILITY_DISTANCE) { - sLog->outError("Visibility.Distance.BGArenas can't be greater %f", MAX_VISIBILITY_DISTANCE); + sLog->outError(LOG_FILTER_GENERAL, "Visibility.Distance.BGArenas can't be greater %f", MAX_VISIBILITY_DISTANCE); m_MaxVisibleDistanceInBGArenas = MAX_VISIBILITY_DISTANCE; } @@ -1113,12 +1111,12 @@ void World::LoadConfigSettings(bool reload) if (reload) { if (dataPath != m_dataPath) - sLog->outError("DataDir option can't be changed at worldserver.conf reload, using current value (%s).", m_dataPath.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "DataDir option can't be changed at worldserver.conf reload, using current value (%s).", m_dataPath.c_str()); } else { m_dataPath = dataPath; - sLog->outString("Using DataDir %s", m_dataPath.c_str()); + sLog->outInfo(LOG_FILTER_GENERAL, "Using DataDir %s", m_dataPath.c_str()); } m_bool_configs[CONFIG_VMAP_INDOOR_CHECK] = ConfigMgr::GetBoolDefault("vmap.enableIndoorCheck", 0); @@ -1129,19 +1127,19 @@ void World::LoadConfigSettings(bool reload) std::string ignoreSpellIds = ConfigMgr::GetStringDefault("vmap.ignoreSpellIds", ""); if (!enableHeight) - sLog->outError("VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support."); + sLog->outError(LOG_FILTER_GENERAL, "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support."); VMAP::VMapFactory::createOrGetVMapManager()->setEnableLineOfSightCalc(enableLOS); VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight); VMAP::VMapFactory::preventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str()); - sLog->outString("WORLD: VMap support included. LineOfSight:%i, getHeight:%i, indoorCheck:%i PetLOS:%i", enableLOS, enableHeight, enableIndoor, enablePetLOS); - sLog->outString("WORLD: VMap data directory is: %svmaps", m_dataPath.c_str()); + sLog->outInfo(LOG_FILTER_GENERAL, "WORLD: VMap support included. LineOfSight:%i, getHeight:%i, indoorCheck:%i PetLOS:%i", enableLOS, enableHeight, enableIndoor, enablePetLOS); + sLog->outInfo(LOG_FILTER_GENERAL, "WORLD: VMap data directory is: %svmaps", m_dataPath.c_str()); m_int_configs[CONFIG_MAX_WHO] = ConfigMgr::GetIntDefault("MaxWhoListReturns", 49); m_bool_configs[CONFIG_PET_LOS] = ConfigMgr::GetBoolDefault("vmap.petLOS", true); m_bool_configs[CONFIG_START_ALL_SPELLS] = ConfigMgr::GetBoolDefault("PlayerStart.AllSpells", false); if (m_bool_configs[CONFIG_START_ALL_SPELLS]) - sLog->outString("WORLD: WARNING: PlayerStart.AllSpells enabled - may not function as intended!"); + sLog->outInfo(LOG_FILTER_GENERAL, "WORLD: WARNING: PlayerStart.AllSpells enabled - may not function as intended!"); m_int_configs[CONFIG_HONOR_AFTER_DUEL] = ConfigMgr::GetIntDefault("HonorPointsAfterDuel", 0); m_bool_configs[CONFIG_START_ALL_EXPLORED] = ConfigMgr::GetBoolDefault("PlayerStart.MapsExplored", false); m_bool_configs[CONFIG_START_ALL_REP] = ConfigMgr::GetBoolDefault("PlayerStart.AllReputation", false); @@ -1237,7 +1235,7 @@ void World::SetInitialWorldSettings() !MapManager::ExistMapAndVMap(530, 10349.6f, -6357.29f) || !MapManager::ExistMapAndVMap(530, -3961.64f, -13931.2f)))) { - sLog->outError("Correct *.map files not found in path '%smaps' or *.vmtree/*.vmtile files in '%svmaps'. Please place *.map/*.vmtree/*.vmtile files in appropriate directories or correct the DataDir value in the worldserver.conf file.", m_dataPath.c_str(), m_dataPath.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Correct *.map files not found in path '%smaps' or *.vmtree/*.vmtile files in '%svmaps'. Please place *.map/*.vmtree/*.vmtile files in appropriate directories or correct the DataDir value in the worldserver.conf file.", m_dataPath.c_str(), m_dataPath.c_str()); exit(1); } @@ -1248,8 +1246,8 @@ void World::SetInitialWorldSettings() sGameEventMgr->Initialize(); ///- Loading strings. Getting no records means core load has to be canceled because no error message can be output. - sLog->outString(); - sLog->outString("Loading Trinity strings..."); + + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Trinity strings..."); if (!sObjectMgr->LoadTrinityStrings()) exit(1); // Error message displayed in function already @@ -1273,36 +1271,36 @@ void World::SetInitialWorldSettings() CharacterDatabase.Execute(stmt); ///- Load the DBC files - sLog->outString("Initialize data stores..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Initialize data stores..."); LoadDBCStores(m_dataPath); DetectDBCLang(); - sLog->outString("Loading spell dbc data corrections..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading spell dbc data corrections..."); sSpellMgr->LoadDbcDataCorrections(); - sLog->outString("Loading SpellInfo store..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading SpellInfo store..."); sSpellMgr->LoadSpellInfoStore(); - sLog->outString("Loading SkillLineAbilityMultiMap Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading SkillLineAbilityMultiMap Data..."); sSpellMgr->LoadSkillLineAbilityMap(); - sLog->outString("Loading spell custom attributes..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading spell custom attributes..."); sSpellMgr->LoadSpellCustomAttr(); - sLog->outString("Loading GameObject models..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GameObject models..."); LoadGameObjectModelList(); - sLog->outString("Loading Script Names..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Script Names..."); sObjectMgr->LoadScriptNames(); - sLog->outString("Loading Instance Template..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Instance Template..."); sObjectMgr->LoadInstanceTemplate(); // Must be called before `creature_respawn`/`gameobject_respawn` tables - sLog->outString("Loading instances..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading instances..."); sInstanceSaveMgr->LoadInstances(); - sLog->outString("Loading Localization strings..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Localization strings..."); uint32 oldMSTime = getMSTime(); sObjectMgr->LoadCreatureLocales(); sObjectMgr->LoadGameObjectLocales(); @@ -1315,308 +1313,308 @@ void World::SetInitialWorldSettings() sObjectMgr->LoadPointOfInterestLocales(); sObjectMgr->SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts) - sLog->outString(">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime)); + - sLog->outString("Loading Page Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Page Texts..."); sObjectMgr->LoadPageTexts(); - sLog->outString("Loading Game Object Templates..."); // must be after LoadPageTexts + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Game Object Templates..."); // must be after LoadPageTexts sObjectMgr->LoadGameObjectTemplate(); - sLog->outString("Loading Spell Rank Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Rank Data..."); sSpellMgr->LoadSpellRanks(); - sLog->outString("Loading Spell Required Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Required Data..."); sSpellMgr->LoadSpellRequired(); - sLog->outString("Loading Spell Group types..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Group types..."); sSpellMgr->LoadSpellGroups(); - sLog->outString("Loading Spell Learn Skills..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Learn Skills..."); sSpellMgr->LoadSpellLearnSkills(); // must be after LoadSpellRanks - sLog->outString("Loading Spell Learn Spells..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Learn Spells..."); sSpellMgr->LoadSpellLearnSpells(); - sLog->outString("Loading Spell Proc Event conditions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Proc Event conditions..."); sSpellMgr->LoadSpellProcEvents(); - sLog->outString("Loading Spell Proc conditions and data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Proc conditions and data..."); sSpellMgr->LoadSpellProcs(); - sLog->outString("Loading Spell Bonus Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Bonus Data..."); sSpellMgr->LoadSpellBonusess(); - sLog->outString("Loading Aggro Spells Definitions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Aggro Spells Definitions..."); sSpellMgr->LoadSpellThreats(); - sLog->outString("Loading Spell Group Stack Rules..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell Group Stack Rules..."); sSpellMgr->LoadSpellGroupStackRules(); - sLog->outString("Loading NPC Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading NPC Texts..."); sObjectMgr->LoadGossipText(); - sLog->outString("Loading Enchant Spells Proc datas..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Enchant Spells Proc datas..."); sSpellMgr->LoadSpellEnchantProcData(); - sLog->outString("Loading Item Random Enchantments Table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Item Random Enchantments Table..."); LoadRandomEnchantmentsTable(); - sLog->outString("Loading Disables"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Disables"); DisableMgr::LoadDisables(); // must be before loading quests and items - sLog->outString("Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts sObjectMgr->LoadItemTemplates(); - sLog->outString("Loading Item set names..."); // must be after LoadItemPrototypes + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Item set names..."); // must be after LoadItemPrototypes sObjectMgr->LoadItemSetNames(); - sLog->outString("Loading Creature Model Based Info Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Model Based Info Data..."); sObjectMgr->LoadCreatureModelInfo(); - sLog->outString("Loading Equipment templates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Equipment templates..."); sObjectMgr->LoadEquipmentTemplates(); - sLog->outString("Loading Creature templates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature templates..."); sObjectMgr->LoadCreatureTemplates(); - sLog->outString("Loading Creature template addons..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature template addons..."); sObjectMgr->LoadCreatureTemplateAddons(); - sLog->outString("Loading Reputation Reward Rates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Reputation Reward Rates..."); sObjectMgr->LoadReputationRewardRate(); - sLog->outString("Loading Creature Reputation OnKill Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Reputation OnKill Data..."); sObjectMgr->LoadReputationOnKill(); - sLog->outString("Loading Reputation Spillover Data..." ); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Reputation Spillover Data..."); sObjectMgr->LoadReputationSpilloverTemplate(); - sLog->outString("Loading Points Of Interest Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Points Of Interest Data..."); sObjectMgr->LoadPointsOfInterest(); - sLog->outString("Loading Creature Base Stats..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Base Stats..."); sObjectMgr->LoadCreatureClassLevelStats(); - sLog->outString("Loading Creature Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Data..."); sObjectMgr->LoadCreatures(); - sLog->outString("Loading pet levelup spells..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading pet levelup spells..."); sSpellMgr->LoadPetLevelupSpellMap(); - sLog->outString("Loading pet default spells additional to levelup spells..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading pet default spells additional to levelup spells..."); sSpellMgr->LoadPetDefaultSpells(); - sLog->outString("Loading Creature Addon Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Addon Data..."); sObjectMgr->LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures() - sLog->outString("Loading Gameobject Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Gameobject Data..."); sObjectMgr->LoadGameobjects(); - sLog->outString("Loading Creature Linked Respawn..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Linked Respawn..."); sObjectMgr->LoadLinkedRespawn(); // must be after LoadCreatures(), LoadGameObjects() - sLog->outString("Loading Weather Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Weather Data..."); WeatherMgr::LoadWeatherData(); - sLog->outString("Loading Quests..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quests..."); sObjectMgr->LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables - sLog->outString("Checking Quest Disables"); + sLog->outInfo(LOG_FILTER_GENERAL, "Checking Quest Disables"); DisableMgr::CheckQuestDisables(); // must be after loading quests - sLog->outString("Loading Quest POI"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quest POI"); sObjectMgr->LoadQuestPOI(); - sLog->outString("Loading Quests Relations..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quests Relations..."); sObjectMgr->LoadQuestRelations(); // must be after quest load - sLog->outString("Loading Objects Pooling Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Objects Pooling Data..."); sPoolMgr->LoadFromDB(); - sLog->outString("Loading Game Event Data..."); // must be after loading pools fully + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Game Event Data..."); // must be after loading pools fully sGameEventMgr->LoadFromDB(); - sLog->outString("Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests + sLog->outInfo(LOG_FILTER_GENERAL, "Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests sObjectMgr->LoadNPCSpellClickSpells(); - sLog->outString("Loading Vehicle Template Accessories..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Vehicle Template Accessories..."); sObjectMgr->LoadVehicleTemplateAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells() - sLog->outString("Loading Vehicle Accessories..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Vehicle Accessories..."); sObjectMgr->LoadVehicleAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells() - sLog->outString("Loading Dungeon boss data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Dungeon boss data..."); sObjectMgr->LoadInstanceEncounters(); - sLog->outString("Loading LFG rewards..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading LFG rewards..."); sLFGMgr->LoadRewards(); - sLog->outString("Loading SpellArea Data..."); // must be after quest load + sLog->outInfo(LOG_FILTER_GENERAL, "Loading SpellArea Data..."); // must be after quest load sSpellMgr->LoadSpellAreas(); - sLog->outString("Loading AreaTrigger definitions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading AreaTrigger definitions..."); sObjectMgr->LoadAreaTriggerTeleports(); - sLog->outString("Loading Access Requirements..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Access Requirements..."); sObjectMgr->LoadAccessRequirements(); // must be after item template load - sLog->outString("Loading Quest Area Triggers..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quest Area Triggers..."); sObjectMgr->LoadQuestAreaTriggers(); // must be after LoadQuests - sLog->outString("Loading Tavern Area Triggers..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Tavern Area Triggers..."); sObjectMgr->LoadTavernAreaTriggers(); - sLog->outString("Loading AreaTrigger script names..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading AreaTrigger script names..."); sObjectMgr->LoadAreaTriggerScripts(); - sLog->outString("Loading Graveyard-zone links..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Graveyard-zone links..."); sObjectMgr->LoadGraveyardZones(); - sLog->outString("Loading spell pet auras..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading spell pet auras..."); sSpellMgr->LoadSpellPetAuras(); - sLog->outString("Loading Spell target coordinates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Spell target coordinates..."); sSpellMgr->LoadSpellTargetPositions(); - sLog->outString("Loading enchant custom attributes..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading enchant custom attributes..."); sSpellMgr->LoadEnchantCustomAttr(); - sLog->outString("Loading linked spells..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading linked spells..."); sSpellMgr->LoadSpellLinked(); - sLog->outString("Loading Player Create Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Data..."); sObjectMgr->LoadPlayerInfo(); - sLog->outString("Loading Exploration BaseXP Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Exploration BaseXP Data..."); sObjectMgr->LoadExplorationBaseXP(); - sLog->outString("Loading Pet Name Parts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Pet Name Parts..."); sObjectMgr->LoadPetNames(); CharacterDatabaseCleaner::CleanDatabase(); - sLog->outString("Loading the max pet number..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading the max pet number..."); sObjectMgr->LoadPetNumber(); - sLog->outString("Loading pet level stats..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading pet level stats..."); sObjectMgr->LoadPetLevelInfo(); - sLog->outString("Loading Player Corpses..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Corpses..."); sObjectMgr->LoadCorpses(); - sLog->outString("Loading Player level dependent mail rewards..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player level dependent mail rewards..."); sObjectMgr->LoadMailLevelRewards(); // Loot tables LoadLootTables(); - sLog->outString("Loading Skill Discovery Table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Skill Discovery Table..."); LoadSkillDiscoveryTable(); - sLog->outString("Loading Skill Extra Item Table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Skill Extra Item Table..."); LoadSkillExtraItemTable(); - sLog->outString("Loading Skill Fishing base level requirements..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Skill Fishing base level requirements..."); sObjectMgr->LoadFishingBaseSkillLevel(); - sLog->outString("Loading Achievements..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Achievements..."); sAchievementMgr->LoadAchievementReferenceList(); - sLog->outString("Loading Achievement Criteria Lists..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Achievement Criteria Lists..."); sAchievementMgr->LoadAchievementCriteriaList(); - sLog->outString("Loading Achievement Criteria Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Achievement Criteria Data..."); sAchievementMgr->LoadAchievementCriteriaData(); - sLog->outString("Loading Achievement Rewards..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Achievement Rewards..."); sAchievementMgr->LoadRewards(); - sLog->outString("Loading Achievement Reward Locales..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Achievement Reward Locales..."); sAchievementMgr->LoadRewardLocales(); - sLog->outString("Loading Completed Achievements..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Completed Achievements..."); sAchievementMgr->LoadCompletedAchievements(); // Delete expired auctions before loading - sLog->outString("Deleting expired auctions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Deleting expired auctions..."); sAuctionMgr->DeleteExpiredAuctionsAtStartup(); ///- Load dynamic data tables from the database - sLog->outString("Loading Item Auctions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Item Auctions..."); sAuctionMgr->LoadAuctionItems(); - sLog->outString("Loading Auctions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Auctions..."); sAuctionMgr->LoadAuctions(); sGuildMgr->LoadGuilds(); - sLog->outString("Loading ArenaTeams..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading ArenaTeams..."); sArenaTeamMgr->LoadArenaTeams(); - sLog->outString("Loading Groups..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Groups..."); sGroupMgr->LoadGroups(); - sLog->outString("Loading ReservedNames..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading ReservedNames..."); sObjectMgr->LoadReservedPlayersNames(); - sLog->outString("Loading GameObjects for quests..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GameObjects for quests..."); sObjectMgr->LoadGameObjectForQuests(); - sLog->outString("Loading BattleMasters..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading BattleMasters..."); sBattlegroundMgr->LoadBattleMastersEntry(); - sLog->outString("Loading GameTeleports..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GameTeleports..."); sObjectMgr->LoadGameTele(); - sLog->outString("Loading Gossip menu..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Gossip menu..."); sObjectMgr->LoadGossipMenu(); - sLog->outString("Loading Gossip menu options..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Gossip menu options..."); sObjectMgr->LoadGossipMenuItems(); - sLog->outString("Loading Vendors..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Vendors..."); sObjectMgr->LoadVendors(); // must be after load CreatureTemplate and ItemTemplate - sLog->outString("Loading Trainers..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Trainers..."); sObjectMgr->LoadTrainerSpell(); // must be after load CreatureTemplate - sLog->outString("Loading Waypoints..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Waypoints..."); sWaypointMgr->Load(); - sLog->outString("Loading SmartAI Waypoints..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading SmartAI Waypoints..."); sSmartWaypointMgr->LoadFromDB(); - sLog->outString("Loading Creature Formations..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Formations..."); sFormationMgr->LoadCreatureFormations(); - sLog->outString("Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions + sLog->outInfo(LOG_FILTER_GENERAL, "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions LoadWorldStates(); - sLog->outString("Loading Conditions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Conditions..."); sConditionMgr->LoadConditions(); - sLog->outString("Loading faction change achievement pairs..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading faction change achievement pairs..."); sObjectMgr->LoadFactionChangeAchievements(); - sLog->outString("Loading faction change spell pairs..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading faction change spell pairs..."); sObjectMgr->LoadFactionChangeSpells(); - sLog->outString("Loading faction change item pairs..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading faction change item pairs..."); sObjectMgr->LoadFactionChangeItems(); - sLog->outString("Loading faction change reputation pairs..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading faction change reputation pairs..."); sObjectMgr->LoadFactionChangeReputations(); - sLog->outString("Loading GM tickets..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GM tickets..."); sTicketMgr->LoadTickets(); - sLog->outString("Loading GM surveys..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading GM surveys..."); sTicketMgr->LoadSurveys(); - sLog->outString("Loading client addons..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading client addons..."); AddonMgr::LoadFromDB(); ///- Handle outdated emails (delete/return) - sLog->outString("Returning old mails..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Returning old mails..."); sObjectMgr->ReturnOrDeleteOldMails(false); - sLog->outString("Loading Autobroadcasts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Autobroadcasts..."); LoadAutobroadcasts(); ///- Load and initialize scripts @@ -1627,42 +1625,42 @@ void World::SetInitialWorldSettings() sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data) sObjectMgr->LoadWaypointScripts(); - sLog->outString("Loading Scripts text locales..."); // must be after Load*Scripts calls + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Scripts text locales..."); // must be after Load*Scripts calls sObjectMgr->LoadDbScriptStrings(); - sLog->outString("Loading CreatureEventAI Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading CreatureEventAI Texts..."); sEventAIMgr->LoadCreatureEventAI_Texts(); - sLog->outString("Loading CreatureEventAI Summons..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading CreatureEventAI Summons..."); sEventAIMgr->LoadCreatureEventAI_Summons(); - sLog->outString("Loading CreatureEventAI Scripts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading CreatureEventAI Scripts..."); sEventAIMgr->LoadCreatureEventAI_Scripts(); - sLog->outString("Loading spell script names..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading spell script names..."); sObjectMgr->LoadSpellScriptNames(); - sLog->outString("Loading Creature Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Texts..."); sCreatureTextMgr->LoadCreatureTexts(); - sLog->outString("Loading Creature Text Locales..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Text Locales..."); sCreatureTextMgr->LoadCreatureTextLocales(); - sLog->outString("Initializing Scripts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Initializing Scripts..."); sScriptMgr->Initialize(); sScriptMgr->OnConfigLoad(false); // must be done after the ScriptMgr has been properly initialized - sLog->outString("Validating spell scripts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Validating spell scripts..."); sObjectMgr->ValidateSpellScripts(); - sLog->outString("Loading SmartAI scripts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading SmartAI scripts..."); sSmartScriptMgr->LoadSmartAIFromDB(); - sLog->outString("Loading Calendar data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Calendar data..."); sCalendarMgr->LoadFromDB(); ///- Initialize game time and timers - sLog->outString("Initialize game time and timers"); + sLog->outInfo(LOG_FILTER_GENERAL, "Initialize game time and timers"); m_gameTime = time(NULL); m_startTime = m_gameTime; @@ -1689,16 +1687,16 @@ void World::SetInitialWorldSettings() mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval()); //1440 mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval())); - sLog->outDetail("Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires)); + sLog->outInfo(LOG_FILTER_GENERAL, "Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires)); ///- Initilize static helper structures AIRegistry::Initialize(); ///- Initialize MapManager - sLog->outString("Starting Map System"); + sLog->outInfo(LOG_FILTER_GENERAL, "Starting Map System"); sMapMgr->Initialize(); - sLog->outString("Starting Game Event system..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Starting Game Event system..."); uint32 nextGameEvent = sGameEventMgr->StartSystem(); m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event @@ -1708,61 +1706,51 @@ void World::SetInitialWorldSettings() // Delete all custom channels which haven't been used for PreserveCustomChannelDuration days. Channel::CleanOldChannelsInDB(); - sLog->outString("Starting Arena Season..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Starting Arena Season..."); sGameEventMgr->StartArenaSeason(); sTicketMgr->Initialize(); ///- Initialize Battlegrounds - sLog->outString("Starting Battleground System"); + sLog->outInfo(LOG_FILTER_GENERAL, "Starting Battleground System"); sBattlegroundMgr->CreateInitialBattlegrounds(); sBattlegroundMgr->InitAutomaticArenaPointDistribution(); ///- Initialize outdoor pvp - sLog->outString("Starting Outdoor PvP System"); + sLog->outInfo(LOG_FILTER_GENERAL, "Starting Outdoor PvP System"); sOutdoorPvPMgr->InitOutdoorPvP(); - sLog->outString("Loading Transports..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Transports..."); sMapMgr->LoadTransports(); - sLog->outString("Loading Transport NPCs..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Transport NPCs..."); sMapMgr->LoadTransportNPCs(); ///- Initialize Warden - sLog->outString("Loading Warden Checks..." ); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Warden Checks..."); sWardenCheckMgr->LoadWardenChecks(); - sLog->outString("Loading Warden Action Overrides..." ); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Warden Action Overrides..."); sWardenCheckMgr->LoadWardenOverrides(); - sLog->outString("Deleting expired bans..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Deleting expired bans..."); LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); // One-time query - sLog->outString("Calculate next daily quest reset time..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Calculate next daily quest reset time..."); InitDailyQuestResetTime(); - sLog->outString("Calculate next weekly quest reset time..." ); + sLog->outInfo(LOG_FILTER_GENERAL, "Calculate next weekly quest reset time..."); InitWeeklyQuestResetTime(); - sLog->outString("Calculate random battleground reset time..." ); + sLog->outInfo(LOG_FILTER_GENERAL, "Calculate random battleground reset time..."); InitRandomBGResetTime(); LoadCharacterNameData(); - // possibly enable db logging; avoid massive startup spam by doing it here. - if (sLog->GetLogDBLater()) - { - sLog->outString("Enabling database logging..."); - sLog->SetLogDBLater(false); - sLog->SetLogDB(true); - } - else - sLog->SetLogDB(false); - uint32 startupDuration = GetMSTimeDiffToNow(startupBegin); - sLog->outString(); - sLog->outString("WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); - sLog->outString(); + + sLog->outInfo(LOG_FILTER_GENERAL, "WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); + sLog->EnableDBAppenders(); } void World::DetectDBCLang() @@ -1771,7 +1759,7 @@ void World::DetectDBCLang() if (m_lang_confid != 255 && m_lang_confid >= TOTAL_LOCALES) { - sLog->outError("Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES); + sLog->outError(LOG_FILTER_GENERAL, "Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES); m_lang_confid = LOCALE_enUS; } @@ -1799,14 +1787,14 @@ void World::DetectDBCLang() if (default_locale >= TOTAL_LOCALES) { - sLog->outError("Unable to determine your DBC Locale! (corrupt DBC?)"); + sLog->outError(LOG_FILTER_GENERAL, "Unable to determine your DBC Locale! (corrupt DBC?)"); exit(1); } m_defaultDbcLocale = LocaleConstant(default_locale); - sLog->outString("Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "" : availableLocalsStr.c_str()); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "" : availableLocalsStr.c_str()); + } void World::RecordTimeDiff(const char *text, ...) @@ -1829,7 +1817,7 @@ void World::RecordTimeDiff(const char *text, ...) va_start(ap, text); vsnprintf(str, 256, text, ap); va_end(ap); - sLog->outDetail("Difftime %s: %u.", str, diff); + sLog->outInfo(LOG_FILTER_GENERAL, "Difftime %s: %u.", str, diff); } m_currentTime = thisTime; @@ -1845,8 +1833,8 @@ void World::LoadAutobroadcasts() if (!result) { - sLog->outString(">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty!"); + return; } @@ -1863,8 +1851,8 @@ void World::LoadAutobroadcasts() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u autobroadcasts definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u autobroadcasts definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } /// Update the World ! @@ -1876,7 +1864,7 @@ void World::Update(uint32 diff) { if (m_updateTimeSum > m_int_configs[CONFIG_INTERVAL_LOG_UPDATE]) { - sLog->outBasic("Update time diff: %u. Players online: %u.", m_updateTimeSum / m_updateTimeCount, GetActiveSessionCount()); + sLog->outDebug(LOG_FILTER_GENERAL, "Update time diff: %u. Players online: %u.", m_updateTimeSum / m_updateTimeCount, GetActiveSessionCount()); m_updateTimeSum = m_updateTime; m_updateTimeCount = 1; } @@ -2030,7 +2018,7 @@ void World::Update(uint32 diff) if (m_timers[WUPDATE_PINGDB].Passed()) { m_timers[WUPDATE_PINGDB].Reset(); - sLog->outDetail("Ping MySQL to keep connection alive"); + sLog->outInfo(LOG_FILTER_GENERAL, "Ping MySQL to keep connection alive"); CharacterDatabase.KeepAlive(); LoginDatabase.KeepAlive(); WorldDatabase.KeepAlive(); @@ -2504,7 +2492,7 @@ void World::ShutdownMsg(bool show, Player* player) ServerMessageType msgid = (m_ShutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_TIME : SERVER_MSG_SHUTDOWN_TIME; SendServerMessage(msgid, str.c_str(), player); - sLog->outStaticDebug("Server is %s in %s", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str.c_str()); + sLog->outDebug(LOG_FILTER_GENERAL, "Server is %s in %s", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str.c_str()); } } @@ -2522,7 +2510,7 @@ void World::ShutdownCancel() m_ExitCode = SHUTDOWN_EXIT_CODE; // to default value SendServerMessage(msgid); - sLog->outStaticDebug("Server %s cancelled.", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown")); + sLog->outDebug(LOG_FILTER_GENERAL, "Server %s cancelled.", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown")); sScriptMgr->OnShutdownCancel(); } @@ -2578,7 +2566,7 @@ void World::ProcessCliCommands() CliCommandHolder* command = NULL; while (cliCmdQueue.next(command)) { - sLog->outDetail("CLI command under processing..."); + sLog->outInfo(LOG_FILTER_GENERAL, "CLI command under processing..."); zprint = command->m_print; callbackArg = command->m_callbackArg; CliHandler handler(callbackArg, zprint); @@ -2619,7 +2607,7 @@ void World::SendAutoBroadcast() sWorld->SendGlobalMessage(&data); } - sLog->outDetail("AutoBroadcast: '%s'", msg.c_str()); + sLog->outInfo(LOG_FILTER_GENERAL, "AutoBroadcast: '%s'", msg.c_str()); } void World::UpdateRealmCharCount(uint32 accountId) @@ -2721,7 +2709,7 @@ void World::InitRandomBGResetTime() void World::ResetDailyQuests() { - sLog->outDetail("Daily quests reset for all characters."); + sLog->outInfo(LOG_FILTER_GENERAL, "Daily quests reset for all characters."); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_DAILY); CharacterDatabase.Execute(stmt); @@ -2782,7 +2770,7 @@ void World::ResetEventSeasonalQuests(uint16 event_id) void World::ResetRandomBG() { - sLog->outDetail("Random BG status reset for all characters."); + sLog->outInfo(LOG_FILTER_GENERAL, "Random BG status reset for all characters."); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_BATTLEGROUND_RANDOM); CharacterDatabase.Execute(stmt); @@ -2846,8 +2834,8 @@ void World::LoadWorldStates() if (!result) { - sLog->outString(">> Loaded 0 world states. DB table `worldstates` is empty!"); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 world states. DB table `worldstates` is empty!"); + return; } @@ -2861,8 +2849,8 @@ void World::LoadWorldStates() } while (result->NextRow()); - sLog->outString(">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } // Setting a worldstate will save it to DB @@ -2918,12 +2906,12 @@ void World::ProcessQueryCallbacks() void World::LoadCharacterNameData() { - sLog->outString("Loading character name data"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading character name data"); QueryResult result = CharacterDatabase.Query("SELECT guid, name, race, gender, class FROM characters WHERE deleteDate IS NULL"); if (!result) { - sLog->outError("No character name data loaded, empty query"); + sLog->outError(LOG_FILTER_GENERAL, "No character name data loaded, empty query"); return; } @@ -2937,7 +2925,7 @@ void World::LoadCharacterNameData() ++count; } while (result->NextRow()); - sLog->outString("Loaded name data for %u characters", count); + sLog->outInfo(LOG_FILTER_GENERAL, "Loaded name data for %u characters", count); } void World::AddCharacterNameData(uint32 guid, std::string const& name, uint8 gender, uint8 race, uint8 playerClass) diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index b52102479b5..db975419a23 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -38,7 +38,7 @@ public: { "addon", SEC_ADMINISTRATOR, true, &HandleAccountSetAddonCommand, "", NULL }, { "gmlevel", SEC_CONSOLE, true, &HandleAccountSetGmLevelCommand, "", NULL }, { "password", SEC_CONSOLE, true, &HandleAccountSetPasswordCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { NULL, SEC_PLAYER, false, NULL, "", NULL } }; static ChatCommand accountCommandTable[] = { @@ -50,12 +50,12 @@ public: { "set", SEC_ADMINISTRATOR, true, NULL, "", accountSetCommandTable }, { "password", SEC_PLAYER, false, &HandleAccountPasswordCommand, "", NULL }, { "", SEC_PLAYER, false, &HandleAccountCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { NULL, SEC_PLAYER, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { { "account", SEC_PLAYER, true, NULL, "", accountCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { NULL, SEC_PLAYER, false, NULL, "", NULL } }; return commandTable; } @@ -110,7 +110,11 @@ public: case AOR_OK: handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName); if (handler->GetSession()) - sLog->outChar("Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.", handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow()); + { + sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password." + , handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str() + , handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow()); + } break; case AOR_NAME_TOO_LONG: handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG); @@ -232,8 +236,8 @@ public: } else handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str()); - - } while (result->NextRow()); + } + while (result->NextRow()); handler->SendSysMessage(LANG_ACCOUNT_LIST_BAR); return true; @@ -377,7 +381,6 @@ public: handler->SetSentErrorMessage(true); return false; } - } // Let set addon state only for lesser (strong) security level @@ -535,8 +538,8 @@ public: ///- Get the command line arguments char* account = strtok((char*)args, " "); - char* password = strtok(NULL, " "); - char* passwordConfirmation = strtok(NULL, " "); + char* password = strtok(NULL, " "); + char* passwordConfirmation = strtok(NULL, " "); if (!account || !password || !passwordConfirmation) return false; @@ -589,7 +592,6 @@ public: handler->SetSentErrorMessage(true); return false; } - return true; } }; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index c7bcde01e9b..355ff195cf5 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -410,7 +410,7 @@ public: } else { - sLog->outError("Sending opcode that has unknown type '%s'", type.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Sending opcode that has unknown type '%s'", type.c_str()); break; } } @@ -1325,7 +1325,7 @@ public: { Player* player = handler->GetSession()->GetPlayer(); - sLog->outSQLDev("(@PATH, XX, %.3f, %.3f, %.5f, 0,0, 0,100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); + sLog->outInfo(LOG_FILTER_SQL, "(@PATH, XX, %.3f, %.3f, %.5f, 0,0, 0,100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); handler->PSendSysMessage("Waypoint SQL written to SQL Developer log"); return true; diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 232aad9f21c..167c56c20a2 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -133,7 +133,7 @@ public: if (objectInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(objectInfo->displayId)) { // report to DB errors log as in loading case - sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId); + sLog->outError(LOG_FILTER_SQL, "Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId); handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, objectId); handler->SetSentErrorMessage(true); return false; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index f8ad3f7c37e..80847d7dec4 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1278,7 +1278,7 @@ public: if (!playerTarget) playerTarget = player; - sLog->outDetail(handler->GetTrinityString(LANG_ADDITEM), itemId, count); + sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_ADDITEM), itemId, count); ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId); if (!itemTemplate) @@ -1357,7 +1357,7 @@ public: if (!playerTarget) playerTarget = player; - sLog->outDetail(handler->GetTrinityString(LANG_ADDITEMSET), itemSetId); + sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_ADDITEMSET), itemSetId); bool found = false; ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore(); @@ -2508,7 +2508,7 @@ public: if (!pet->InitStatsForLevel(creatureTarget->getLevel())) { - sLog->outError("InitStatsForLevel() in EffectTameCreature failed! Pet deleted."); + sLog->outError(LOG_FILTER_GENERAL, "InitStatsForLevel() in EffectTameCreature failed! Pet deleted."); handler->PSendSysMessage("Error 2"); delete pet; return false; diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 60c5e1cf162..1747b80efd5 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -198,7 +198,7 @@ public: target->SetMaxPower(POWER_ENERGY, energym); target->SetPower(POWER_ENERGY, energy); - sLog->outDetail(handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY)); + sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY)); return true; } @@ -1010,7 +1010,7 @@ public: { int32 newmoney = int32(moneyuser) + addmoney; - sLog->outDetail(handler->GetTrinityString(LANG_CURRENT_MONEY), moneyuser, addmoney, newmoney); + sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), moneyuser, addmoney, newmoney); if (newmoney <= 0) { handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str()); @@ -1042,7 +1042,7 @@ public: target->ModifyMoney(addmoney); } - sLog->outDetail(handler->GetTrinityString(LANG_NEW_MONEY), moneyuser, addmoney, target->GetMoney()); + sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), moneyuser, addmoney, target->GetMoney()); return true; } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 832f7958fc8..77fc2918e0b 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -804,7 +804,7 @@ public: if (dontdel_str) { - //sLog->outError("DEBUG: All 3 params are set"); + //sLog->outError(LOG_FILTER_GENERAL, "DEBUG: All 3 params are set"); // All 3 params are set // GUID @@ -812,7 +812,7 @@ public: // doNotDEL if (stricmp(dontdel_str, "NODEL") == 0) { - //sLog->outError("DEBUG: doNotDelete = true;"); + //sLog->outError(LOG_FILTER_GENERAL, "DEBUG: doNotDelete = true;"); doNotDelete = true; } } @@ -821,10 +821,10 @@ public: // Only 2 params - but maybe NODEL is set if (type_str) { - sLog->outError("DEBUG: Only 2 params "); + sLog->outError(LOG_FILTER_GENERAL, "DEBUG: Only 2 params "); if (stricmp(type_str, "NODEL") == 0) { - //sLog->outError("DEBUG: type_str, NODEL "); + //sLog->outError(LOG_FILTER_GENERAL, "DEBUG: type_str, NODEL "); doNotDelete = true; type_str = NULL; } diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 1c119fdef4c..c8568feaeb6 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -222,7 +222,7 @@ public: static bool HandleReloadAllLootCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables..."); LoadLootTables(); handler->SendGlobalGMSysMessage("DB tables `*_loot_template` reloaded."); sConditionMgr->LoadConditions(true); @@ -245,7 +245,7 @@ public: HandleReloadQuestPOICommand(handler, "a"); HandleReloadQuestTemplateCommand(handler, "a"); - sLog->outString("Re-Loading Quests Relations..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Quests Relations..."); sObjectMgr->LoadQuestRelations(); handler->SendGlobalGMSysMessage("DB tables `*_questrelation` and `*_involvedrelation` reloaded."); return true; @@ -260,7 +260,7 @@ public: return false; } - sLog->outString("Re-Loading Scripts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts..."); HandleReloadGameObjectScriptsCommand(handler, "a"); HandleReloadEventScriptsCommand(handler, "a"); HandleReloadQuestEndScriptsCommand(handler, "a"); @@ -333,7 +333,7 @@ public: static bool HandleReloadConfigCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading config settings..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading config settings..."); sWorld->LoadConfigSettings(true); sMapMgr->InitializeVisibilityDistanceInfo(); handler->SendGlobalGMSysMessage("World config settings reloaded."); @@ -342,7 +342,7 @@ public: static bool HandleReloadAccessRequirementCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Access Requirement definitions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Access Requirement definitions..."); sObjectMgr->LoadAccessRequirements(); handler->SendGlobalGMSysMessage("DB table `access_requirement` reloaded."); return true; @@ -350,7 +350,7 @@ public: static bool HandleReloadAchievementCriteriaDataCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Additional Achievement Criteria Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Additional Achievement Criteria Data..."); sAchievementMgr->LoadAchievementCriteriaData(); handler->SendGlobalGMSysMessage("DB table `achievement_criteria_data` reloaded."); return true; @@ -358,7 +358,7 @@ public: static bool HandleReloadAchievementRewardCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Achievement Reward Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Achievement Reward Data..."); sAchievementMgr->LoadRewards(); handler->SendGlobalGMSysMessage("DB table `achievement_reward` reloaded."); return true; @@ -366,7 +366,7 @@ public: static bool HandleReloadAreaTriggerTavernCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Tavern Area Triggers..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Tavern Area Triggers..."); sObjectMgr->LoadTavernAreaTriggers(); handler->SendGlobalGMSysMessage("DB table `areatrigger_tavern` reloaded."); return true; @@ -374,7 +374,7 @@ public: static bool HandleReloadAreaTriggerTeleportCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading AreaTrigger teleport definitions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading AreaTrigger teleport definitions..."); sObjectMgr->LoadAreaTriggerTeleports(); handler->SendGlobalGMSysMessage("DB table `areatrigger_teleport` reloaded."); return true; @@ -382,7 +382,7 @@ public: static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Autobroadcasts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Autobroadcasts..."); sWorld->LoadAutobroadcasts(); handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded."); return true; @@ -397,7 +397,7 @@ public: static bool HandleReloadOnKillReputationCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading creature award reputation definitions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading creature award reputation definitions..."); sObjectMgr->LoadReputationOnKill(); handler->SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded."); return true; @@ -431,7 +431,7 @@ public: continue; } - sLog->outString("Reloading creature template entry %u", entry); + sLog->outInfo(LOG_FILTER_GENERAL, "Reloading creature template entry %u", entry); Field* fields = result->Fetch(); @@ -527,7 +527,7 @@ public: static bool HandleReloadCreatureQuestRelationsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Loading Quests Relations... (`creature_questrelation`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_questrelation`)"); sObjectMgr->LoadCreatureQuestRelations(); handler->SendGlobalGMSysMessage("DB table `creature_questrelation` (creature quest givers) reloaded."); return true; @@ -535,7 +535,7 @@ public: static bool HandleReloadLinkedRespawnCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Loading Linked Respawns... (`creature_linked_respawn`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Linked Respawns... (`creature_linked_respawn`)"); sObjectMgr->LoadLinkedRespawn(); handler->SendGlobalGMSysMessage("DB table `creature_linked_respawn` (creature linked respawns) reloaded."); return true; @@ -543,7 +543,7 @@ public: static bool HandleReloadCreatureQuestInvRelationsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Loading Quests Relations... (`creature_involvedrelation`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_involvedrelation`)"); sObjectMgr->LoadCreatureInvolvedRelations(); handler->SendGlobalGMSysMessage("DB table `creature_involvedrelation` (creature quest takers) reloaded."); return true; @@ -551,7 +551,7 @@ public: static bool HandleReloadGossipMenuCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading `gossip_menu` Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu` Table!"); sObjectMgr->LoadGossipMenu(); handler->SendGlobalGMSysMessage("DB table `gossip_menu` reloaded."); sConditionMgr->LoadConditions(true); @@ -560,7 +560,7 @@ public: static bool HandleReloadGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading `gossip_menu_option` Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu_option` Table!"); sObjectMgr->LoadGossipMenuItems(); handler->SendGlobalGMSysMessage("DB table `gossip_menu_option` reloaded."); sConditionMgr->LoadConditions(true); @@ -569,7 +569,7 @@ public: static bool HandleReloadGOQuestRelationsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Loading Quests Relations... (`gameobject_questrelation`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_questrelation`)"); sObjectMgr->LoadGameobjectQuestRelations(); handler->SendGlobalGMSysMessage("DB table `gameobject_questrelation` (gameobject quest givers) reloaded."); return true; @@ -577,7 +577,7 @@ public: static bool HandleReloadGOQuestInvRelationsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Loading Quests Relations... (`gameobject_involvedrelation`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_involvedrelation`)"); sObjectMgr->LoadGameobjectInvolvedRelations(); handler->SendGlobalGMSysMessage("DB table `gameobject_involvedrelation` (gameobject quest takers) reloaded."); return true; @@ -585,7 +585,7 @@ public: static bool HandleReloadQuestAreaTriggersCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Quest Area Triggers..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Quest Area Triggers..."); sObjectMgr->LoadQuestAreaTriggers(); handler->SendGlobalGMSysMessage("DB table `areatrigger_involvedrelation` (quest area triggers) reloaded."); return true; @@ -593,12 +593,12 @@ public: static bool HandleReloadQuestTemplateCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Quest Templates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Quest Templates..."); sObjectMgr->LoadQuests(); handler->SendGlobalGMSysMessage("DB table `quest_template` (quest definitions) reloaded."); /// dependent also from `gameobject` but this table not reloaded anyway - sLog->outString("Re-Loading GameObjects for quests..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading GameObjects for quests..."); sObjectMgr->LoadGameObjectForQuests(); handler->SendGlobalGMSysMessage("Data GameObjects for quests reloaded."); return true; @@ -606,7 +606,7 @@ public: static bool HandleReloadLootTemplatesCreatureCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`creature_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`creature_loot_template`)"); LoadLootTemplates_Creature(); LootTemplates_Creature.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `creature_loot_template` reloaded."); @@ -616,7 +616,7 @@ public: static bool HandleReloadLootTemplatesDisenchantCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`disenchant_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`disenchant_loot_template`)"); LoadLootTemplates_Disenchant(); LootTemplates_Disenchant.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `disenchant_loot_template` reloaded."); @@ -626,7 +626,7 @@ public: static bool HandleReloadLootTemplatesFishingCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`fishing_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`fishing_loot_template`)"); LoadLootTemplates_Fishing(); LootTemplates_Fishing.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `fishing_loot_template` reloaded."); @@ -636,7 +636,7 @@ public: static bool HandleReloadLootTemplatesGameobjectCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`gameobject_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`gameobject_loot_template`)"); LoadLootTemplates_Gameobject(); LootTemplates_Gameobject.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `gameobject_loot_template` reloaded."); @@ -646,7 +646,7 @@ public: static bool HandleReloadLootTemplatesItemCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`item_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`item_loot_template`)"); LoadLootTemplates_Item(); LootTemplates_Item.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `item_loot_template` reloaded."); @@ -656,7 +656,7 @@ public: static bool HandleReloadLootTemplatesMillingCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`milling_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`milling_loot_template`)"); LoadLootTemplates_Milling(); LootTemplates_Milling.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `milling_loot_template` reloaded."); @@ -666,7 +666,7 @@ public: static bool HandleReloadLootTemplatesPickpocketingCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`pickpocketing_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`pickpocketing_loot_template`)"); LoadLootTemplates_Pickpocketing(); LootTemplates_Pickpocketing.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `pickpocketing_loot_template` reloaded."); @@ -676,7 +676,7 @@ public: static bool HandleReloadLootTemplatesProspectingCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`prospecting_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`prospecting_loot_template`)"); LoadLootTemplates_Prospecting(); LootTemplates_Prospecting.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `prospecting_loot_template` reloaded."); @@ -686,7 +686,7 @@ public: static bool HandleReloadLootTemplatesMailCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`mail_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`mail_loot_template`)"); LoadLootTemplates_Mail(); LootTemplates_Mail.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `mail_loot_template` reloaded."); @@ -696,7 +696,7 @@ public: static bool HandleReloadLootTemplatesReferenceCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`reference_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`reference_loot_template`)"); LoadLootTemplates_Reference(); handler->SendGlobalGMSysMessage("DB table `reference_loot_template` reloaded."); sConditionMgr->LoadConditions(true); @@ -705,7 +705,7 @@ public: static bool HandleReloadLootTemplatesSkinningCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`skinning_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`skinning_loot_template`)"); LoadLootTemplates_Skinning(); LootTemplates_Skinning.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `skinning_loot_template` reloaded."); @@ -715,7 +715,7 @@ public: static bool HandleReloadLootTemplatesSpellCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Loot Tables... (`spell_loot_template`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`spell_loot_template`)"); LoadLootTemplates_Spell(); LootTemplates_Spell.CheckLootRefs(); handler->SendGlobalGMSysMessage("DB table `spell_loot_template` reloaded."); @@ -725,7 +725,7 @@ public: static bool HandleReloadTrinityStringCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading trinity_string Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading trinity_string Table!"); sObjectMgr->LoadTrinityStrings(); handler->SendGlobalGMSysMessage("DB table `trinity_string` reloaded."); return true; @@ -740,7 +740,7 @@ public: return false; } - sLog->outString("Re-Loading warden_action Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading warden_action Table!"); sWardenCheckMgr->LoadWardenOverrides(); handler->SendGlobalGMSysMessage("DB table `warden_action` reloaded."); return true; @@ -748,7 +748,7 @@ public: static bool HandleReloadNpcTrainerCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading `npc_trainer` Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `npc_trainer` Table!"); sObjectMgr->LoadTrainerSpell(); handler->SendGlobalGMSysMessage("DB table `npc_trainer` reloaded."); return true; @@ -756,7 +756,7 @@ public: static bool HandleReloadNpcVendorCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading `npc_vendor` Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `npc_vendor` Table!"); sObjectMgr->LoadVendors(); handler->SendGlobalGMSysMessage("DB table `npc_vendor` reloaded."); return true; @@ -764,7 +764,7 @@ public: static bool HandleReloadPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading `points_of_interest` Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `points_of_interest` Table!"); sObjectMgr->LoadPointsOfInterest(); handler->SendGlobalGMSysMessage("DB table `points_of_interest` reloaded."); return true; @@ -772,7 +772,7 @@ public: static bool HandleReloadQuestPOICommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString( "Re-Loading Quest POI ..." ); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Quest POI ..." ); sObjectMgr->LoadQuestPOI(); handler->SendGlobalGMSysMessage("DB Table `quest_poi` and `quest_poi_points` reloaded."); return true; @@ -780,7 +780,7 @@ public: static bool HandleReloadSpellClickSpellsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading `npc_spellclick_spells` Table!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `npc_spellclick_spells` Table!"); sObjectMgr->LoadNPCSpellClickSpells(); handler->SendGlobalGMSysMessage("DB table `npc_spellclick_spells` reloaded."); return true; @@ -788,7 +788,7 @@ public: static bool HandleReloadReservedNameCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Loading ReservedNames... (`reserved_name`)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Loading ReservedNames... (`reserved_name`)"); sObjectMgr->LoadReservedPlayersNames(); handler->SendGlobalGMSysMessage("DB table `reserved_name` (player reserved names) reloaded."); return true; @@ -796,7 +796,7 @@ public: static bool HandleReloadReputationRewardRateCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString( "Re-Loading `reputation_reward_rate` Table!" ); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `reputation_reward_rate` Table!" ); sObjectMgr->LoadReputationRewardRate(); handler->SendGlobalSysMessage("DB table `reputation_reward_rate` reloaded."); return true; @@ -804,7 +804,7 @@ public: static bool HandleReloadReputationSpilloverTemplateCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString( "Re-Loading `reputation_spillover_template` Table!" ); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `reputation_spillover_template` Table!" ); sObjectMgr->LoadReputationSpilloverTemplate(); handler->SendGlobalSysMessage("DB table `reputation_spillover_template` reloaded."); return true; @@ -812,7 +812,7 @@ public: static bool HandleReloadSkillDiscoveryTemplateCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Skill Discovery Table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Skill Discovery Table..."); LoadSkillDiscoveryTable(); handler->SendGlobalGMSysMessage("DB table `skill_discovery_template` (recipes discovered at crafting) reloaded."); return true; @@ -820,7 +820,7 @@ public: static bool HandleReloadSkillExtraItemTemplateCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Skill Extra Item Table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Skill Extra Item Table..."); LoadSkillExtraItemTable(); handler->SendGlobalGMSysMessage("DB table `skill_extra_item_template` (extra item creation when crafting) reloaded."); return true; @@ -828,7 +828,7 @@ public: static bool HandleReloadSkillFishingBaseLevelCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Skill Fishing base level requirements..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Skill Fishing base level requirements..."); sObjectMgr->LoadFishingBaseSkillLevel(); handler->SendGlobalGMSysMessage("DB table `skill_fishing_base_level` (fishing base level for zone/subzone) reloaded."); return true; @@ -836,7 +836,7 @@ public: static bool HandleReloadSpellAreaCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading SpellArea Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading SpellArea Data..."); sSpellMgr->LoadSpellAreas(); handler->SendGlobalGMSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded."); return true; @@ -844,7 +844,7 @@ public: static bool HandleReloadSpellRequiredCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Required Data... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Required Data... "); sSpellMgr->LoadSpellRequired(); handler->SendGlobalGMSysMessage("DB table `spell_required` reloaded."); return true; @@ -852,7 +852,7 @@ public: static bool HandleReloadSpellGroupsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Groups..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Groups..."); sSpellMgr->LoadSpellGroups(); handler->SendGlobalGMSysMessage("DB table `spell_group` (spell groups) reloaded."); return true; @@ -860,7 +860,7 @@ public: static bool HandleReloadSpellLearnSpellCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Learn Spells..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Learn Spells..."); sSpellMgr->LoadSpellLearnSpells(); handler->SendGlobalGMSysMessage("DB table `spell_learn_spell` reloaded."); return true; @@ -868,7 +868,7 @@ public: static bool HandleReloadSpellLinkedSpellCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Linked Spells..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Linked Spells..."); sSpellMgr->LoadSpellLinked(); handler->SendGlobalGMSysMessage("DB table `spell_linked_spell` reloaded."); return true; @@ -876,7 +876,7 @@ public: static bool HandleReloadSpellProcEventCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Proc Event conditions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Proc Event conditions..."); sSpellMgr->LoadSpellProcEvents(); handler->SendGlobalGMSysMessage("DB table `spell_proc_event` (spell proc trigger requirements) reloaded."); return true; @@ -884,7 +884,7 @@ public: static bool HandleReloadSpellProcsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Proc conditions and data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Proc conditions and data..."); sSpellMgr->LoadSpellProcs(); handler->SendGlobalGMSysMessage("DB table `spell_proc` (spell proc conditions and data) reloaded."); return true; @@ -892,7 +892,7 @@ public: static bool HandleReloadSpellBonusesCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Bonus Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Bonus Data..."); sSpellMgr->LoadSpellBonusess(); handler->SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded."); return true; @@ -900,7 +900,7 @@ public: static bool HandleReloadSpellTargetPositionCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell target coordinates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell target coordinates..."); sSpellMgr->LoadSpellTargetPositions(); handler->SendGlobalGMSysMessage("DB table `spell_target_position` (destination coordinates for spell targets) reloaded."); return true; @@ -908,7 +908,7 @@ public: static bool HandleReloadSpellThreatsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Aggro Spells Definitions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Aggro Spells Definitions..."); sSpellMgr->LoadSpellThreats(); handler->SendGlobalGMSysMessage("DB table `spell_threat` (spell aggro definitions) reloaded."); return true; @@ -916,7 +916,7 @@ public: static bool HandleReloadSpellGroupStackRulesCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell Group Stack Rules..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell Group Stack Rules..."); sSpellMgr->LoadSpellGroupStackRules(); handler->SendGlobalGMSysMessage("DB table `spell_group_stack_rules` (spell stacking definitions) reloaded."); return true; @@ -924,7 +924,7 @@ public: static bool HandleReloadSpellPetAurasCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Spell pet auras..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Spell pet auras..."); sSpellMgr->LoadSpellPetAuras(); handler->SendGlobalGMSysMessage("DB table `spell_pet_auras` reloaded."); return true; @@ -932,7 +932,7 @@ public: static bool HandleReloadPageTextsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Page Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Page Texts..."); sObjectMgr->LoadPageTexts(); handler->SendGlobalGMSysMessage("DB table `page_texts` reloaded."); return true; @@ -940,7 +940,7 @@ public: static bool HandleReloadItemEnchantementsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Item Random Enchantments Table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Item Random Enchantments Table..."); LoadRandomEnchantmentsTable(); handler->SendGlobalGMSysMessage("DB table `item_enchantment_template` reloaded."); return true; @@ -948,7 +948,7 @@ public: static bool HandleReloadItemSetNamesCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Item set names..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Item set names..."); LoadRandomEnchantmentsTable(); handler->SendGlobalGMSysMessage("DB table `item_set_names` reloaded."); return true; @@ -964,7 +964,7 @@ public: } if (*args != 'a') - sLog->outString("Re-Loading Scripts from `gameobject_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `gameobject_scripts`..."); sObjectMgr->LoadGameObjectScripts(); @@ -984,7 +984,7 @@ public: } if (*args != 'a') - sLog->outString("Re-Loading Scripts from `event_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `event_scripts`..."); sObjectMgr->LoadEventScripts(); @@ -1004,7 +1004,7 @@ public: } if (*args != 'a') - sLog->outString("Re-Loading Scripts from `waypoint_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `waypoint_scripts`..."); sObjectMgr->LoadWaypointScripts(); @@ -1017,7 +1017,7 @@ public: static bool HandleReloadWpCommand(ChatHandler* handler, const char* args) { if (*args != 'a') - sLog->outString("Re-Loading Waypoints data from 'waypoints_data'"); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Waypoints data from 'waypoints_data'"); sWaypointMgr->Load(); @@ -1030,7 +1030,7 @@ public: static bool HandleReloadEventAITextsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Texts from `creature_ai_texts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Texts from `creature_ai_texts`..."); sEventAIMgr->LoadCreatureEventAI_Texts(); handler->SendGlobalGMSysMessage("DB table `creature_ai_texts` reloaded."); return true; @@ -1038,7 +1038,7 @@ public: static bool HandleReloadEventAISummonsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Summons from `creature_ai_summons`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Summons from `creature_ai_summons`..."); sEventAIMgr->LoadCreatureEventAI_Summons(); handler->SendGlobalGMSysMessage("DB table `creature_ai_summons` reloaded."); return true; @@ -1046,7 +1046,7 @@ public: static bool HandleReloadEventAIScriptsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Scripts from `creature_ai_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `creature_ai_scripts`..."); sEventAIMgr->LoadCreatureEventAI_Scripts(); handler->SendGlobalGMSysMessage("DB table `creature_ai_scripts` reloaded."); return true; @@ -1062,7 +1062,7 @@ public: } if (*args != 'a') - sLog->outString("Re-Loading Scripts from `quest_end_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `quest_end_scripts`..."); sObjectMgr->LoadQuestEndScripts(); @@ -1082,7 +1082,7 @@ public: } if (*args != 'a') - sLog->outString("Re-Loading Scripts from `quest_start_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `quest_start_scripts`..."); sObjectMgr->LoadQuestStartScripts(); @@ -1102,7 +1102,7 @@ public: } if (*args != 'a') - sLog->outString("Re-Loading Scripts from `spell_scripts`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `spell_scripts`..."); sObjectMgr->LoadSpellScripts(); @@ -1114,7 +1114,7 @@ public: static bool HandleReloadDbScriptStringCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Script strings from `db_script_string`..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Script strings from `db_script_string`..."); sObjectMgr->LoadDbScriptStrings(); handler->SendGlobalGMSysMessage("DB table `db_script_string` reloaded."); return true; @@ -1122,7 +1122,7 @@ public: static bool HandleReloadGameGraveyardZoneCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Graveyard-zone links..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Graveyard-zone links..."); sObjectMgr->LoadGraveyardZones(); @@ -1133,7 +1133,7 @@ public: static bool HandleReloadGameTeleCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Game Tele coordinates..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Game Tele coordinates..."); sObjectMgr->LoadGameTele(); @@ -1144,9 +1144,9 @@ public: static bool HandleReloadDisablesCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading disables table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading disables table..."); DisableMgr::LoadDisables(); - sLog->outString("Checking quest disables..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Checking quest disables..."); DisableMgr::CheckQuestDisables(); handler->SendGlobalGMSysMessage("DB table `disables` reloaded."); return true; @@ -1154,7 +1154,7 @@ public: static bool HandleReloadLocalesAchievementRewardCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Achievement Reward Data..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Achievement Reward Data..."); sAchievementMgr->LoadRewardLocales(); handler->SendGlobalGMSysMessage("DB table `locales_achievement_reward` reloaded."); return true; @@ -1162,7 +1162,7 @@ public: static bool HandleReloadLfgRewardsCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading lfg dungeon rewards..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading lfg dungeon rewards..."); sLFGMgr->LoadRewards(); handler->SendGlobalGMSysMessage("DB table `lfg_dungeon_rewards` reloaded."); return true; @@ -1170,7 +1170,7 @@ public: static bool HandleReloadLocalesCreatureCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Creature ..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Creature ..."); sObjectMgr->LoadCreatureLocales(); handler->SendGlobalGMSysMessage("DB table `locales_creature` reloaded."); return true; @@ -1178,7 +1178,7 @@ public: static bool HandleReloadLocalesCreatureTextCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Creature Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Creature Texts..."); sCreatureTextMgr->LoadCreatureTextLocales(); handler->SendGlobalGMSysMessage("DB table `locales_creature_text` reloaded."); return true; @@ -1186,7 +1186,7 @@ public: static bool HandleReloadLocalesGameobjectCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Gameobject ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Gameobject ... "); sObjectMgr->LoadGameObjectLocales(); handler->SendGlobalGMSysMessage("DB table `locales_gameobject` reloaded."); return true; @@ -1194,7 +1194,7 @@ public: static bool HandleReloadLocalesGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString( "Re-Loading Locales Gossip Menu Option ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Gossip Menu Option ... "); sObjectMgr->LoadGossipMenuItemsLocales(); handler->SendGlobalGMSysMessage("DB table `locales_gossip_menu_option` reloaded."); return true; @@ -1202,7 +1202,7 @@ public: static bool HandleReloadLocalesItemCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Item ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Item ... "); sObjectMgr->LoadItemLocales(); handler->SendGlobalGMSysMessage("DB table `locales_item` reloaded."); return true; @@ -1210,7 +1210,7 @@ public: static bool HandleReloadLocalesItemSetNameCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Item set name... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Item set name... "); sObjectMgr->LoadItemSetNameLocales(); handler->SendGlobalGMSysMessage("DB table `locales_item_set_name` reloaded."); return true; @@ -1218,7 +1218,7 @@ public: static bool HandleReloadLocalesNpcTextCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales NPC Text ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales NPC Text ... "); sObjectMgr->LoadNpcTextLocales(); handler->SendGlobalGMSysMessage("DB table `locales_npc_text` reloaded."); return true; @@ -1226,7 +1226,7 @@ public: static bool HandleReloadLocalesPageTextCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Page Text ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Page Text ... "); sObjectMgr->LoadPageTextLocales(); handler->SendGlobalGMSysMessage("DB table `locales_page_text` reloaded."); return true; @@ -1234,7 +1234,7 @@ public: static bool HandleReloadLocalesPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Points Of Interest ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Points Of Interest ... "); sObjectMgr->LoadPointOfInterestLocales(); handler->SendGlobalGMSysMessage("DB table `locales_points_of_interest` reloaded."); return true; @@ -1242,7 +1242,7 @@ public: static bool HandleReloadLocalesQuestCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Locales Quest ... "); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Locales Quest ... "); sObjectMgr->LoadQuestLocales(); handler->SendGlobalGMSysMessage("DB table `locales_quest` reloaded."); return true; @@ -1250,7 +1250,7 @@ public: static bool HandleReloadMailLevelRewardCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Player level dependent mail rewards..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Player level dependent mail rewards..."); sObjectMgr->LoadMailLevelRewards(); handler->SendGlobalGMSysMessage("DB table `mail_level_reward` reloaded."); return true; @@ -1259,7 +1259,7 @@ public: static bool HandleReloadAuctionsCommand(ChatHandler* handler, const char* /*args*/) { ///- Reload dynamic data tables from the database - sLog->outString("Re-Loading Auctions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Auctions..."); sAuctionMgr->LoadAuctionItems(); sAuctionMgr->LoadAuctions(); handler->SendGlobalGMSysMessage("Auctions reloaded."); @@ -1268,7 +1268,7 @@ public: static bool HandleReloadConditions(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Conditions..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Conditions..."); sConditionMgr->LoadConditions(true); handler->SendGlobalGMSysMessage("Conditions reloaded."); return true; @@ -1276,7 +1276,7 @@ public: static bool HandleReloadCreatureText(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Creature Texts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Creature Texts..."); sCreatureTextMgr->LoadCreatureTexts(); handler->SendGlobalGMSysMessage("Creature Texts reloaded."); return true; @@ -1284,7 +1284,7 @@ public: static bool HandleReloadSmartScripts(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Re-Loading Smart Scripts..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Smart Scripts..."); sSmartScriptMgr->LoadSmartAIFromDB(); handler->SendGlobalGMSysMessage("Smart Scripts reloaded."); return true; @@ -1292,7 +1292,7 @@ public: static bool HandleReloadVehicleAccessoryCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Reloading vehicle_accessory table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Reloading vehicle_accessory table..."); sObjectMgr->LoadVehicleAccessories(); handler->SendGlobalGMSysMessage("Vehicle accessories reloaded."); return true; @@ -1300,7 +1300,7 @@ public: static bool HandleReloadVehicleTemplateAccessoryCommand(ChatHandler* handler, const char* /*args*/) { - sLog->outString("Reloading vehicle_template_accessory table..."); + sLog->outInfo(LOG_FILTER_GENERAL, "Reloading vehicle_template_accessory table..."); sObjectMgr->LoadVehicleTemplateAccessories(); handler->SendGlobalGMSysMessage("Vehicle template accessories reloaded."); return true; diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 88d648773eb..4da4147caa6 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -88,7 +88,7 @@ public: ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->getClass()); if (!classEntry) { - sLog->outError("Class %u not found in DBC (Wrong DBC files?)", player->getClass()); + sLog->outError(LOG_FILTER_GENERAL, "Class %u not found in DBC (Wrong DBC files?)", player->getClass()); return false; } diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 8f10af5fe2a..db1995ebb6e 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -67,7 +67,6 @@ public: { { "difftime", SEC_CONSOLE, true, &HandleServerSetDiffTimeCommand, "", NULL }, { "loglevel", SEC_CONSOLE, true, &HandleServerSetLogLevelCommand, "", NULL }, - { "logfilelevel", SEC_CONSOLE, true, &HandleServerSetLogFileLevelCommand, "", NULL }, { "motd", SEC_ADMINISTRATOR, true, &HandleServerSetMotdCommand, "", NULL }, { "closed", SEC_ADMINISTRATOR, true, &HandleServerSetClosedCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } @@ -85,7 +84,6 @@ public: { "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable }, { "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable }, { "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable }, - { "togglequerylog", SEC_CONSOLE, true, &HandleServerToggleQueryLogging, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; @@ -378,31 +376,20 @@ public: return false; } - // Set the level of logging - static bool HandleServerSetLogFileLevelCommand(ChatHandler* /*handler*/, char const* args) - { - if (!*args) - return false; - - char* newLevel = strtok((char*)args, " "); - if (!newLevel) - return false; - - sLog->SetLogFileLevel(newLevel); - return true; - } - // Set the level of logging static bool HandleServerSetLogLevelCommand(ChatHandler* /*handler*/, char const* args) { if (!*args) return false; - char* newLevel = strtok((char*)args, " "); - if (!newLevel) + char* type = strtok((char*)args, " "); + char* name = strtok(NULL, " "); + char* level = strtok(NULL, " "); + + if (!type || !name || !level || *name == '\0' || *level == '\0' || (*type != 'a' && *type != 'l')) return false; - sLog->SetLogLevel(newLevel); + sLog->SetLogLevel(name, level, *type == 'l'); return true; } @@ -425,18 +412,6 @@ public: return true; } - - // toggle sql driver query logging - static bool HandleServerToggleQueryLogging(ChatHandler* handler, char const* /*args*/) - { - sLog->SetSQLDriverQueryLogging(!sLog->GetSQLDriverQueryLogging()); - - if (sLog->GetSQLDriverQueryLogging()) - handler->PSendSysMessage(LANG_SQLDRIVER_QUERY_LOGGING_ENABLED); - else - handler->PSendSysMessage(LANG_SQLDRIVER_QUERY_LOGGING_DISABLED); - return true; - } }; void AddSC_server_commandscript() diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 27c90d3b45c..7286466d335 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -209,7 +209,7 @@ public: { instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me); instance->SetData(TYPE_RING_OF_LAW, DONE); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_grimstone: event reached end and set complete."); + sLog->outDebug(LOG_FILTER_TSCR, "npc_grimstone: event reached end and set complete."); } break; } diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp index 91cd5d2b9a5..0d02e4495a5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp @@ -212,7 +212,7 @@ public: void SetData64(uint32 type, uint64 data) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data); switch (type) { @@ -228,7 +228,7 @@ public: void SetData(uint32 type, uint32 data) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data); switch (type) { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp index c7e8a5ea771..30638e9edeb 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp @@ -364,7 +364,7 @@ public: Nefarian->setFaction(103); NefarianGUID = Nefarian->GetGUID(); } - else sLog->outError("TSCR: Blackwing Lair: Unable to spawn nefarian properly."); + else sLog->outError(LOG_FILTER_TSCR, "Blackwing Lair: Unable to spawn nefarian properly."); } AddSpawnTimer = 4000; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 959f1ac8f41..30d33dc65cf 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -1223,7 +1223,7 @@ public: } } - sLog->outError("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen."); + sLog->outError(LOG_FILTER_TSCR, "boss_romuloAI: DamageTaken reach end of code, that should not happen."); } void EnterCombat(Unit* /*who*/) @@ -1469,7 +1469,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama if (Phase == PHASE_ROMULO) { - sLog->outError("TSCR: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?"); + sLog->outError(LOG_FILTER_TSCR, "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?"); damage = 0; return; } @@ -1503,7 +1503,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama return; } } - sLog->outError("TSCR: boss_julianneAI: DamageTaken reach end of code, that should not happen."); + sLog->outError(LOG_FILTER_TSCR, "boss_julianneAI: DamageTaken reach end of code, that should not happen."); } void AddSC_bosses_opera() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 7e0a11da03a..b84fc15d664 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -229,7 +229,7 @@ public: void PrepareEncounter() { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId); + sLog->outDebug(LOG_FILTER_TSCR, "Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId); uint8 index = 0; uint8 count = 0; @@ -344,17 +344,17 @@ public: case GOSSIP_ACTION_INFO_DEF+3: player->CLOSE_GOSSIP_MENU(); pBarnesAI->m_uiEventId = EVENT_OZ; - sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID()); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+4: player->CLOSE_GOSSIP_MENU(); pBarnesAI->m_uiEventId = EVENT_HOOD; - sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID()); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+5: player->CLOSE_GOSSIP_MENU(); pBarnesAI->m_uiEventId = EVENT_RAJ; - sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID()); + sLog->outInfo(LOG_FILTER_TSCR, "TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID()); break; } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index 08b9a729596..e1817034189 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -62,6 +62,6 @@ enum OperaEvents EVENT_RAJ = 3 }; -#define ERROR_INST_DATA(a) sLog->outError("TSCR: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry()); +#define ERROR_INST_DATA(a) sLog->outError(LOG_FILTER_TSCR, "Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry()); #endif diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 8bdfeb26ca2..82ad3ee2630 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -76,7 +76,7 @@ public: for (uint8 i = 0; i < size; ++i) { uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Selin: Adding Fel Crystal " UI64FMTD " to list", guid); + sLog->outDebug(LOG_FILTER_TSCR, "Selin: Adding Fel Crystal " UI64FMTD " to list", guid); Crystals.push_back(guid); } } @@ -121,7 +121,7 @@ public: // Small door opened after event are expected to be closed by default // Set Inst data for encounter instance->SetData(DATA_SELIN_EVENT, NOT_STARTED); - } else sLog->outError(ERROR_INST_DATA); + } else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); DrainLifeTimer = urand(3000, 7000); DrainManaTimer = DrainLifeTimer + 5000; @@ -223,7 +223,7 @@ public: else { // Make an error message in case something weird happened here - sLog->outError("TSCR: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned"); + sLog->outError(LOG_FILTER_TSCR, "Selin Fireheart unable to drain crystal as the crystal is either dead or despawned"); DrainingCrystal = false; } } @@ -362,7 +362,7 @@ public: } } } - } else sLog->outError(ERROR_INST_DATA); + } else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); } }; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 33635cefa0a..677b94d8748 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -244,7 +244,7 @@ public: { if (FelCrystals.empty()) { - sLog->outError("TSCR: Magisters Terrace: No Fel Crystals loaded in Inst Data"); + sLog->outError(LOG_FILTER_TSCR, "Magisters Terrace: No Fel Crystals loaded in Inst Data"); return 0; } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index cc11d727dc2..c17a059d007 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -189,7 +189,7 @@ public: anchorGUID = anchor->GetGUID(); } else - sLog->outError("npc_unworthy_initiateAI: unable to find anchor!"); + sLog->outError(LOG_FILTER_TSCR, "npc_unworthy_initiateAI: unable to find anchor!"); float dist = 99.0f; GameObject* prison = NULL; @@ -209,7 +209,7 @@ public: if (prison) prison->ResetDoorOrButton(); else - sLog->outError("npc_unworthy_initiateAI: unable to find prison!"); + sLog->outError(LOG_FILTER_TSCR, "npc_unworthy_initiateAI: unable to find prison!"); } break; case PHASE_TO_EQUIP: @@ -1078,9 +1078,9 @@ public: { car->AI()->SetGUID(miner->GetGUID()); CAST_AI(npc_scarlet_miner::npc_scarlet_minerAI, miner->AI())->InitCartQuest(player); - } else sLog->outError("TSCR: OnGossipHello vehicle entry is not correct."); - } else sLog->outError("TSCR: OnGossipHello player is not on the vehicle."); - } else sLog->outError("TSCR: OnGossipHello Scarlet Miner cant be found by script."); + } else sLog->outError(LOG_FILTER_TSCR, "OnGossipHello vehicle entry is not correct."); + } else sLog->outError(LOG_FILTER_TSCR, "OnGossipHello player is not on the vehicle."); + } else sLog->outError(LOG_FILTER_TSCR, "OnGossipHello Scarlet Miner cant be found by script."); } return true; } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 338d88e71f0..98df9638bae 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -124,7 +124,7 @@ class instance_stratholme : public InstanceMapScript return true; } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Cannot open slaugther square yet."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: Cannot open slaugther square yet."); return false; } @@ -242,7 +242,7 @@ class instance_stratholme : public InstanceMapScript break; EncounterState[0] = data; events.ScheduleEvent(EVENT_BARON_RUN, 2700000); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Baron run in progress."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: Baron run in progress."); break; case FAIL: DoRemoveAurasDueToSpellOnPlayers(SPELL_BARON_ULTIMATUM); @@ -300,10 +300,10 @@ class instance_stratholme : public InstanceMapScript //UpdateGoState(ziggurat4GUID, 0, true); if (Creature* pBaron = instance->GetCreature(baronGUID)) pBaron->SummonCreature(C_RAMSTEIN, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Ramstein spawned."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: Ramstein spawned."); } else - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: %u Abomnation left to kill.", count); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: %u Abomnation left to kill.", count); } if (data == NOT_STARTED) @@ -312,7 +312,7 @@ class instance_stratholme : public InstanceMapScript if (data == DONE) { events.ScheduleEvent(EVENT_SLAUGHTER_SQUARE, 60000); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Slaugther event will continue in 1 minute."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: Slaugther event will continue in 1 minute."); } EncounterState[4] = data; break; @@ -448,7 +448,7 @@ class instance_stratholme : public InstanceMapScript case EVENT_BARON_RUN: if (GetData(TYPE_BARON_RUN) != DONE) SetData(TYPE_BARON_RUN, FAIL); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN)); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN)); break; case EVENT_SLAUGHTER_SQUARE: if (Creature* baron = instance->GetCreature(baronGUID)) @@ -458,7 +458,7 @@ class instance_stratholme : public InstanceMapScript HandleGameObject(ziggurat4GUID, true); HandleGameObject(ziggurat5GUID, true); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Black guard sentries spawned. Opening gates to baron."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Stratholme: Black guard sentries spawned. Opening gates to baron."); } break; default: diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 542f8168e0f..e40a48d0251 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -171,7 +171,7 @@ public: else { //Madrigosa not found, end intro - sLog->outError("Madrigosa was not found"); + sLog->outError(LOG_FILTER_TSCR, "Madrigosa was not found"); EndIntro(); } } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index f336a7ecfe7..57e69238816 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -270,7 +270,7 @@ public: } else { - sLog->outError("TSCR: Didn't find Shathrowar. Kalecgos event reseted."); + sLog->outError(LOG_FILTER_TSCR, "Didn't find Shathrowar. Kalecgos event reseted."); EnterEvadeMode(); return; } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 13201449a6e..167f040bbc4 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -755,7 +755,7 @@ public: if (pRandomPlayer) DoCast(pRandomPlayer, SPELL_LEGION_LIGHTNING, false); else - sLog->outError("try to cast SPELL_LEGION_LIGHTNING on invalid target"); + sLog->outError(LOG_FILTER_TSCR, "try to cast SPELL_LEGION_LIGHTNING on invalid target"); Timer[TIMER_LEGION_LIGHTNING] = (Phase == PHASE_SACRIFICE) ? 18000 : 30000; // 18 seconds in PHASE_SACRIFICE Timer[TIMER_SOUL_FLAY] = 2500; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 24e4b0d9aa1..68b3bdb9b7e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -135,7 +135,7 @@ public: } } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!"); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!"); return NULL; } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index c0023b006d7..8a102757036 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -248,7 +248,7 @@ class boss_janalai : public CreatureScript cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange()); } - //sLog->outError("Eggs %d at middle", templist.size()); + //sLog->outError(LOG_FILTER_TSCR, "Eggs %d at middle", templist.size()); if (templist.empty()) return false; @@ -534,7 +534,7 @@ class mob_janalai_hatcher : public CreatureScript cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange()); } - //sLog->outError("Eggs %d at %d", templist.size(), side); + //sLog->outError(LOG_FILTER_TSCR, "Eggs %d at %d", templist.size(), side); for (std::list::const_iterator i = templist.begin(); i != templist.end() && num > 0; ++i) if ((*i)->GetDisplayId() != 11686) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index f5d5a11084c..305e3813ebc 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -184,7 +184,7 @@ class instance_zulaman : public InstanceMapScript ss << "S " << BossKilled << ' ' << ChestLooted << ' ' << QuestMinute; char* data = new char[ss.str().length()+1]; strcpy(data, ss.str().c_str()); - //sLog->outError("TSCR: Zul'aman saved, %s.", data); + //sLog->outError(LOG_FILTER_TSCR, "Zul'aman saved, %s.", data); return data; } @@ -194,17 +194,17 @@ class instance_zulaman : public InstanceMapScript return; std::istringstream ss(load); - //sLog->outError("TSCR: Zul'aman loaded, %s.", ss.str().c_str()); + //sLog->outError(LOG_FILTER_TSCR, "Zul'aman loaded, %s.", ss.str().c_str()); char dataHead; // S uint16 data1, data2, data3; ss >> dataHead >> data1 >> data2 >> data3; - //sLog->outError("TSCR: Zul'aman loaded, %d %d %d.", data1, data2, data3); + //sLog->outError(LOG_FILTER_TSCR, "Zul'aman loaded, %d %d %d.", data1, data2, data3); if (dataHead == 'S') { BossKilled = data1; ChestLooted = data2; QuestMinute = data3; - } else sLog->outError("TSCR: Zul'aman: corrupted save data."); + } else sLog->outError(LOG_FILTER_TSCR, "Zul'aman: corrupted save data."); } void SetData(uint32 type, uint32 data) diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 1dc841d3518..17c3f5e8ff4 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -171,7 +171,7 @@ class boss_arlokk : public CreatureScript MarkedTargetGUID = pMarkedTarget->GetGUID(); } else - sLog->outError("TSCR: boss_arlokk could not accuire pMarkedTarget."); + sLog->outError(LOG_FILTER_TSCR, "boss_arlokk could not accuire pMarkedTarget."); m_uiMark_Timer = 15000; } diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp index 339e202fce1..870cb29c28d 100644 --- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp @@ -259,7 +259,7 @@ public: void UpdateAI(const uint32 diff) { - //sLog->outString("DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer); + //sLog->outInfo(LOG_FILTER_TSCR, "DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer); if (!QuestInProgress) return; diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 737d1eec8f8..cc27392919f 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -81,19 +81,19 @@ class spell_ex_5581 : public SpellScriptLoader { // this hook is executed before anything about casting the spell is done // after this hook is executed all the machinery starts - sLog->outString("Caster just finished preparing the spell (cast bar has expired)"); + sLog->outInfo(LOG_FILTER_GENERAL, "Caster just finished preparing the spell (cast bar has expired)"); } void HandleOnCast() { // cast is validated and spell targets are selected at this moment // this is a last place when the spell can be safely interrupted - sLog->outString("Spell is about to do take reagents, power, launch missile, do visuals and instant spell effects"); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell is about to do take reagents, power, launch missile, do visuals and instant spell effects"); } void HandleAfterCast() { - sLog->outString("All immediate Actions for the spell are finished now"); + sLog->outInfo(LOG_FILTER_GENERAL, "All immediate Actions for the spell are finished now"); // this is a safe for triggering additional effects for a spell without interfering // with visuals or with other effects of the spell //GetCaster()->CastSpell(target, SPELL_TRIGGERED, true); @@ -111,7 +111,7 @@ class spell_ex_5581 : public SpellScriptLoader void HandleDummyLaunch(SpellEffIndex /*effIndex*/) { - sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id); } void HandleDummyLaunchTarget(SpellEffIndex /*effIndex*/) @@ -120,17 +120,17 @@ class spell_ex_5581 : public SpellScriptLoader if (Unit* unitTarget = GetHitUnit()) targetGUID = unitTarget->GetGUID(); // we're handling SPELL_EFFECT_DUMMY in effIndex 0 here - sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID); } void HandleDummyHit(SpellEffIndex /*effIndex*/) { - sLog->outString("Spell %u with SPELL_EFFECT_DUMMY has hit!", GetSpellInfo()->Id); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell %u with SPELL_EFFECT_DUMMY has hit!", GetSpellInfo()->Id); } void HandleDummyHitTarget(SpellEffIndex /*effIndex*/) { - sLog->outString("SPELL_EFFECT_DUMMY is hits it's target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "SPELL_EFFECT_DUMMY is hits it's target!"); // make caster cast a spell on a unit target of effect if (Unit* target = GetHitUnit()) GetCaster()->CastSpell(target, SPELL_TRIGGERED, true); @@ -138,23 +138,23 @@ class spell_ex_5581 : public SpellScriptLoader void HandleBeforeHit() { - sLog->outString("Spell is about to hit target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell is about to hit target!"); } void HandleOnHit() { - sLog->outString("Spell just hit target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell just hit target!"); } void HandleAfterHit() { - sLog->outString("Spell just finished hitting target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell just finished hitting target!"); } void FilterTargets(std::list& /*targetList*/) { // usually you want this call for Area Target spells - sLog->outString("Spell is about to add targets from targetList to final targets!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Spell is about to add targets from targetList to final targets!"); } // register functions used in spell script - names of these functions do not matter @@ -229,20 +229,20 @@ class spell_ex_66244 : public SpellScriptLoader void HandleOnEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - sLog->outString("Aura Effect is about to be applied on target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Aura Effect is about to be applied on target!"); // this hook allows you to prevent execution of AuraEffect handler, or to replace it with your own handler //PreventDefaultAction(); } void HandleOnEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - sLog->outString("Aura Effect is about to be removed from target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Aura Effect is about to be removed from target!"); // this hook allows you to prevent execution of AuraEffect handler, or to replace it with your own handler //PreventDefaultAction(); } void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - sLog->outString("Aura Effect has just been applied on target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Aura Effect has just been applied on target!"); Unit* target = GetTarget(); // cast spell on target on aura apply target->CastSpell(target, SPELL_TRIGGERED, true); @@ -250,7 +250,7 @@ class spell_ex_66244 : public SpellScriptLoader void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - sLog->outString("Aura Effect has just been just removed from target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Aura Effect has just been just removed from target!"); Unit* target = GetTarget(); Unit* caster = GetCaster(); // caster may be not avalible (logged out for example) @@ -262,7 +262,7 @@ class spell_ex_66244 : public SpellScriptLoader void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { - sLog->outString("Perioidic Aura Effect is does a tick on target!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Perioidic Aura Effect is does a tick on target!"); Unit* target = GetTarget(); // aura targets damage self on tick target->DealDamage(target, 100); @@ -270,14 +270,14 @@ class spell_ex_66244 : public SpellScriptLoader void HandleEffectPeriodicUpdate(AuraEffect* aurEff) { - sLog->outString("Perioidic Aura Effect is now updated!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Perioidic Aura Effect is now updated!"); // we're doubling aura amount every tick aurEff->ChangeAmount(aurEff->GetAmount() * 2); } void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) { - sLog->outString("Amount of Aura Effect is being calculated now!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Amount of Aura Effect is being calculated now!"); // we're setting amount to 100 amount = 100; // amount will be never recalculated due to applying passive aura @@ -286,7 +286,7 @@ class spell_ex_66244 : public SpellScriptLoader void HandleEffectCalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude) { - sLog->outString("Periodic data of Aura Effect is being calculated now!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Periodic data of Aura Effect is being calculated now!"); // we're setting aura to be periodic and tick every 10 seconds isPeriodic = true; amplitude = 2 * IN_MILLISECONDS; @@ -294,7 +294,7 @@ class spell_ex_66244 : public SpellScriptLoader void HandleEffectCalcSpellMod(AuraEffect const* /*aurEff*/, SpellModifier*& spellMod) { - sLog->outString("SpellMod data of Aura Effect is being calculated now!"); + sLog->outInfo(LOG_FILTER_GENERAL, "SpellMod data of Aura Effect is being calculated now!"); // we don't want spellmod for example if (spellMod) { @@ -367,14 +367,14 @@ class spell_ex_absorb_aura : public SpellScriptLoader void HandleOnEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { - sLog->outString("Our aura is now absorbing damage done to us!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Our aura is now absorbing damage done to us!"); // absorb whole damage done to us absorbAmount = dmgInfo.GetDamage(); } void HandleAfterEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) { - sLog->outString("Our aura has absorbed %u damage!", absorbAmount); + sLog->outInfo(LOG_FILTER_GENERAL, "Our aura has absorbed %u damage!", absorbAmount); } // function registering @@ -403,7 +403,7 @@ class spell_ex_463 : public SpellScriptLoader bool CheckAreaTarget(Unit* target) { - sLog->outString("Area aura checks if unit is a valid target for it!"); + sLog->outInfo(LOG_FILTER_GENERAL, "Area aura checks if unit is a valid target for it!"); // in our script we allow only players to be affected return target->GetTypeId() == TYPEID_PLAYER; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp index 1be8f8e058f..5b6dc784113 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp @@ -71,7 +71,7 @@ public: break; case GOSSIP_ACTION_INFO_DEF: ai->Debug = !ai->Debug; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: HyjalAI - Debug mode has been toggled"); + sLog->outDebug(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled"); break; } return true; @@ -148,7 +148,7 @@ public: break; case GOSSIP_ACTION_INFO_DEF: ai->Debug = !ai->Debug; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: HyjalAI - Debug mode has been toggled"); + sLog->outDebug(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled"); break; } return true; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index a407f86ba70..aa41fa992dc 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -407,7 +407,7 @@ void hyjalAI::Reset() instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); instance->SetData(DATA_RESET_TRASH_COUNT, 0); } - } else sLog->outError(ERROR_INST_DATA); + } else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); //Visibility DoHide = true; @@ -540,7 +540,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3] if (!instance) { - sLog->outError(ERROR_INST_DATA); + sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); return; } InfernalCount = 0;//reset infernal count every new wave @@ -570,7 +570,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3] else { NextWaveTimer = 15000; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: HyjalAI: debug mode is enabled. Next Wave in 15 seconds"); + sLog->outDebug(LOG_FILTER_TSCR, "HyjalAI: debug mode is enabled. Next Wave in 15 seconds"); } } else @@ -614,7 +614,7 @@ uint32 hyjalAI::GetInstanceData(uint32 Event) { if (instance) return instance->GetData(Event); - else sLog->outError(ERROR_INST_DATA); + else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); return 0; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 69bb8285404..caff71c7320 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -273,7 +273,7 @@ public: break; } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data); if (data == DONE) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index f7c4a21634c..ee8c4d1bae1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -326,7 +326,7 @@ public: uint32 entry = 0; entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount]; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry); + sLog->outDebug(LOG_FILTER_TSCR, "npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry); ++mRiftWaveCount; @@ -351,7 +351,7 @@ public: if (me->IsNonMeleeSpellCasted(false)) return; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_time_rift: not casting anylonger, i need to die."); + sLog->outDebug(LOG_FILTER_TSCR, "npc_time_rift: not casting anylonger, i need to die."); me->setDeathState(JUST_DIED); if (instance->GetData(TYPE_RIFT) == IN_PROGRESS) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp index fbbe750626b..da34eff7b77 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp @@ -193,7 +193,7 @@ public: { if (data == IN_PROGRESS) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: Starting event."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Starting event."); InitWorldState(); m_auiEncounter[1] = IN_PROGRESS; NextPortal_Timer = 15000; @@ -202,7 +202,7 @@ public: if (data == DONE) { //this may be completed further out in the post-event - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: Event completed."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Event completed."); Map::PlayerList const& players = instance->GetPlayers(); if (!players.isEmpty()) @@ -267,7 +267,7 @@ public: if (entry == RIFT_BOSS) entry = RandRiftBoss(); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: Summoning rift boss entry %u.", entry); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Summoning rift boss entry %u.", entry); Position pos; me->GetRandomNearPosition(pos, 10.0f); @@ -278,7 +278,7 @@ public: if (Creature* summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) return summon; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun..."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: What just happened there? No boss, no loot, no fun..."); return NULL; } @@ -291,7 +291,7 @@ public: if (tmp >= CurrentRiftId) ++tmp; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", tmp, CurrentRiftId); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", tmp, CurrentRiftId); CurrentRiftId = tmp; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index ea8aab5d46a..7f7cbeaf566 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -85,7 +85,7 @@ public: } } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!"); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!"); return NULL; } @@ -125,7 +125,7 @@ public: if (!player) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data); return; } @@ -141,7 +141,7 @@ public: ++mBarrelCount; DoUpdateWorldState(WORLD_STATE_OH, mBarrelCount); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount); m_auiEncounter[0] = IN_PROGRESS; @@ -162,7 +162,7 @@ public: { ++mThrallEventCount; m_auiEncounter[1] = NOT_STARTED; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount); m_auiEncounter[2] = NOT_STARTED; m_auiEncounter[3] = NOT_STARTED; m_auiEncounter[4] = NOT_STARTED; @@ -175,29 +175,29 @@ public: m_auiEncounter[3] = data; m_auiEncounter[4] = data; m_auiEncounter[5] = data; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount); } } else m_auiEncounter[1] = data; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.", data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall escort event adjusted to data %u.", data); break; } case TYPE_THRALL_PART1: m_auiEncounter[2] = data; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.", data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part I adjusted to data %u.", data); break; case TYPE_THRALL_PART2: m_auiEncounter[3] = data; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.", data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part II adjusted to data %u.", data); break; case TYPE_THRALL_PART3: m_auiEncounter[4] = data; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.", data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part III adjusted to data %u.", data); break; case TYPE_THRALL_PART4: m_auiEncounter[5] = data; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.", data); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.", data); break; } } diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index 374c2ae4257..cce0f8b180e 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -64,7 +64,7 @@ public: return player; } } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!"); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!"); return NULL; } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 92fd27a5680..95c6d033aab 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -181,7 +181,7 @@ public: { instance = creature->GetInstanceScript(); if (!instance) - sLog->outError("TSCR: No Instance eye_of_cthunAI"); + sLog->outError(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI"); } InstanceScript* instance; @@ -487,7 +487,7 @@ public: instance = creature->GetInstanceScript(); if (!instance) - sLog->outError("TSCR: No Instance eye_of_cthunAI"); + sLog->outError(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI"); } InstanceScript* instance; diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 608117ca9af..4a8ff4780ba 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -550,7 +550,7 @@ public: } } else - sLog->outError("SD2 ERROR: FlagList is empty!"); + sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: FlagList is empty!"); } void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 1fd1fdf094d..4dfe5708025 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -394,7 +394,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript if (type < MAX_ENCOUNTERS) { - sLog->outDetail("[ToCr] EncounterStatus[type %u] %u = data %u;", type, EncounterStatus[type], data); + sLog->outInfo(LOG_FILTER_TSCR, "[ToCr] EncounterStatus[type %u] %u = data %u;", type, EncounterStatus[type], data); if (data == FAIL) { --TrialCounter; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index faaea9c4cae..2ea234775c0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -200,7 +200,7 @@ class boss_gothik : public CreatureScript if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD) { - sLog->outError("Script Gothik: cannot summon triggers!"); + sLog->outError(LOG_FILTER_TSCR, "Script Gothik: cannot summon triggers!"); EnterEvadeMode(); return; } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index cf3bc2d8607..1e79cc1c5bf 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -120,7 +120,7 @@ public: } } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!"); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!"); return NULL; } diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 326d214e886..9facb42107b 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -110,7 +110,7 @@ public: if (creature->isAlive()) { ++m_uiFelOverseerCount; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Shadow Labyrinth: counting %u Fel Overseers.", m_uiFelOverseerCount); + sLog->outDebug(LOG_FILTER_TSCR, "Shadow Labyrinth: counting %u Fel Overseers.", m_uiFelOverseerCount); } break; } @@ -127,7 +127,7 @@ public: case TYPE_OVERSEER: if (uiData != DONE) { - sLog->outError("TSCR: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); + sLog->outError(LOG_FILTER_TSCR, "Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); return; } if (m_uiFelOverseerCount) @@ -135,11 +135,11 @@ public: --m_uiFelOverseerCount; if (m_uiFelOverseerCount) - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Shadow Labyrinth: %u Fel Overseers left to kill.", m_uiFelOverseerCount); + sLog->outDebug(LOG_FILTER_TSCR, "Shadow Labyrinth: %u Fel Overseers left to kill.", m_uiFelOverseerCount); else { m_auiEncounter[1] = DONE; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Shadow Labyrinth: TYPE_OVERSEER == DONE"); + sLog->outDebug(LOG_FILTER_TSCR, "Shadow Labyrinth: TYPE_OVERSEER == DONE"); } } break; diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 52704cb8f49..6fd6f61c061 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -798,7 +798,7 @@ public: { EnterEvadeMode(); me->MonsterTextEmote(EMOTE_UNABLE_TO_SUMMON, 0); - sLog->outError("SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)"); + sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)"); } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 81be46a197c..2757a862c93 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -322,7 +322,7 @@ public: GridSearcherSucceeded = true; } } - } else sLog->outError("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly"); + } else sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly"); } } @@ -340,13 +340,13 @@ public: if (reseting) return; - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Increasing Death Count for Shade of Akama encounter"); + sLog->outDebug(LOG_FILTER_TSCR, "Increasing Death Count for Shade of Akama encounter"); ++DeathCount; me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2); if (guid) { if (Sorcerers.empty()) - sLog->outError("SD2 ERROR: Shade of Akama - attempt to remove guid " UI64FMTD " from Sorcerers list but list is already empty", guid); + sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: Shade of Akama - attempt to remove guid " UI64FMTD " from Sorcerers list but list is already empty", guid); else Sorcerers.remove(guid); } } @@ -398,17 +398,17 @@ public: { CAST_AI(mob_ashtongue_channeler::mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = me->GetGUID(); Channelers.push_back((*itr)->GetGUID()); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Shade of Akama Grid Search found channeler " UI64FMTD ". Adding to list", (*itr)->GetGUID()); + sLog->outDebug(LOG_FILTER_TSCR, "Shade of Akama Grid Search found channeler " UI64FMTD ". Adding to list", (*itr)->GetGUID()); } } - else sLog->outError("SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy"); + else sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy"); } void SetSelectableChannelers() { if (Channelers.empty()) { - sLog->outError("SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy"); + sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy"); return; } @@ -534,7 +534,7 @@ void mob_ashtongue_channeler::mob_ashtongue_channelerAI::JustDied(Unit* /*killer Creature* Shade = (Unit::GetCreature((*me), ShadeGUID)); if (Shade && Shade->isAlive()) CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(); - else sLog->outError("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama."); + else sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama."); } void mob_ashtongue_sorcerer::mob_ashtongue_sorcererAI::JustDied(Unit* /*killer*/) @@ -542,7 +542,7 @@ void mob_ashtongue_sorcerer::mob_ashtongue_sorcererAI::JustDied(Unit* /*killer*/ Creature* Shade = (Unit::GetCreature((*me), ShadeGUID)); if (Shade && Shade->isAlive()) CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(me->GetGUID()); - else sLog->outError("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama."); + else sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama."); } class npc_akama_shade : public CreatureScript diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index 9197492fbf1..710f5c82fab 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -159,7 +159,7 @@ public: Council[1] = instance->GetData64(DATA_VERASDARKSHADOW); Council[2] = instance->GetData64(DATA_LADYMALANDE); Council[3] = instance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); - } else sLog->outError(ERROR_INST_DATA); + } else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); } void EnterCombat(Unit* /*who*/) {} @@ -406,7 +406,7 @@ struct boss_illidari_councilAI : public ScriptedAI } else { - sLog->outError(ERROR_INST_DATA); + sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); EnterEvadeMode(); return; } @@ -454,7 +454,7 @@ struct boss_illidari_councilAI : public ScriptedAI { if (!instance) { - sLog->outError(ERROR_INST_DATA); + sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); return; } diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 310bb6da651..98d90aa1818 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -138,7 +138,7 @@ public: } } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Black Temple: GetPlayerInMap, but PlayerList is empty!"); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Black Temple: GetPlayerInMap, but PlayerList is empty!"); return NULL; } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index 63fd935751d..26ab54746be 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -139,7 +139,7 @@ public: if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) HandleGameObject(MainChambersDoor, true); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Steamvault: Access panel used."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Steamvault: Access panel used."); } m_auiEncounter[0] = data; break; @@ -151,7 +151,7 @@ public: if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) HandleGameObject(MainChambersDoor, true); - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Steamvault: Access panel used."); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Steamvault: Access panel used."); } m_auiEncounter[1] = data; break; diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index c100fa204e2..ba7b5afb4c8 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -67,7 +67,7 @@ class instance_ramparts : public InstanceMapScript void SetData(uint32 uiType, uint32 uiData) { - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Ramparts: SetData received for type %u with data %u", uiType, uiData); + sLog->outDebug(LOG_FILTER_TSCR, "Instance Ramparts: SetData received for type %u with data %u", uiType, uiData); switch (uiType) { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index e5dd1c923d9..f60cc1d188c 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -366,7 +366,7 @@ class boss_kaelthas : public CreatureScript if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3]) { - sLog->outError("TSCR: Kael'Thas One or more advisors missing, Skipping Phases 1-3"); + sLog->outError(LOG_FILTER_TSCR, "Kael'Thas One or more advisors missing, Skipping Phases 1-3"); DoScriptText(SAY_PHASE4_INTRO2, me); @@ -694,7 +694,7 @@ class boss_kaelthas : public CreatureScript Advisor = Unit::GetCreature((*me), m_auiAdvisorGuid[i]); if (!Advisor) - sLog->outError("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i); + sLog->outError(LOG_FILTER_TSCR, "SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i); else CAST_AI(advisorbase_ai, Advisor->AI())->Revive(target); } diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp index 6825d859332..4c44d4e828e 100644 --- a/src/server/scripts/Outland/hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/hellfire_peninsula.cpp @@ -160,7 +160,7 @@ public: if (creature->GetOwner() && creature->GetOwner()->GetTypeId() == TYPEID_PLAYER) Start(false, false, creature->GetOwner()->GetGUID()); else - sLog->outError("TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player."); + sLog->outError(LOG_FILTER_TSCR, "TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player."); creature->SetSpeed(MOVE_WALK, 1.5f); Reset(); diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index e5795383ede..480275c42bd 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -498,7 +498,7 @@ public: return true; } - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_commander_dawnforge event already in progress, need to wait."); + sLog->outDebug(LOG_FILTER_TSCR, "npc_commander_dawnforge event already in progress, need to wait."); return false; } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 3a4132f62fe..bb0fd1e73ab 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -350,7 +350,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]); if (!spellInfo) { - sLog->outError("Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName(), player->GetGUIDLow(), enchant->spellid[s]); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName(), player->GetGUIDLow(), enchant->spellid[s]); continue; } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index fec30bbdd96..e0131190916 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -202,7 +202,7 @@ class spell_warl_create_healthstone : public SpellScriptLoader case WARLOCK_IMPROVED_HEALTHSTONE_R1: rank = 1; break; case WARLOCK_IMPROVED_HEALTHSTONE_R2: rank = 2; break; default: - sLog->outError("Unknown rank of Improved Healthstone id: %d", aurEff->GetId()); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Unknown rank of Improved Healthstone id: %d", aurEff->GetId()); break; } } diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index aaeb8a13acd..fb540c177bc 100755 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -31,25 +31,25 @@ public: { case CHAT_MSG_ADDON: if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON)) - sLog->outChat("[ADDON] Player %s sends: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s sends: %s", player->GetName(), msg.c_str()); break; case CHAT_MSG_SAY: if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC)) - sLog->outChat("[SAY] Player %s says (language %u): %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[SAY] Player %s says (language %u): %s", player->GetName(), lang, msg.c_str()); break; case CHAT_MSG_EMOTE: if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC)) - sLog->outChat("[TEXTEMOTE] Player %s emotes: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[TEXTEMOTE] Player %s emotes: %s", player->GetName(), msg.c_str()); break; case CHAT_MSG_YELL: if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC)) - sLog->outChat("[YELL] Player %s yells (language %u): %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[YELL] Player %s yells (language %u): %s", player->GetName(), lang, msg.c_str()); break; } @@ -58,10 +58,10 @@ public: void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) { if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_WHISPER)) - sLog->outChat("[WHISPER] Player %s tells %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[WHISPER] Player %s tells %s: %s", player->GetName(), receiver ? receiver->GetName() : "", msg.c_str()); else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON)) - sLog->outChat("[ADDON] Player %s tells %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells %s: %s", player->GetName(), receiver ? receiver->GetName() : "", msg.c_str()); } @@ -73,52 +73,52 @@ public: { case CHAT_MSG_PARTY: if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY)) - sLog->outChat("[PARTY] Player %s tells group with leader %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[PARTY] Player %s tells group with leader %s: %s", player->GetName(), group ? group->GetLeaderName() : "", msg.c_str()); else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON)) - sLog->outChat("[ADDON] Player %s tells group with leader %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells group with leader %s: %s", player->GetName(), group ? group->GetLeaderName() : "", msg.c_str()); break; case CHAT_MSG_PARTY_LEADER: if (sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY)) - sLog->outChat("[PARTY] Leader %s tells group: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[PARTY] Leader %s tells group: %s", player->GetName(), msg.c_str()); break; case CHAT_MSG_RAID: if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_RAID)) - sLog->outChat("[RAID] Player %s tells raid with leader %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Player %s tells raid with leader %s: %s", player->GetName(), group ? group->GetLeaderName() : "", msg.c_str()); else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON)) - sLog->outChat("[ADDON] Player %s tells raid with leader %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells raid with leader %s: %s", player->GetName(), group ? group->GetLeaderName() : "", msg.c_str()); break; case CHAT_MSG_RAID_LEADER: if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID)) - sLog->outChat("[RAID] Leader player %s tells raid: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Leader player %s tells raid: %s", player->GetName(), msg.c_str()); break; case CHAT_MSG_RAID_WARNING: if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID)) - sLog->outChat("[RAID] Leader player %s warns raid with: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Leader player %s warns raid with: %s", player->GetName(), msg.c_str()); break; case CHAT_MSG_BATTLEGROUND: if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND)) - sLog->outChat("[BATTLEGROUND] Player %s tells battleground with leader %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[BATTLEGROUND] Player %s tells battleground with leader %s: %s", player->GetName(), group ? group->GetLeaderName() : "", msg.c_str()); else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON)) - sLog->outChat("[ADDON] Player %s tells battleground with leader %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells battleground with leader %s: %s", player->GetName(), group ? group->GetLeaderName() : "", msg.c_str()); break; case CHAT_MSG_BATTLEGROUND_LEADER: if (sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND)) - sLog->outChat("[BATTLEGROUND] Leader player %s tells battleground: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[BATTLEGROUND] Leader player %s tells battleground: %s", player->GetName(), msg.c_str()); break; } @@ -130,16 +130,16 @@ public: { case CHAT_MSG_GUILD: if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD)) - sLog->outChat("[GUILD] Player %s tells guild %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[GUILD] Player %s tells guild %s: %s", player->GetName(), guild ? guild->GetName().c_str() : "", msg.c_str()); else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON)) - sLog->outChat("[ADDON] Player %s sends to guild %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s sends to guild %s: %s", player->GetName(), guild ? guild->GetName().c_str() : "", msg.c_str()); break; case CHAT_MSG_OFFICER: if (sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD)) - sLog->outChat("[OFFICER] Player %s tells guild %s officers: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[OFFICER] Player %s tells guild %s officers: %s", player->GetName(), guild ? guild->GetName().c_str() : "", msg.c_str()); break; } @@ -154,10 +154,10 @@ public: channel->HasFlag(CHANNEL_FLAG_LFG)); if (sWorld->getBoolConfig(CONFIG_CHATLOG_SYSCHAN) && isSystem) - sLog->outChat("[SYSCHAN] Player %s tells channel %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[SYSCHAN] Player %s tells channel %s: %s", player->GetName(), channel->GetName().c_str(), msg.c_str()); else if (sWorld->getBoolConfig(CONFIG_CHATLOG_CHANNEL)) - sLog->outChat("[CHANNEL] Player %s tells channel %s: %s", + sLog->outDebug(LOG_FILTER_PLAYER_CHATLOG, "[CHANNEL] Player %s tells channel %s: %s", player->GetName(), channel ? channel->GetName().c_str() : "", msg.c_str()); } }; diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index ad870b155f3..3ce136b9737 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -329,7 +329,7 @@ public: if (Spell) creature->CastSpell(player, Spell, false); else - sLog->outError("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction()); + sLog->outError(LOG_FILTER_TSCR, "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction()); } } } diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 9126e268260..175cfb190d7 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -244,7 +244,7 @@ bool EquippedOk(Player* player, uint32 spellId) if (item && item->GetTemplate()->RequiredSpell == reqSpell) { //player has item equipped that require specialty. Not allow to unlearn, player has to unequip first - sLog->outDebug(LOG_FILTER_TSCR, "TSCR: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry()); + sLog->outDebug(LOG_FILTER_TSCR, "player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry()); return false; } } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 4eea4999b0b..5640a84317c 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -141,14 +141,14 @@ public: } if (!SpawnAssoc) - sLog->outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry()); + sLog->outError(LOG_FILTER_SQL, "TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry()); else { CreatureTemplate const* spawnedTemplate = sObjectMgr->GetCreatureTemplate(SpawnAssoc->spawnedCreatureEntry); if (!spawnedTemplate) { - sLog->outErrorDb("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry); + sLog->outError(LOG_FILTER_SQL, "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry); SpawnAssoc = NULL; return; } @@ -168,7 +168,7 @@ public: SpawnedGUID = summoned->GetGUID(); else { - sLog->outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry); + sLog->outError(LOG_FILTER_SQL, "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry); SpawnAssoc = NULL; } @@ -846,7 +846,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 const diff) patientEntry = HordeSoldierId[rand() % 3]; break; default: - sLog->outError("TSCR: Invalid entry for Triage doctor. Please check your database"); + sLog->outError(LOG_FILTER_TSCR, "Invalid entry for Triage doctor. Please check your database"); return; } diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp index b82d86cc5d0..e0df22b88ae 100755 --- a/src/server/shared/Configuration/Config.cpp +++ b/src/server/shared/Configuration/Config.cpp @@ -80,7 +80,7 @@ std::string GetStringDefault(const char* name, const std::string &def) { ACE_TString val; return GetValueHelper(name, val) ? val.c_str() : def; -}; +} bool GetBoolDefault(const char* name, bool def) { @@ -91,19 +91,19 @@ bool GetBoolDefault(const char* name, bool def) return (val == "true" || val == "TRUE" || val == "yes" || val == "YES" || val == "1"); -}; +} int GetIntDefault(const char* name, int def) { ACE_TString val; return GetValueHelper(name, val) ? atoi(val.c_str()) : def; -}; +} float GetFloatDefault(const char* name, float def) { ACE_TString val; return GetValueHelper(name, val) ? (float)atof(val.c_str()) : def; -}; +} const std::string & GetFilename() { diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h index a870379881b..82e4d9bcce0 100755 --- a/src/server/shared/Configuration/Config.h +++ b/src/server/shared/Configuration/Config.h @@ -34,4 +34,3 @@ namespace ConfigMgr } #endif - diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h index 7081b4973d4..b40ce8ac40c 100755 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h @@ -41,4 +41,3 @@ class AuthCrypt bool _initialized; }; #endif - diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index c5b8b6f5a21..9965a5c1d71 100755 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -117,7 +117,7 @@ class DBCStorage // Check if sql index pos is valid if (int32(result->GetFieldCount()-1) < sql->sqlIndexPos) { - sLog->outError("Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str()); return false; } } @@ -148,7 +148,7 @@ class DBCStorage uint32 id = fields[sql->sqlIndexPos].GetUInt32(); if (indexTable.asT[id]) { - sLog->outError("Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str()); return false; } indexTable.asT[id]=(T*)&sqlDataTable[offset]; @@ -203,7 +203,7 @@ class DBCStorage offset+=1; break; case FT_STRING: - sLog->outError("Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); + sLog->outError(LOG_FILTER_GENERAL, "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); return false; case FT_SORT: break; @@ -215,13 +215,13 @@ class DBCStorage } else { - sLog->outError("Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); + sLog->outError(LOG_FILTER_GENERAL, "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); return false; } } if (sqlColumnNumber != (result->GetFieldCount()-1)) { - sLog->outError("SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str()); + sLog->outError(LOG_FILTER_GENERAL, "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str()); return false; } diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index 314d196cc06..d86b99a062a 100755 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -64,7 +64,7 @@ class DatabaseWorkerPool bool res = true; _connectionInfo = MySQLConnectionInfo(infoString); - sLog->outSQLDriver("Opening DatabasePool '%s'. Asynchronous connections: %u, synchronous connections: %u.", + sLog->outWarn(LOG_FILTER_SQL, "Opening DatabasePool '%s'. Asynchronous connections: %u, synchronous connections: %u.", GetDatabaseName(), async_threads, synch_threads); //! Open asynchronous connections (delayed operations) @@ -88,17 +88,17 @@ class DatabaseWorkerPool } if (res) - sLog->outSQLDriver("DatabasePool '%s' opened successfully. %u total connections running.", GetDatabaseName(), + sLog->outWarn(LOG_FILTER_SQL, "DatabasePool '%s' opened successfully. %u total connections running.", GetDatabaseName(), (_connectionCount[IDX_SYNCH] + _connectionCount[IDX_ASYNC])); else - sLog->outError("DatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile " + sLog->outError(LOG_FILTER_SQL, "DatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile " "for specific errors.", GetDatabaseName()); return res; } void Close() { - sLog->outSQLDriver("Closing down DatabasePool '%s'.", GetDatabaseName()); + sLog->outWarn(LOG_FILTER_SQL, "Closing down DatabasePool '%s'.", GetDatabaseName()); //! Shuts down delaythreads for this connection pool by underlying deactivate(). //! The next dequeue attempt in the worker thread tasks will result in an error, @@ -114,7 +114,7 @@ class DatabaseWorkerPool t->Close(); //! Closes the actualy MySQL connection. } - sLog->outSQLDriver("Asynchronous connections on DatabasePool '%s' terminated. Proceeding with synchronous connections.", + sLog->outWarn(LOG_FILTER_SQL, "Asynchronous connections on DatabasePool '%s' terminated. Proceeding with synchronous connections.", GetDatabaseName()); //! Shut down the synchronous connections @@ -127,7 +127,7 @@ class DatabaseWorkerPool //! Deletes the ACE_Activation_Queue object and its underlying ACE_Message_Queue delete _queue; - sLog->outSQLDriver("All connections on DatabasePool '%s' closed.", GetDatabaseName()); + sLog->outWarn(LOG_FILTER_SQL, "All connections on DatabasePool '%s' closed.", GetDatabaseName()); } /** @@ -351,10 +351,10 @@ class DatabaseWorkerPool switch (transaction->GetSize()) { case 0: - sLog->outSQLDriver("Transaction contains 0 queries. Not executing."); + sLog->outWarn(LOG_FILTER_SQL, "Transaction contains 0 queries. Not executing."); return; case 1: - sLog->outSQLDriver("Warning: Transaction only holds 1 query, consider removing Transaction context in code."); + sLog->outWarn(LOG_FILTER_SQL, "Warning: Transaction only holds 1 query, consider removing Transaction context in code."); break; default: break; diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h index bfa42dbe574..61e8fb7ccef 100755 --- a/src/server/shared/Database/Field.h +++ b/src/server/shared/Database/Field.h @@ -43,7 +43,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_TINY)) { - sLog->outSQLDriver("Warning: GetUInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetUInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -61,7 +61,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_TINY)) { - sLog->outSQLDriver("Warning: GetInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -79,7 +79,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_SHORT) && !IsType(MYSQL_TYPE_YEAR)) { - sLog->outSQLDriver("Warning: GetUInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetUInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -97,7 +97,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_SHORT) && !IsType(MYSQL_TYPE_YEAR)) { - sLog->outSQLDriver("Warning: GetInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -115,7 +115,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_INT24) && !IsType(MYSQL_TYPE_LONG)) { - sLog->outSQLDriver("Warning: GetUInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetUInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -133,7 +133,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_INT24) && !IsType(MYSQL_TYPE_LONG)) { - sLog->outSQLDriver("Warning: GetInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -151,7 +151,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_LONGLONG) && !IsType(MYSQL_TYPE_BIT)) { - sLog->outSQLDriver("Warning: GetUInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetUInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -169,7 +169,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_LONGLONG) && !IsType(MYSQL_TYPE_BIT)) { - sLog->outSQLDriver("Warning: GetInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type)); return 0; } #endif @@ -187,7 +187,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_FLOAT)) { - sLog->outSQLDriver("Warning: GetFloat() on non-float field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetFloat() on non-float field. Using type: %s.", FieldTypeToString(data.type)); return 0.0f; } #endif @@ -205,7 +205,7 @@ class Field #ifdef TRINITY_DEBUG if (!IsType(MYSQL_TYPE_DOUBLE)) { - sLog->outSQLDriver("Warning: GetDouble() on non-double field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Warning: GetDouble() on non-double field. Using type: %s.", FieldTypeToString(data.type)); return 0.0f; } #endif @@ -223,7 +223,7 @@ class Field #ifdef TRINITY_DEBUG if (IsNumeric()) { - sLog->outSQLDriver("Error: GetCString() on numeric field. Using type: %s.", FieldTypeToString(data.type)); + sLog->outWarn(LOG_FILTER_SQL, "Error: GetCString() on numeric field. Using type: %s.", FieldTypeToString(data.type)); return NULL; } #endif @@ -322,7 +322,7 @@ class Field MYSQL_TYPE_SET: */ default: - sLog->outSQLDriver("SQL::SizeForType(): invalid field type %u", uint32(field->type)); + sLog->outWarn(LOG_FILTER_SQL, "SQL::SizeForType(): invalid field type %u", uint32(field->type)); return 0; } } diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 7fb4a4f7025..324efab067e 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -22,6 +22,8 @@ #include #endif #include +#include +#include #include "MySQLConnection.h" #include "MySQLThreading.h" @@ -79,7 +81,7 @@ bool MySQLConnection::Open() mysqlInit = mysql_init(NULL); if (!mysqlInit) { - sLog->outError("Could not initialize Mysql connection to database `%s`", m_connectionInfo.database.c_str()); + sLog->outError(LOG_FILTER_SQL, "Could not initialize Mysql connection to database `%s`", m_connectionInfo.database.c_str()); return false; } @@ -123,13 +125,13 @@ bool MySQLConnection::Open() { if (!m_reconnecting) { - sLog->outSQLDriver("MySQL client library: %s", mysql_get_client_info()); - sLog->outSQLDriver("MySQL server ver: %s ", mysql_get_server_info(m_Mysql)); + sLog->outInfo(LOG_FILTER_SQL, "MySQL client library: %s", mysql_get_client_info()); + sLog->outInfo(LOG_FILTER_SQL, "MySQL server ver: %s ", mysql_get_server_info(m_Mysql)); if (mysql_get_server_version(m_Mysql) != mysql_get_client_version()) - sLog->outSQLDriver("[WARNING] MySQL client/server version mismatch; may conflict with behaviour of prepared statements."); + sLog->outInfo(LOG_FILTER_SQL, "[WARNING] MySQL client/server version mismatch; may conflict with behaviour of prepared statements."); } - sLog->outDetail("Connected to MySQL database at %s", m_connectionInfo.host.c_str()); + sLog->outInfo(LOG_FILTER_SQL, "Connected to MySQL database at %s", m_connectionInfo.host.c_str()); mysql_autocommit(m_Mysql, 1); // set connection properties to UTF8 to properly handle locales for different @@ -139,7 +141,7 @@ bool MySQLConnection::Open() } else { - sLog->outError("Could not connect to MySQL database at %s: %s\n", m_connectionInfo.host.c_str(), mysql_error(mysqlInit)); + sLog->outError(LOG_FILTER_SQL, "Could not connect to MySQL database at %s: %s\n", m_connectionInfo.host.c_str(), mysql_error(mysqlInit)); mysql_close(mysqlInit); return false; } @@ -159,26 +161,22 @@ bool MySQLConnection::Execute(const char* sql) return false; { - uint32 _s = 0; - if (sLog->GetSQLDriverQueryLogging()) - _s = getMSTime(); + uint32 _s = getMSTime(); if (mysql_query(m_Mysql, sql)) { uint32 lErrno = mysql_errno(m_Mysql); - sLog->outSQLDriver("SQL: %s", sql); - sLog->outSQLDriver("ERROR: [%u] %s", lErrno, mysql_error(m_Mysql)); + sLog->outInfo(LOG_FILTER_SQL, "SQL: %s", sql); + sLog->outError(LOG_FILTER_SQL, "[%u] %s", lErrno, mysql_error(m_Mysql)); if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection) return Execute(sql); // Try again return false; } - else if (sLog->GetSQLDriverQueryLogging()) - { - sLog->outSQLDriver("[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql); - } + else + sLog->outDebug(LOG_FILTER_SQL, "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql); } return true; @@ -201,14 +199,12 @@ bool MySQLConnection::Execute(PreparedStatement* stmt) MYSQL_STMT* msql_STMT = m_mStmt->GetSTMT(); MYSQL_BIND* msql_BIND = m_mStmt->GetBind(); - uint32 _s = 0; - if (sLog->GetSQLDriverQueryLogging()) - _s = getMSTime(); + uint32 _s = getMSTime(); if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) { uint32 lErrno = mysql_errno(m_Mysql); - sLog->outSQLDriver("SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); + sLog->outError(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection) return Execute(stmt); // Try again @@ -220,7 +216,7 @@ bool MySQLConnection::Execute(PreparedStatement* stmt) if (mysql_stmt_execute(msql_STMT)) { uint32 lErrno = mysql_errno(m_Mysql); - sLog->outSQLDriver("SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); + sLog->outError(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection) return Execute(stmt); // Try again @@ -229,8 +225,7 @@ bool MySQLConnection::Execute(PreparedStatement* stmt) return false; } - if (sLog->GetSQLDriverQueryLogging()) - sLog->outSQLDriver("[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str()); + sLog->outDebug(LOG_FILTER_SQL, "[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str()); m_mStmt->ClearParameters(); return true; @@ -254,14 +249,12 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint6 MYSQL_STMT* msql_STMT = m_mStmt->GetSTMT(); MYSQL_BIND* msql_BIND = m_mStmt->GetBind(); - uint32 _s = 0; - if (sLog->GetSQLDriverQueryLogging()) - _s = getMSTime(); + uint32 _s = getMSTime(); if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) { uint32 lErrno = mysql_errno(m_Mysql); - sLog->outSQLDriver("SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); + sLog->outError(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection) return _Query(stmt, pResult, pRowCount, pFieldCount); // Try again @@ -273,7 +266,7 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint6 if (mysql_stmt_execute(msql_STMT)) { uint32 lErrno = mysql_errno(m_Mysql); - sLog->outSQLDriver("SQL(p): %s\n [ERROR]: [%u] %s", + sLog->outError(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT)); if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection) @@ -283,8 +276,7 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint6 return false; } - if (sLog->GetSQLDriverQueryLogging()) - sLog->outSQLDriver("[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str()); + sLog->outDebug(LOG_FILTER_SQL, "[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str()); m_mStmt->ClearParameters(); @@ -319,25 +311,21 @@ bool MySQLConnection::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD * return false; { - uint32 _s = 0; - if (sLog->GetSQLDriverQueryLogging()) - _s = getMSTime(); + uint32 _s = getMSTime(); if (mysql_query(m_Mysql, sql)) { uint32 lErrno = mysql_errno(m_Mysql); - sLog->outSQLDriver("SQL: %s", sql); - sLog->outSQLDriver("ERROR: [%u] %s", lErrno, mysql_error(m_Mysql)); + sLog->outInfo(LOG_FILTER_SQL, "SQL: %s", sql); + sLog->outError(LOG_FILTER_SQL, "[%u] %s", lErrno, mysql_error(m_Mysql)); if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection) return _Query(sql, pResult, pFields, pRowCount, pFieldCount); // We try again return false; } - else if (sLog->GetSQLDriverQueryLogging()) - { - sLog->outSQLDriver("[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql); - } + else + sLog->outDebug(LOG_FILTER_SQL, "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql); *pResult = mysql_store_result(m_Mysql); *pRowCount = mysql_affected_rows(m_Mysql); @@ -393,7 +381,7 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) ASSERT(stmt); if (!Execute(stmt)) { - sLog->outSQLDriver("[Warning] Transaction aborted. %u queries not executed.", (uint32)queries.size()); + sLog->outWarn(LOG_FILTER_SQL, "Transaction aborted. %u queries not executed.", (uint32)queries.size()); RollbackTransaction(); return false; } @@ -405,7 +393,7 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) ASSERT(sql); if (!Execute(sql)) { - sLog->outSQLDriver("[Warning] Transaction aborted. %u queries not executed.", (uint32)queries.size()); + sLog->outWarn(LOG_FILTER_SQL, "Transaction aborted. %u queries not executed.", (uint32)queries.size()); RollbackTransaction(); return false; } @@ -428,7 +416,7 @@ MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index) ASSERT(index < m_stmts.size()); MySQLPreparedStatement* ret = m_stmts[index]; if (!ret) - sLog->outSQLDriver("ERROR: Could not fetch prepared statement %u on database `%s`, connection type: %s.", + sLog->outError(LOG_FILTER_SQL, "Could not fetch prepared statement %u on database `%s`, connection type: %s.", index, m_connectionInfo.database.c_str(), (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous"); return ret; @@ -449,19 +437,19 @@ void MySQLConnection::PrepareStatement(uint32 index, const char* sql, Connection return; } - MYSQL_STMT * stmt = mysql_stmt_init(m_Mysql); + MYSQL_STMT* stmt = mysql_stmt_init(m_Mysql); if (!stmt) { - sLog->outSQLDriver("[ERROR]: In mysql_stmt_init() id: %u, sql: \"%s\"", index, sql); - sLog->outSQLDriver("[ERROR]: %s", mysql_error(m_Mysql)); + sLog->outError(LOG_FILTER_SQL, "In mysql_stmt_init() id: %u, sql: \"%s\"", index, sql); + sLog->outError(LOG_FILTER_SQL, "%s", mysql_error(m_Mysql)); m_prepareError = true; } else { if (mysql_stmt_prepare(stmt, sql, static_cast(strlen(sql)))) { - sLog->outSQLDriver("[ERROR]: In mysql_stmt_prepare() id: %u, sql: \"%s\"", index, sql); - sLog->outSQLDriver("[ERROR]: %s", mysql_stmt_error(stmt)); + sLog->outError(LOG_FILTER_SQL, "In mysql_stmt_prepare() id: %u, sql: \"%s\"", index, sql); + sLog->outError(LOG_FILTER_SQL, "%s", mysql_stmt_error(stmt)); mysql_stmt_close(stmt); m_prepareError = true; } @@ -493,19 +481,19 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo) { switch (errNo) { - case 2006: // "MySQL server has gone away" - case 2013: // "Lost connection to MySQL server during query" - case 2048: // "Invalid connection handle" - case 2055: // "Lost connection to MySQL server at '%s', system error: %d" + case CR_SERVER_GONE_ERROR: + case CR_SERVER_LOST: + case CR_INVALID_CONN_HANDLE: + case CR_SERVER_LOST_EXTENDED: { m_reconnecting = true; uint64 oldThreadId = mysql_thread_id(GetHandle()); mysql_close(GetHandle()); if (this->Open()) // Don't remove 'this' pointer unless you want to skip loading all prepared statements.... { - sLog->outSQLDriver("Connection to the MySQL server is active."); + sLog->outInfo(LOG_FILTER_SQL, "Connection to the MySQL server is active."); if (oldThreadId != mysql_thread_id(GetHandle())) - sLog->outSQLDriver("Successfully reconnected to %s @%s:%s (%s).", + sLog->outInfo(LOG_FILTER_SQL, "Successfully reconnected to %s @%s:%s (%s).", m_connectionInfo.database.c_str(), m_connectionInfo.host.c_str(), m_connectionInfo.port_or_socket.c_str(), (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous"); @@ -518,21 +506,23 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo) return _HandleMySQLErrno(lErrno); // Call self (recursive) } - case 1213: // "Deadlock found when trying to get lock; try restarting transaction" + case ER_LOCK_DEADLOCK: return false; // Implemented in TransactionTask::Execute and DatabaseWorkerPool::DirectCommitTransaction // Query related errors - skip query - case 1058: // "Column count doesn't match value count" - case 1062: // "Duplicate entry '%s' for key '%d'" + case ER_WRONG_VALUE_COUNT: + case ER_DUP_ENTRY: return false; // Outdated table or database structure - terminate core - case 1054: // "Unknown column '%s' in '%s'" - case 1146: // "Table '%s' doesn't exist" - WPFatal(!errNo, "Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders."); + case ER_BAD_FIELD_ERROR: + case ER_NO_SUCH_TABLE: + sLog->outError(LOG_FILTER_SQL, "Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders."); + ACE_OS::sleep(10); + std::abort(); return false; default: - sLog->outSQLDriver("Unhandled MySQL errno %u. Unexpected behaviour possible.", errNo); + sLog->outError(LOG_FILTER_SQL, "Unhandled MySQL errno %u. Unexpected behaviour possible.", errNo); return false; } } diff --git a/src/server/shared/Database/MySQLThreading.h b/src/server/shared/Database/MySQLThreading.h index 2004ee9826c..038ec4ee794 100755 --- a/src/server/shared/Database/MySQLThreading.h +++ b/src/server/shared/Database/MySQLThreading.h @@ -33,7 +33,7 @@ class MySQL static void Thread_Init() { mysql_thread_init(); - sLog->outSQLDriver("Core thread with ID ["UI64FMTD"] initializing MySQL thread.", + sLog->outWarn(LOG_FILTER_SQL, "Core thread with ID ["UI64FMTD"] initializing MySQL thread.", (uint64)ACE_Based::Thread::currentId()); } @@ -44,7 +44,7 @@ class MySQL static void Thread_End() { mysql_thread_end(); - sLog->outSQLDriver("Core thread with ID ["UI64FMTD"] shutting down MySQL thread.", + sLog->outWarn(LOG_FILTER_SQL, "Core thread with ID ["UI64FMTD"] shutting down MySQL thread.", (uint64)ACE_Based::Thread::currentId()); } diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp index 58aa2bd3aa0..a72532e928b 100755 --- a/src/server/shared/Database/PreparedStatement.cpp +++ b/src/server/shared/Database/PreparedStatement.cpp @@ -78,7 +78,7 @@ void PreparedStatement::BindParameters() } #ifdef _DEBUG if (i < m_stmt->m_paramCount) - sLog->outSQLDriver("[WARNING]: BindParameters() for statement %u did not bind all allocated parameters", m_index); + sLog->outWarn(LOG_FILTER_SQL, "[WARNING]: BindParameters() for statement %u did not bind all allocated parameters", m_index); #endif } @@ -237,7 +237,7 @@ bool MySQLPreparedStatement::CheckValidIndex(uint8 index) return false; if (m_paramsSet[index]) - sLog->outSQLDriver("[WARNING] Prepared Statement (id: %u) trying to bind value on already bound index (%u).", m_stmt->m_index, index); + sLog->outWarn(LOG_FILTER_SQL, "[WARNING] Prepared Statement (id: %u) trying to bind value on already bound index (%u).", m_stmt->m_index, index); return true; } diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp index a3602531205..99772c7e323 100755 --- a/src/server/shared/Database/QueryHolder.cpp +++ b/src/server/shared/Database/QueryHolder.cpp @@ -24,7 +24,7 @@ bool SQLQueryHolder::SetQuery(size_t index, const char *sql) { if (m_queries.size() <= index) { - sLog->outError("Query index (%zu) out of range (size: %u) for query: %s", index, (uint32)m_queries.size(), sql); + sLog->outError(LOG_FILTER_SQL, "Query index (%zu) out of range (size: %u) for query: %s", index, (uint32)m_queries.size(), sql); return false; } @@ -44,7 +44,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...) { if (!format) { - sLog->outError("Query (index: %zu) is empty.", index); + sLog->outError(LOG_FILTER_SQL, "Query (index: %zu) is empty.", index); return false; } @@ -56,7 +56,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...) if (res == -1) { - sLog->outError("SQL Query truncated (and not execute) for format: %s", format); + sLog->outError(LOG_FILTER_SQL, "SQL Query truncated (and not execute) for format: %s", format); return false; } @@ -67,7 +67,7 @@ bool SQLQueryHolder::SetPreparedQuery(size_t index, PreparedStatement* stmt) { if (m_queries.size() <= index) { - sLog->outError("Query index (%zu) out of range (size: %u) for prepared statement", index, (uint32)m_queries.size()); + sLog->outError(LOG_FILTER_SQL, "Query index (%zu) out of range (size: %u) for prepared statement", index, (uint32)m_queries.size()); return false; } diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp index 95034387089..cb21c088d00 100755 --- a/src/server/shared/Database/QueryResult.cpp +++ b/src/server/shared/Database/QueryResult.cpp @@ -59,7 +59,7 @@ m_length(NULL) //- This is where we store the (entire) resultset if (mysql_stmt_store_result(m_stmt)) { - sLog->outSQLDriver("%s:mysql_stmt_store_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt)); + sLog->outWarn(LOG_FILTER_SQL, "%s:mysql_stmt_store_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt)); return; } @@ -86,7 +86,7 @@ m_length(NULL) //- This is where we bind the bind the buffer to the statement if (mysql_stmt_bind_result(m_stmt, m_rBind)) { - sLog->outSQLDriver("%s:mysql_stmt_bind_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt)); + sLog->outWarn(LOG_FILTER_SQL, "%s:mysql_stmt_bind_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt)); delete[] m_rBind; delete[] m_isNull; delete[] m_length; diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index 48a8bda32ed..6ce3d926f4c 100755 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -24,10 +24,10 @@ #include #include -#define WPAssert(assertion) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError("\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); *((volatile int*)NULL) = 0; } } -#define WPError(assertion, errmsg) { if (!(assertion)) { sLog->outError("%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); *((volatile int*)NULL) = 0; } } -#define WPWarning(assertion, errmsg) { if (!(assertion)) { sLog->outError("\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); } } -#define WPFatal(assertion, errmsg) { if (!(assertion)) { sLog->outError("\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); ACE_OS::sleep(10); *((volatile int*)NULL) = 0; } } +#define WPAssert(assertion) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError(LOG_FILTER_GENERAL, "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); *((volatile int*)NULL) = 0; } } +#define WPError(assertion, errmsg) { if (!(assertion)) { sLog->outError(LOG_FILTER_GENERAL, "%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); *((volatile int*)NULL) = 0; } } +#define WPWarning(assertion, errmsg) { if (!(assertion)) { sLog->outError(LOG_FILTER_GENERAL, "\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); } } +#define WPFatal(assertion, errmsg) { if (!(assertion)) { sLog->outError(LOG_FILTER_GENERAL, "\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); ACE_OS::sleep(10); *((volatile int*)NULL) = 0; } } #define ASSERT WPAssert #endif diff --git a/src/server/shared/Logging/Appender.cpp b/src/server/shared/Logging/Appender.cpp new file mode 100644 index 00000000000..38d58f1ffb5 --- /dev/null +++ b/src/server/shared/Logging/Appender.cpp @@ -0,0 +1,153 @@ +#include "Appender.h" +#include "Common.h" + +std::string LogMessage::getTimeStr(time_t time) +{ + tm* aTm = localtime(&time); + char buf[20]; + snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec); + return std::string(buf); +} + +std::string LogMessage::getTimeStr() +{ + return getTimeStr(mtime); +} + +Appender::Appender(uint8 _id, std::string const& _name, AppenderType _type /* = APPENDER_NONE*/, LogLevel _level /* = LOG_LEVEL_DISABLED */): +id(_id), name(_name), type(_type), level(_level) +{ +} + +Appender::~Appender() +{ +} + +uint8 Appender::getId() const +{ + return id; +} + +std::string const& Appender::getName() const +{ + return name; +} + +AppenderType Appender::getType() const +{ + return type; +} + +LogLevel Appender::getLogLevel() const +{ + return level; +} + +void Appender::setLogLevel(LogLevel _level) +{ + level = _level; +} + +void Appender::write(LogMessage& message) +{ + if (level && level <= message.level) + _write(message); + //else fprintf(stderr, "Appender::write: Appender %s, Level %s. Msg %s Level %s Type %s WRONG LEVEL MASK\n", getName().c_str(), getLogLevelString(level), message.text.c_str(), getLogLevelString(message.level), getLogFilterTypeString(message.type)); // DEBUG - RemoveMe +} + +const char* Appender::getLogLevelString(LogLevel level) +{ + switch (level) + { + case LOG_LEVEL_FATAL: + return "FATAL"; + case LOG_LEVEL_ERROR: + return "ERROR"; + case LOG_LEVEL_WARN: + return "WARN"; + case LOG_LEVEL_INFO: + return "INFO"; + case LOG_LEVEL_DEBUG: + return "DEBUG"; + case LOG_LEVEL_TRACE: + return "TRACE"; + default: + return "DISABLED"; + } +} + +char const* Appender::getLogFilterTypeString(LogFilterType type) +{ + switch (type) + { + case LOG_FILTER_GENERAL: + return "GENERAL"; + case LOG_FILTER_UNITS: + return "UNITS"; + case LOG_FILTER_PETS: + return "PETS"; + case LOG_FILTER_VEHICLES: + return "VEHICLES"; + case LOG_FILTER_TSCR: + return "TSCR"; + case LOG_FILTER_DATABASE_AI: + return "DATABASE_AI"; + case LOG_FILTER_MAPSCRIPTS: + return "MAPSCRIPTS"; + case LOG_FILTER_NETWORKIO: + return "NETWORKIO"; + case LOG_FILTER_SPELLS_AURAS: + return "SPELLS_AURAS"; + case LOG_FILTER_ACHIEVEMENTSYS: + return "ACHIEVEMENTSYS"; + case LOG_FILTER_CONDITIONSYS: + return "CONDITIONSYS"; + case LOG_FILTER_POOLSYS: + return "POOLSYS"; + case LOG_FILTER_AUCTIONHOUSE: + return "AUCTIONHOUSE"; + case LOG_FILTER_BATTLEGROUND: + return "BATTLEGROUND"; + case LOG_FILTER_OUTDOORPVP: + return "OUTDOORPVP"; + case LOG_FILTER_CHATSYS: + return "CHATSYS"; + case LOG_FILTER_LFG: + return "LFG"; + case LOG_FILTER_MAPS: + return "MAPS"; + case LOG_FILTER_PLAYER: + return "PLAYER"; + case LOG_FILTER_PLAYER_LOADING: + return "PLAYER_LOADING"; + case LOG_FILTER_PLAYER_ITEMS: + return "PLAYER_ITEMS"; + case LOG_FILTER_PLAYER_SKILLS: + return "PLAYER_SKILLS"; + case LOG_FILTER_PLAYER_CHATLOG: + return "PLAYER_CHATLOG"; + case LOG_FILTER_LOOT: + return "LOOT"; + case LOG_FILTER_GUILD: + return "GUILD"; + case LOG_FILTER_TRANSPORTS: + return "TRANSPORTS"; + case LOG_FILTER_SQL: + return "SQL"; + case LOG_FILTER_GMCOMMAND: + return "GMCOMMAND"; + case LOG_FILTER_REMOTECOMMAND: + return "REMOTECOMMAND"; + case LOG_FILTER_WARDEN: + return "WARDEN"; + case LOG_FILTER_AUTHSERVER: + return "AUTHSERVER"; + case LOG_FILTER_WORLDSERVER: + return "WORLDSERVER"; + case LOG_FILTER_GAMEEVENTS: + return "GAMEEVENTS"; + default: + break; + } + return "???"; +} diff --git a/src/server/shared/Logging/Appender.h b/src/server/shared/Logging/Appender.h new file mode 100644 index 00000000000..992554d59aa --- /dev/null +++ b/src/server/shared/Logging/Appender.h @@ -0,0 +1,115 @@ +#ifndef APPENDER_H +#define APPENDER_H + +#include "Define.h" + +#include +#include + +enum LogFilterType +{ + LOG_FILTER_GENERAL, // This one should only be used inside Log.cpp + LOG_FILTER_UNITS, // Anything related to units that doesn't fit in other categories. ie. creature formations + LOG_FILTER_PETS, + LOG_FILTER_VEHICLES, + LOG_FILTER_TSCR, // C++ AI, instance scripts, etc. + LOG_FILTER_DATABASE_AI, // SmartAI, EventAI, Creature* * AI + LOG_FILTER_MAPSCRIPTS, + LOG_FILTER_NETWORKIO, + LOG_FILTER_SPELLS_AURAS, + LOG_FILTER_ACHIEVEMENTSYS, + LOG_FILTER_CONDITIONSYS, + LOG_FILTER_POOLSYS, + LOG_FILTER_AUCTIONHOUSE, + LOG_FILTER_BATTLEGROUND, + LOG_FILTER_OUTDOORPVP, + LOG_FILTER_CHATSYS, + LOG_FILTER_LFG, + LOG_FILTER_MAPS, + LOG_FILTER_PLAYER, // Any player log that does not fit in other player filters + LOG_FILTER_PLAYER_LOADING, // Debug output from Player::_Load functions + LOG_FILTER_PLAYER_ITEMS, + LOG_FILTER_PLAYER_SKILLS, + LOG_FILTER_PLAYER_CHATLOG, + LOG_FILTER_LOOT, + LOG_FILTER_GUILD, + LOG_FILTER_TRANSPORTS, + LOG_FILTER_SQL, + LOG_FILTER_GMCOMMAND, + LOG_FILTER_REMOTECOMMAND, + LOG_FILTER_WARDEN, + LOG_FILTER_AUTHSERVER, + LOG_FILTER_WORLDSERVER, + LOG_FILTER_GAMEEVENTS, + LOG_FILTER_CALENDAR +}; + +const uint8 MaxLogFilter = uint8(LOG_FILTER_CALENDAR) + 1; + +// Values assigned have their equivalent in enum ACE_Log_Priority +enum LogLevel +{ + LOG_LEVEL_DISABLED = 0, + LOG_LEVEL_TRACE = 1, + LOG_LEVEL_DEBUG = 2, + LOG_LEVEL_INFO = 3, + LOG_LEVEL_WARN = 4, + LOG_LEVEL_ERROR = 5, + LOG_LEVEL_FATAL = 6, +}; + +const uint8 MaxLogLevels = 6; + +enum AppenderType +{ + APPENDER_NONE, + APPENDER_CONSOLE, + APPENDER_FILE, + APPENDER_DB, +}; + +struct LogMessage +{ + LogMessage(LogLevel _level, LogFilterType _type, std::string _text): level(_level), type(_type), text(_text) + { + mtime = time(NULL); + } + + static std::string getTimeStr(time_t time); + std::string getTimeStr(); + + LogLevel level; + LogFilterType type; + std::string text; + uint32 param1; + time_t mtime; +}; + +class Appender +{ + public: + Appender(uint8 _id, std::string const& name, AppenderType type = APPENDER_NONE, LogLevel level = LOG_LEVEL_DISABLED); + virtual ~Appender(); + + uint8 getId() const; + std::string const& getName() const; + AppenderType getType() const; + LogLevel getLogLevel() const; + + void setLogLevel(LogLevel); + void write(LogMessage& message); + static const char* getLogLevelString(LogLevel level); + static const char* getLogFilterTypeString(LogFilterType type); + + private: + virtual void _write(LogMessage& /*message*/) {}; + + uint8 id; + std::string name; + AppenderType type; + LogLevel level; +}; + +typedef std::map AppenderMap; + +#endif diff --git a/src/server/shared/Logging/AppenderConsole.cpp b/src/server/shared/Logging/AppenderConsole.cpp new file mode 100644 index 00000000000..ad81a883bfa --- /dev/null +++ b/src/server/shared/Logging/AppenderConsole.cpp @@ -0,0 +1,174 @@ +#include "AppenderConsole.h" +#include "Config.h" +#include "Util.h" + +#include + +AppenderConsole::AppenderConsole(uint8 id, std::string const& name, LogLevel level): +Appender(id, name, APPENDER_CONSOLE, level), _colored(false), _colors() +{ +} + +void AppenderConsole::InitColors(std::string const& str) +{ + if (str.empty()) + { + _colored = false; + return; + } + + int color[MaxLogLevels]; + + std::istringstream ss(str); + + for (uint8 i = 0; i < MaxLogLevels; ++i) + { + ss >> color[i]; + + if (!ss) + return; + + if (color[i] < 0 || color[i] >= MaxColors) + return; + } + + for (uint8 i = 0; i < MaxLogLevels; ++i) + _colors[i] = ColorTypes(color[i]); + + _colored = true; +} + +void AppenderConsole::SetColor(bool stdout_stream, ColorTypes color) +{ + #if PLATFORM == PLATFORWINDOWS + static WORD WinColorFG[MaxColors] = + { + 0, // BLACK + FOREGROUND_RED, // RED + FOREGROUND_GREEN, // GREEN + FOREGROUND_RED | FOREGROUND_GREEN, // BROWN + FOREGROUND_BLUE, // BLUE + FOREGROUND_RED | FOREGROUND_BLUE, // MAGENTA + FOREGROUND_GREEN | FOREGROUND_BLUE, // CYAN + FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE, // WHITE + // YELLOW + FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY, + // RED_BOLD + FOREGROUND_RED | FOREGROUND_INTENSITY, + // GREEN_BOLD + FOREGROUND_GREEN | FOREGROUND_INTENSITY, + FOREGROUND_BLUE | FOREGROUND_INTENSITY, // BLUE_BOLD + // MAGENTA_BOLD + FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY, + // CYAN_BOLD + FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY, + // WHITE_BOLD + FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY + }; + + HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE); + SetConsoleTextAttribute(hConsole, WinColorFG[color]); + #else + enum ANSITextAttr + { + TA_NORMAL = 0, + TA_BOLD = 1, + TA_BLINK = 5, + TA_REVERSE = 7 + }; + + enum ANSIFgTextAttr + { + FG_BLACK = 30, + FG_RED, + FG_GREEN, + FG_BROWN, + FG_BLUE, + FG_MAGENTA, + FG_CYAN, + FG_WHITE, + FG_YELLOW + }; + + enum ANSIBgTextAttr + { + BG_BLACK = 40, + BG_RED, + BG_GREEN, + BG_BROWN, + BG_BLUE, + BG_MAGENTA, + BG_CYAN, + BG_WHITE + }; + + static uint8 UnixColorFG[MaxColors] = + { + FG_BLACK, // BLACK + FG_RED, // RED + FG_GREEN, // GREEN + FG_BROWN, // BROWN + FG_BLUE, // BLUE + FG_MAGENTA, // MAGENTA + FG_CYAN, // CYAN + FG_WHITE, // WHITE + FG_YELLOW, // YELLOW + FG_RED, // LRED + FG_GREEN, // LGREEN + FG_BLUE, // LBLUE + FG_MAGENTA, // LMAGENTA + FG_CYAN, // LCYAN + FG_WHITE // LWHITE + }; + + fprintf((stdout_stream? stdout : stderr), "\x1b[%d%sm", UnixColorFG[color], (color >= YELLOW && color < MaxColors ? ";1" : "")); + #endif +} + +void AppenderConsole::ResetColor(bool stdout_stream) +{ + #if PLATFORM == PLATFORWINDOWS + HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE); + SetConsoleTextAttribute(hConsole, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED); + #else + fprintf((stdout_stream ? stdout : stderr), "\x1b[0m"); + #endif +} + +void AppenderConsole::_write(LogMessage& message) +{ + bool stdout_stream = message.level == LOG_LEVEL_ERROR || message.level == LOG_LEVEL_FATAL; + + if (_colored) + { + uint8 index; + switch (message.level) + { + case LOG_LEVEL_TRACE: + index = 5; + break; + case LOG_LEVEL_DEBUG: + index = 4; + break; + case LOG_LEVEL_INFO: + index = 3; + break; + case LOG_LEVEL_WARN: + index = 2; + break; + case LOG_LEVEL_FATAL: + index = 0; + break; + case LOG_LEVEL_ERROR: // No break on purpose + default: + index = 1; + break; + } + + SetColor(stdout_stream, _colors[index]); + utf8printf(stdout_stream ? stdout : stderr, "%s %-5s [%-15s] %s", message.getTimeStr().c_str(), Appender::getLogLevelString(message.level), Appender::getLogFilterTypeString(message.type), message.text.c_str()); + ResetColor(stdout_stream); + } + else + utf8printf(stdout_stream ? stdout : stderr, "%s %-5s [%-15s] %s", message.getTimeStr().c_str(), Appender::getLogLevelString(message.level), Appender::getLogFilterTypeString(message.type), message.text.c_str()); +} diff --git a/src/server/shared/Logging/AppenderConsole.h b/src/server/shared/Logging/AppenderConsole.h new file mode 100644 index 00000000000..a9f46cf9c4a --- /dev/null +++ b/src/server/shared/Logging/AppenderConsole.h @@ -0,0 +1,42 @@ +#ifndef APPENDERCONSOLE_H +#define APPENDERCONSOLE_H + +#include "Appender.h" +#include + +enum ColorTypes +{ + BLACK, + RED, + GREEN, + BROWN, + BLUE, + MAGENTA, + CYAN, + GREY, + YELLOW, + LRED, + LGREEN, + LBLUE, + LMAGENTA, + LCYAN, + WHITE +}; + +const uint8 MaxColors = uint8(WHITE) + 1; + +class AppenderConsole: public Appender +{ + public: + AppenderConsole(uint8 _id, std::string const& name, LogLevel level); + void InitColors(const std::string& init_str); + + private: + void SetColor(bool stdout_stream, ColorTypes color); + void ResetColor(bool stdout_stream); + void _write(LogMessage& message); + bool _colored; + ColorTypes _colors[MaxLogLevels]; +}; + +#endif diff --git a/src/server/shared/Logging/AppenderDB.cpp b/src/server/shared/Logging/AppenderDB.cpp new file mode 100644 index 00000000000..6f3737adf4d --- /dev/null +++ b/src/server/shared/Logging/AppenderDB.cpp @@ -0,0 +1,30 @@ +#include "AppenderDB.h" + +/* FIXME +#include "DatabaseWorkerPool.h" +#include "Implementation/LoginDatabase.h" // For logging +extern DatabaseWorkerPool LoginDatabase; +*/ + +AppenderDB::AppenderDB(uint8 id, std::string const& name, LogLevel level, uint8 realmId): +Appender(id, name, APPENDER_DB, level), realm(realmId), enable(false) +{ +} + +AppenderDB::~AppenderDB() +{ +} + +void AppenderDB::_write(LogMessage& /*message*/) +{ +/* FIXME + if (enable) + LoginDatabase.PExecute("INSERT INTO logs (time, realm, type, severity, string) " + "VALUES (" UI64FMTD ", %u, %u, '%s');", message.mtime, realm, message.type, message.level, message.text.c_str()); +*/ +} + +void AppenderDB::setEnable(bool _enable) +{ + enable = _enable; +} diff --git a/src/server/shared/Logging/AppenderDB.h b/src/server/shared/Logging/AppenderDB.h new file mode 100644 index 00000000000..ca15fc1a1d5 --- /dev/null +++ b/src/server/shared/Logging/AppenderDB.h @@ -0,0 +1,19 @@ +#ifndef APPENDERDB_H +#define APPENDERDB_H + +#include "Appender.h" + +class AppenderDB: public Appender +{ + public: + AppenderDB(uint8 _id, std::string const& _name, LogLevel level, uint8 realmId); + ~AppenderDB(); + void setEnable(bool enable); + + private: + uint8 realm; + bool enable; + void _write(LogMessage& message); +}; + +#endif diff --git a/src/server/shared/Logging/AppenderFile.cpp b/src/server/shared/Logging/AppenderFile.cpp new file mode 100644 index 00000000000..30c1f271c96 --- /dev/null +++ b/src/server/shared/Logging/AppenderFile.cpp @@ -0,0 +1,54 @@ +#include "AppenderFile.h" +#include "Common.h" + +AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, const char* _filename, const char* _mode, bool _backup) + : Appender(id, name, APPENDER_FILE, level) + , filename(_filename) + , mode(_mode) + , backup(_backup) +{ + dynamicName = std::string::npos != filename.find("%u"); + if (!dynamicName) + logfile = OpenFile(_filename, _mode, _backup); +} + +AppenderFile::~AppenderFile() +{ + if (logfile) + { + fclose(logfile); + logfile = NULL; + } +} + +void AppenderFile::_write(LogMessage& message) +{ + if (dynamicName) + { + char namebuf[TRINITY_PATH_MAX]; + snprintf(namebuf, TRINITY_PATH_MAX, filename.c_str(), message.param1); + logfile = OpenFile(namebuf, mode, backup); + } + + if (logfile) + { + fprintf(logfile, "%s %-5s [%-15s] %s", message.getTimeStr().c_str(), Appender::getLogLevelString(message.level), Appender::getLogFilterTypeString(message.type), message.text.c_str()); + + fflush(logfile); + + if (dynamicName) + fclose(logfile); + } +} + +FILE* AppenderFile::OpenFile(std::string const &filename, std::string const &mode, bool backup) +{ + if (mode == "w" && backup) + { + std::string newName(filename); + newName.push_back('.'); + newName.append(LogMessage::getTimeStr(time(NULL))); + rename(filename.c_str(), newName.c_str()); // no error handling... if we couldn't make a backup, just ignore + } + return fopen(filename.c_str(), mode.c_str()); +} diff --git a/src/server/shared/Logging/AppenderFile.h b/src/server/shared/Logging/AppenderFile.h new file mode 100644 index 00000000000..a01ea947334 --- /dev/null +++ b/src/server/shared/Logging/AppenderFile.h @@ -0,0 +1,22 @@ +#ifndef APPENDERFILE_H +#define APPENDERFILE_H + +#include "Appender.h" + +class AppenderFile: public Appender +{ + public: + AppenderFile(uint8 _id, std::string const& _name, LogLevel level, const char* filename, const char* mode, bool backup); + ~AppenderFile(); + FILE* OpenFile(std::string const& _name, std::string const& _mode, bool _backup); + + private: + void _write(LogMessage& message); + FILE* logfile; + std::string filename; + std::string mode; + bool dynamicName; + bool backup; +}; + +#endif diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 79eab053d08..17c6df44125 100755 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2008-2012 TrinityCore - * Copyright (C) 2005-2009 MaNGOS + * Copyright (C) 2005-2008 MaNGOS * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,343 +16,246 @@ * with this program. If not, see . */ -#include "Common.h" #include "Log.h" -#include "Configuration/Config.h" -#include "Util.h" +#include "Common.h" +#include "Config.h" -#include "Implementation/LoginDatabase.h" // For logging -extern LoginDatabaseWorkerPool LoginDatabase; +#include "AppenderConsole.h" +#include "AppenderFile.h" +#include "AppenderDB.h" +#include "LogOperation.h" -#include -#include +#include +#include +#include -Log::Log() : - raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), - dberLogfile(NULL), chatLogfile(NULL), arenaLogFile(NULL), sqlLogFile(NULL), sqlDevLogFile(NULL), wardenLogFile(NULL), - m_gmlog_per_account(false), m_enableLogDBLater(false), - m_enableLogDB(false), m_colored(false) +Log::Log() { - Initialize(); + SetRealmID(0); + AppenderId = 0; + /// Common log files data + m_logsDir = ConfigMgr::GetStringDefault("LogsDir", ""); + if (!m_logsDir.empty()) + if ((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\')) + m_logsDir.push_back('/'); + + m_logsTimestamp = "_" + GetTimestampStr(); + + ReadAppendersFromConfig(); + ReadLoggersFromConfig(); + worker = new LogWorker(); } Log::~Log() { - if (logfile != NULL) - fclose(logfile); - logfile = NULL; - - if (gmLogfile != NULL) - fclose(gmLogfile); - gmLogfile = NULL; - - if (charLogfile != NULL) - fclose(charLogfile); - charLogfile = NULL; - - if (dberLogfile != NULL) - fclose(dberLogfile); - dberLogfile = NULL; - - if (raLogfile != NULL) - fclose(raLogfile); - raLogfile = NULL; - - if (chatLogfile != NULL) - fclose(chatLogfile); - chatLogfile = NULL; - - if (arenaLogFile != NULL) - fclose(arenaLogFile); - arenaLogFile = NULL; - - if (sqlLogFile != NULL) - fclose(sqlLogFile); - sqlLogFile = NULL; - - if (sqlDevLogFile != NULL) - fclose(sqlDevLogFile); - sqlDevLogFile = NULL; - - if (wardenLogFile != NULL) - fclose(wardenLogFile); - wardenLogFile = NULL; + Close(); } -void Log::SetLogLevel(char *Level) +uint8 Log::NextAppenderId() { - int32 NewLevel = atoi((char*)Level); - if (NewLevel < 0) - NewLevel = 0; - m_logLevel = NewLevel; - - outString("LogLevel is %u", m_logLevel); + return AppenderId++; } -void Log::SetLogFileLevel(char *Level) +int32 GetConfigIntDefault(std::string base, const char* name, int32 value) { - int32 NewLevel = atoi((char*)Level); - if (NewLevel < 0) - NewLevel = 0; - m_logFileLevel = NewLevel; + base.append(name); + return ConfigMgr::GetIntDefault(base.c_str(), value); +} - outString("LogFileLevel is %u", m_logFileLevel); +std::string GetConfigStringDefault(std::string base, const char* name, const char* value) +{ + base.append(name); + return ConfigMgr::GetStringDefault(base.c_str(), value); } -void Log::SetDBLogLevel(char *Level) +// Returns default logger if the requested logger is not found +Logger* Log::GetLoggerByType(LogFilterType filter) { - int32 NewLevel = atoi((char*)Level); - if (NewLevel < 0) - NewLevel = 0; - m_dbLogLevel = NewLevel; + LoggerMap::iterator it = loggers.begin(); + while (it != loggers.end() && it->second.getType() != filter) + ++it; - outString("DBLogLevel is %u", m_dbLogLevel); + return it == loggers.end() ? &(loggers[0]) : &(it->second); } -void Log::Initialize() +Appender* Log::GetAppenderByName(std::string const& name) { - /// Check whether we'll log GM commands/RA events/character outputs/chat stuffs - m_dbChar = ConfigMgr::GetBoolDefault("LogDB.Char", false); - m_dbRA = ConfigMgr::GetBoolDefault("LogDB.RA", false); - m_dbGM = ConfigMgr::GetBoolDefault("LogDB.GM", false); - m_dbChat = ConfigMgr::GetBoolDefault("LogDB.Chat", false); + AppenderMap::iterator it = appenders.begin(); + while (it != appenders.end() && it->second && it->second->getName() != name) + ++it; - /// Realm must be 0 by default - SetRealmID(0); + return it == appenders.end() ? NULL : it->second; +} - /// Common log files data - m_logsDir = ConfigMgr::GetStringDefault("LogsDir", ""); - if (!m_logsDir.empty()) - if ((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\')) - m_logsDir.push_back('/'); +void Log::CreateAppenderFromConfig(const char* name) +{ + if (!name || *name == '\0') + return; - m_logsTimestamp = "_" + GetTimestampStr(); + std::string base = "Appender."; + base.append(name); + base.push_back('.'); - /// Open specific log files - logfile = openLogFile("LogFile", "LogTimestamp", "w"); - InitColors(ConfigMgr::GetStringDefault("LogColors", "")); + LogLevel level = LogLevel(GetConfigIntDefault(base, "Level", 0)); + AppenderType type = AppenderType(GetConfigIntDefault(base, "Type", 0)); - m_gmlog_per_account = ConfigMgr::GetBoolDefault("GmLogPerAccount", false); - if (!m_gmlog_per_account) - gmLogfile = openLogFile("GMLogFile", "GmLogTimestamp", "a"); - else + switch(type) { - // GM log settings for per account case - m_gmlog_filename_format = ConfigMgr::GetStringDefault("GMLogFile", ""); - if (!m_gmlog_filename_format.empty()) + case APPENDER_CONSOLE: { - bool m_gmlog_timestamp = ConfigMgr::GetBoolDefault("GmLogTimestamp", false); + AppenderConsole* appender = new AppenderConsole(NextAppenderId(), name, level); + appenders[appender->getId()] = appender; - size_t dot_pos = m_gmlog_filename_format.find_last_of('.'); - if (dot_pos!=m_gmlog_filename_format.npos) - { - if (m_gmlog_timestamp) - m_gmlog_filename_format.insert(dot_pos, m_logsTimestamp); + appender->InitColors(GetConfigStringDefault(base, "Colors", "")); + //fprintf(stdout, "Log::CreateAppenderFromConfig: Created Appender %s (%u), Type CONSOLE, Mask %u\n", appender->getName().c_str(), appender->getId(), appender->getLogLevel()); // DEBUG - RemoveMe + break; + } + case APPENDER_FILE: + { + std::string filename = GetConfigStringDefault(base, "File", ""); + std::string mode = GetConfigStringDefault(base, "Mode", "a"); + std::string timestamp = GetConfigStringDefault(base, "Timestamp", ""); + bool backup = GetConfigIntDefault(base, "Backup", 0); - m_gmlog_filename_format.insert(dot_pos, "_#%u"); - } - else + if (!timestamp.empty()) { - m_gmlog_filename_format += "_#%u"; - - if (m_gmlog_timestamp) - m_gmlog_filename_format += m_logsTimestamp; + size_t dot_pos = filename.find_last_of("."); + if (dot_pos != filename.npos) + filename.insert(dot_pos, m_logsTimestamp); + else + filename += m_logsTimestamp; } - m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format; + uint8 id = NextAppenderId(); + appenders[id] = new AppenderFile(id, name, level, filename.c_str(), mode.c_str(), backup); + //fprintf(stdout, "Log::CreateAppenderFromConfig: Created Appender %s (%u), Type FILE, Mask %u, File %s, Mode %s\n", name, id, level, filename.c_str(), mode.c_str()); // DEBUG - RemoveMe + break; } + case APPENDER_DB: // TODO Set realm! + { + uint8 id = NextAppenderId(); + appenders[id] = new AppenderDB(id, name, level, realm); + break; + } + default: + break; } +} + +void Log::CreateLoggerFromConfig(const char* name) +{ + if (!name || *name == '\0') + return; + + std::string base = "Logger."; + base.append(name); + base.push_back('.'); + + LogLevel level = LogLevel(GetConfigIntDefault(base, "Level", 0)); + int32 type = GetConfigIntDefault(base, "Type", -1); - charLogfile = openLogFile("CharLogFile", "CharLogTimestamp", "a"); - dberLogfile = openLogFile("DBErrorLogFile", NULL, "a"); - raLogfile = openLogFile("RaLogFile", NULL, "a"); - chatLogfile = openLogFile("ChatLogFile", "ChatLogTimestamp", "a"); - arenaLogFile = openLogFile("ArenaLogFile", NULL, "a"); - sqlLogFile = openLogFile("SQLDriverLogFile", NULL, "a"); - sqlDevLogFile = openLogFile("SQLDeveloperLogFile", NULL, "a"); - wardenLogFile = openLogFile("Warden.LogFile",NULL,"a"); - - // Main log file settings - m_logLevel = ConfigMgr::GetIntDefault("LogLevel", LOGL_NORMAL); - m_logFileLevel = ConfigMgr::GetIntDefault("LogFileLevel", LOGL_NORMAL); - m_dbLogLevel = ConfigMgr::GetIntDefault("DBLogLevel", LOGL_NORMAL); - m_sqlDriverQueryLogging = ConfigMgr::GetBoolDefault("SQLDriverQueryLogging", false); - - m_DebugLogMask = DebugLogFilters(ConfigMgr::GetIntDefault("DebugLogMask", LOG_FILTER_NONE)); - - // Char log settings - m_charLog_Dump = ConfigMgr::GetBoolDefault("CharLogDump", false); - m_charLog_Dump_Separate = ConfigMgr::GetBoolDefault("CharLogDump.Separate", false); - if (m_charLog_Dump_Separate) + if (type < 0) { - m_dumpsDir = ConfigMgr::GetStringDefault("CharLogDump.SeparateDir", ""); - if (!m_dumpsDir.empty()) - if ((m_dumpsDir.at(m_dumpsDir.length() - 1) != '/') && (m_dumpsDir.at(m_dumpsDir.length() - 1) != '\\')) - m_dumpsDir.push_back('/'); + fprintf(stderr, "Log::CreateLoggerFromConfig: Missing entry %sType in config. Logger ignored\n", name); + return; } -} -void Log::ReloadConfig() -{ - m_logLevel = ConfigMgr::GetIntDefault("LogLevel", LOGL_NORMAL); - m_logFileLevel = ConfigMgr::GetIntDefault("LogFileLevel", LOGL_NORMAL); - m_dbLogLevel = ConfigMgr::GetIntDefault("DBLogLevel", LOGL_NORMAL); + Logger& logger = loggers[type]; - m_DebugLogMask = DebugLogFilters(ConfigMgr::GetIntDefault("DebugLogMask", LOG_FILTER_NONE)); -} + if (!logger.getName().empty()) + fprintf(stderr, "Error while configuring Logger %s. Replacing (name: %s, Type: %u, Level: %u) with (name: %s, Type: %u, Level: %u)\n", + name, logger.getName().c_str(), logger.getType(), logger.getLogLevel(), name, type, level); -FILE* Log::openLogFile(char const* configFileName, char const* configTimeStampFlag, char const* mode) -{ - std::string logfn=ConfigMgr::GetStringDefault(configFileName, ""); - if (logfn.empty()) - return NULL; + logger.Create(name, LogFilterType(type), level); + //fprintf(stdout, "Log::CreateLoggerFromConfig: Created Logger %s, Type %u, mask %u\n", name, LogFilterType(type), level); // DEBUG - RemoveMe - if (configTimeStampFlag && ConfigMgr::GetBoolDefault(configTimeStampFlag, false)) + std::istringstream ss(GetConfigStringDefault(base, "Appenders", "")); + std::string str; + + ss >> str; + while (ss) { - size_t dot_pos = logfn.find_last_of("."); - if (dot_pos!=logfn.npos) - logfn.insert(dot_pos, m_logsTimestamp); + if (Appender* appender = GetAppenderByName(str)) + { + logger.addAppender(appender->getId(), appender); + //fprintf(stdout, "Log::CreateLoggerFromConfig: Added Appender %s to Logger %s\n", appender->getName().c_str(), name); // DEBUG - RemoveMe + } else - logfn += m_logsTimestamp; + fprintf(stderr, "Error while configuring Appender %s in Logger %s. Appender does not exist", str.c_str(), name); + ss >> str; } - - return fopen((m_logsDir+logfn).c_str(), mode); } -FILE* Log::openGmlogPerAccount(uint32 account) +void Log::ReadAppendersFromConfig() { - if (m_gmlog_filename_format.empty()) - return NULL; + std::istringstream ss(ConfigMgr::GetStringDefault("Appenders", "")); + std::string name; - char namebuf[TRINITY_PATH_MAX]; - snprintf(namebuf, TRINITY_PATH_MAX, m_gmlog_filename_format.c_str(), account); - return fopen(namebuf, "a"); + do + { + ss >> name; + CreateAppenderFromConfig(name.c_str()); + name = ""; + } + while (ss); } -void Log::outTimestamp(FILE* file) +void Log::ReadLoggersFromConfig() { - time_t t = time(NULL); - tm* aTm = localtime(&t); - // YYYY year - // MM month (2 digits 01-12) - // DD day (2 digits 01-31) - // HH hour (2 digits 00-23) - // MM minutes (2 digits 00-59) - // SS seconds (2 digits 00-59) - fprintf(file, "%-4d-%02d-%02d %02d:%02d:%02d ", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec); -} + std::istringstream ss(ConfigMgr::GetStringDefault("Loggers", "")); + std::string name; -void Log::InitColors(const std::string& str) -{ - if (str.empty()) + do { - m_colored = false; - return; + ss >> name; + CreateLoggerFromConfig(name.c_str()); + name = ""; } + while (ss); - int color[4]; - - std::istringstream ss(str); + LoggerMap::const_iterator it = loggers.begin(); - for (uint8 i = 0; i < LogLevels; ++i) - { - ss >> color[i]; + while (it != loggers.end() && it->first) + ++it; - if (!ss) - return; - - if (color[i] < 0 || color[i] >= Colors) - return; - } + // root logger must exist. Marking as disabled as its not configured + if (it == loggers.end()) + loggers[0].Create("root", LOG_FILTER_GENERAL, LOG_LEVEL_DISABLED); +} - for (uint8 i = 0; i < LogLevels; ++i) - m_colors[i] = ColorTypes(color[i]); +void Log::EnableDBAppenders() +{ + for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it) + if (it->second && it->second->getType() == APPENDER_DB) + ((AppenderDB *)it->second)->setEnable(true); - m_colored = true; } -void Log::SetColor(bool stdout_stream, ColorTypes color) +void Log::log(LogFilterType filter, LogLevel level, char const* str, ...) { - #if PLATFORM == PLATFORM_WINDOWS - static WORD WinColorFG[Colors] = - { - 0, // BLACK - FOREGROUND_RED, // RED - FOREGROUND_GREEN, // GREEN - FOREGROUND_RED | FOREGROUND_GREEN, // BROWN - FOREGROUND_BLUE, // BLUE - FOREGROUND_RED | FOREGROUND_BLUE, // MAGENTA - FOREGROUND_GREEN | FOREGROUND_BLUE, // CYAN - FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE, // WHITE - // YELLOW - FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY, - // RED_BOLD - FOREGROUND_RED | FOREGROUND_INTENSITY, - // GREEN_BOLD - FOREGROUND_GREEN | FOREGROUND_INTENSITY, - FOREGROUND_BLUE | FOREGROUND_INTENSITY, // BLUE_BOLD - // MAGENTA_BOLD - FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY, - // CYAN_BOLD - FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY, - // WHITE_BOLD - FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY - }; - - HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE ); - SetConsoleTextAttribute(hConsole, WinColorFG[color]); - #else - enum ANSITextAttr - { - TA_NORMAL=0, - TA_BOLD=1, - TA_BLINK=5, - TA_REVERSE=7 - }; + if (!str || !ShouldLog(filter, level)) + return; - enum ANSIFgTextAttr - { - FG_BLACK=30, FG_RED, FG_GREEN, FG_BROWN, FG_BLUE, - FG_MAGENTA, FG_CYAN, FG_WHITE, FG_YELLOW - }; + va_list ap; + va_start(ap, str); - enum ANSIBgTextAttr - { - BG_BLACK=40, BG_RED, BG_GREEN, BG_BROWN, BG_BLUE, - BG_MAGENTA, BG_CYAN, BG_WHITE - }; + vlog(filter, level, str, ap); - static uint8 UnixColorFG[Colors] = - { - FG_BLACK, // BLACK - FG_RED, // RED - FG_GREEN, // GREEN - FG_BROWN, // BROWN - FG_BLUE, // BLUE - FG_MAGENTA, // MAGENTA - FG_CYAN, // CYAN - FG_WHITE, // WHITE - FG_YELLOW, // YELLOW - FG_RED, // LRED - FG_GREEN, // LGREEN - FG_BLUE, // LBLUE - FG_MAGENTA, // LMAGENTA - FG_CYAN, // LCYAN - FG_WHITE // LWHITE - }; - - fprintf((stdout_stream? stdout : stderr), "\x1b[%d%sm", UnixColorFG[color], (color >= YELLOW && color < Colors ? ";1" : "")); - #endif + va_end(ap); +} + +void Log::vlog(LogFilterType filter, LogLevel level, char const* str, va_list argptr) +{ + char text[MAX_QUERY_LEN]; + vsnprintf(text, MAX_QUERY_LEN, str, argptr); + write(new LogMessage(level, filter, text)); } -void Log::ResetColor(bool stdout_stream) +void Log::write(LogMessage* msg) { - #if PLATFORM == PLATFORM_WINDOWS - HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE ); - SetConsoleTextAttribute(hConsole, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED ); - #else - fprintf(( stdout_stream ? stdout : stderr ), "\x1b[0m"); - #endif + msg->text.append("\n"); + Logger* logger = GetLoggerByType(msg->type); + worker->enqueue(new LogOperation(logger, msg)); } std::string Log::GetTimestampStr() @@ -370,710 +273,160 @@ std::string Log::GetTimestampStr() return std::string(buf); } -void Log::outDB(LogTypes type, const char * str) +bool Log::SetLogLevel(std::string const& name, const char* newLevelc, bool isLogger /* = true */) { - if (!str || type >= MAX_LOG_TYPES) - return; + LogLevel newLevel = LogLevel(atoi(newLevelc)); + if (newLevel < 0) + return false; - std::string logStr(str); - if (logStr.empty()) - return; - - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_LOG); - - stmt->setInt32(0, realm); - stmt->setUInt8(1, uint8(type)); - stmt->setString(2, logStr); - - LoginDatabase.Execute(stmt); -} - -void Log::outString(const char * str, ...) -{ - if (!str) - return; - - if (m_enableLogDB) + if (isLogger) { - // we don't want empty strings in the DB - std::string s(str); - if (s.empty() || s == " ") - return; - - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_STRING, nnew_str); - va_end(ap2); - } + LoggerMap::iterator it = loggers.begin(); + while (it != loggers.end() && it->second.getName() != name) + ++it; - if (m_colored) - SetColor(true, m_colors[LOGL_NORMAL]); + if (it == loggers.end()) + return false; - va_list ap; - - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - - if (m_colored) - ResetColor(true); - - printf("\n"); - if (logfile) - { - outTimestamp(logfile); - va_start(ap, str); - vfprintf(logfile, str, ap); - fprintf(logfile, "\n"); - va_end(ap); - - fflush(logfile); + it->second.setLogLevel(newLevel); } - fflush(stdout); -} - -void Log::outString() -{ - printf("\n"); - if (logfile) - { - outTimestamp(logfile); - fprintf(logfile, "\n"); - fflush(logfile); - } - fflush(stdout); -} - -void Log::outCrash(const char * err, ...) -{ - if (!err) - return; - - if (m_enableLogDB) - { - va_list ap2; - va_start(ap2, err); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, err, ap2); - outDB(LOG_TYPE_CRASH, nnew_str); - va_end(ap2); - } - - if (m_colored) - SetColor(false, LRED); - - va_list ap; - - va_start(ap, err); - vutf8printf(stderr, err, &ap); - va_end(ap); - - if (m_colored) - ResetColor(false); - - fprintf(stderr, "\n"); - if (logfile) + else { - outTimestamp(logfile); - fprintf(logfile, "CRASH ALERT: "); - - va_start(ap, err); - vfprintf(logfile, err, ap); - va_end(ap); + Appender* appender = GetAppenderByName(name); + if (!appender) + return false; - fprintf(logfile, "\n"); - fflush(logfile); + appender->setLogLevel(newLevel); } - fflush(stderr); + return true; } -void Log::outError(const char * err, ...) +bool Log::ShouldLog(LogFilterType type, LogLevel level) const { - if (!err) - return; - - if (m_enableLogDB) - { - va_list ap2; - va_start(ap2, err); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, err, ap2); - outDB(LOG_TYPE_ERROR, nnew_str); - va_end(ap2); - } - - if (m_colored) - SetColor(false, LRED); - - va_list ap; - - va_start(ap, err); - vutf8printf(stderr, err, &ap); - va_end(ap); + LoggerMap::const_iterator it = loggers.begin(); + while (it != loggers.end() && it->second.getType() != type) + ++it; - if (m_colored) - ResetColor(false); - - fprintf( stderr, "\n"); - if (logfile) + if (it != loggers.end()) { - outTimestamp(logfile); - fprintf(logfile, "ERROR: "); - - va_start(ap, err); - vfprintf(logfile, err, ap); - va_end(ap); - - fprintf(logfile, "\n"); - fflush(logfile); + LogLevel loggerLevel = it->second.getLogLevel(); + return loggerLevel && loggerLevel <= level; } - fflush(stderr); -} -void Log::outArena(const char * str, ...) -{ - if (!str) - return; + if (type != LOG_FILTER_GENERAL) + return ShouldLog(LOG_FILTER_GENERAL, level); - if (arenaLogFile) - { - va_list ap; - outTimestamp(arenaLogFile); - va_start(ap, str); - vfprintf(arenaLogFile, str, ap); - fprintf(arenaLogFile, "\n"); - va_end(ap); - fflush(arenaLogFile); - } + return false; } -void Log::outSQLDriver(const char* str, ...) +void Log::outTrace(LogFilterType filter, const char * str, ...) { - if (!str) + if (!str || !ShouldLog(filter, LOG_LEVEL_TRACE)) return; va_list ap; va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - - printf("\n"); - - if (sqlLogFile) - { - outTimestamp(sqlLogFile); - - va_list apSQL; - va_start(apSQL, str); - vfprintf(sqlLogFile, str, apSQL); - va_end(apSQL); - - fprintf(sqlLogFile, "\n"); - fflush(sqlLogFile); - } - - fflush(stdout); -} - -void Log::outErrorDb(const char * err, ...) -{ - if (!err) - return; - - if (m_colored) - SetColor(false, LRED); - va_list ap; + vlog(filter, LOG_LEVEL_TRACE, str, ap); - va_start(ap, err); - vutf8printf(stderr, err, &ap); va_end(ap); - - if (m_colored) - ResetColor(false); - - fprintf( stderr, "\n" ); - - if (logfile) - { - outTimestamp(logfile); - fprintf(logfile, "ERROR: " ); - - va_start(ap, err); - vfprintf(logfile, err, ap); - va_end(ap); - - fprintf(logfile, "\n" ); - fflush(logfile); - } - - if (dberLogfile) - { - outTimestamp(dberLogfile); - va_start(ap, err); - vfprintf(dberLogfile, err, ap); - va_end(ap); - - fprintf(dberLogfile, "\n" ); - fflush(dberLogfile); - } - fflush(stderr); } -void Log::outBasic(const char * str, ...) +void Log::outDebug(LogFilterType filter, const char * str, ...) { - if (!str) + if (!str || !ShouldLog(filter, LOG_LEVEL_DEBUG)) return; - if (m_enableLogDB && m_dbLogLevel > LOGL_NORMAL) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_BASIC, nnew_str); - va_end(ap2); - } - - if (m_logLevel > LOGL_NORMAL) - { - if (m_colored) - SetColor(true, m_colors[LOGL_BASIC]); - - va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - - if (m_colored) - ResetColor(true); - - printf("\n"); - - if (logfile) - { - outTimestamp(logfile); - va_list ap2; - va_start(ap2, str); - vfprintf(logfile, str, ap2); - fprintf(logfile, "\n" ); - va_end(ap2); - fflush(logfile); - } - } - fflush(stdout); -} - -void Log::outDetail(const char * str, ...) -{ - if (!str) - return; - - if (m_enableLogDB && m_dbLogLevel > LOGL_BASIC) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_DETAIL, nnew_str); - va_end(ap2); - } - - if (m_logLevel > LOGL_BASIC) - { - if (m_colored) - SetColor(true, m_colors[LOGL_DETAIL]); - - va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - - if (m_colored) - ResetColor(true); + va_list ap; + va_start(ap, str); - printf("\n"); + vlog(filter, LOG_LEVEL_DEBUG, str, ap); - if (logfile) - { - outTimestamp(logfile); - va_list ap2; - va_start(ap2, str); - vfprintf(logfile, str, ap2); - va_end(ap2); - - fprintf(logfile, "\n"); - fflush(logfile); - } - } - - fflush(stdout); + va_end(ap); } -void Log::outDebugInLine(const char * str, ...) +void Log::outInfo(LogFilterType filter, const char * str, ...) { - if (!str) + if (!str || !ShouldLog(filter, LOG_LEVEL_INFO)) return; - if (m_logLevel > LOGL_DETAIL) - { - va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); + va_list ap; + va_start(ap, str); - //if (m_colored) - // ResetColor(true); + vlog(filter, LOG_LEVEL_INFO, str, ap); - if (logfile) - { - va_list ap2; - va_start(ap2, str); - vfprintf(logfile, str, ap2); - va_end(ap2); - } - } + va_end(ap); } -void Log::outSQLDev(const char* str, ...) +void Log::outWarn(LogFilterType filter, const char * str, ...) { - if (!str) + if (!str || !ShouldLog(filter, LOG_LEVEL_WARN)) return; va_list ap; va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - printf("\n"); + vlog(filter, LOG_LEVEL_WARN, str, ap); - if (sqlDevLogFile) - { - va_list ap2; - va_start(ap2, str); - vfprintf(sqlDevLogFile, str, ap2); - va_end(ap2); - - fprintf(sqlDevLogFile, "\n"); - fflush(sqlDevLogFile); - } - - fflush(stdout); + va_end(ap); } -void Log::outDebug(DebugLogFilters f, const char * str, ...) +void Log::outError(LogFilterType filter, const char * str, ...) { - if (!(m_DebugLogMask & f)) - return; - - if (!str) + if (!str || !ShouldLog(filter, LOG_LEVEL_ERROR)) return; - if (m_enableLogDB && m_dbLogLevel > LOGL_DETAIL) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_DEBUG, nnew_str); - va_end(ap2); - } - - if ( m_logLevel > LOGL_DETAIL ) - { - if (m_colored) - SetColor(true, m_colors[LOGL_DEBUG]); - - va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - - if (m_colored) - ResetColor(true); + va_list ap; + va_start(ap, str); - printf( "\n" ); + vlog(filter, LOG_LEVEL_ERROR, str, ap); - if (logfile) - { - outTimestamp(logfile); - va_list ap2; - va_start(ap2, str); - vfprintf(logfile, str, ap2); - va_end(ap2); - - fprintf(logfile, "\n" ); - fflush(logfile); - } - } - fflush(stdout); + va_end(ap); } -void Log::outStaticDebug(const char * str, ...) +void Log::outFatal(LogFilterType filter, const char * str, ...) { - if (!str) + if (!str || !ShouldLog(filter, LOG_LEVEL_FATAL)) return; - if (m_enableLogDB && m_dbLogLevel > LOGL_DETAIL) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_DEBUG, nnew_str); - va_end(ap2); - } - - if ( m_logLevel > LOGL_DETAIL ) - { - if (m_colored) - SetColor(true, m_colors[LOGL_DEBUG]); - - va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); - - if (m_colored) - ResetColor(true); + va_list ap; + va_start(ap, str); - printf( "\n" ); + vlog(filter, LOG_LEVEL_FATAL, str, ap); - if (logfile) - { - outTimestamp(logfile); - va_list ap2; - va_start(ap2, str); - vfprintf(logfile, str, ap2); - va_end(ap2); - - fprintf(logfile, "\n" ); - fflush(logfile); - } - } - fflush(stdout); + va_end(ap); } -void Log::outStringInLine(const char * str, ...) +void Log::outCommand(uint32 account, const char * str, ...) { - if (!str) + if (!str || !ShouldLog(LOG_FILTER_GMCOMMAND, LOG_LEVEL_INFO)) return; va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); + char text[MAX_QUERY_LEN]; + vsnprintf(text, MAX_QUERY_LEN, str, ap); va_end(ap); - if (logfile) - { - va_start(ap, str); - vfprintf(logfile, str, ap); - va_end(ap); - } -} - -void Log::outCommand(uint32 account, const char * str, ...) -{ - if (!str) - return; - - // TODO: support accountid - if (m_enableLogDB && m_dbGM) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_GM, nnew_str); - va_end(ap2); - } - - if (m_logLevel > LOGL_NORMAL) - { - if (m_colored) - SetColor(true, m_colors[LOGL_BASIC]); - - va_list ap; - va_start(ap, str); - vutf8printf(stdout, str, &ap); - va_end(ap); + LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, LOG_FILTER_GMCOMMAND, text); + msg->param1 = account; - if (m_colored) - ResetColor(true); - - printf("\n"); - - if (logfile) - { - outTimestamp(logfile); - va_list ap2; - va_start(ap2, str); - vfprintf(logfile, str, ap2); - fprintf(logfile, "\n" ); - va_end(ap2); - fflush(logfile); - } - } - - if (m_gmlog_per_account) - { - if (FILE* per_file = openGmlogPerAccount (account)) - { - outTimestamp(per_file); - va_list ap; - va_start(ap, str); - vfprintf(per_file, str, ap); - fprintf(per_file, "\n" ); - va_end(ap); - fclose(per_file); - } - } - else if (gmLogfile) - { - outTimestamp(gmLogfile); - va_list ap; - va_start(ap, str); - vfprintf(gmLogfile, str, ap); - fprintf(gmLogfile, "\n" ); - va_end(ap); - fflush(gmLogfile); - } - - fflush(stdout); + write(msg); } -void Log::outChar(const char * str, ...) +void Log::SetRealmID(uint32 id) { - if (!str) - return; - - if (m_enableLogDB && m_dbChar) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_CHAR, nnew_str); - va_end(ap2); - } - - if (charLogfile) - { - outTimestamp(charLogfile); - va_list ap; - va_start(ap, str); - vfprintf(charLogfile, str, ap); - fprintf(charLogfile, "\n" ); - va_end(ap); - fflush(charLogfile); - } -} - -void Log::outCharDump(const char * str, uint32 account_id, uint32 guid, const char * name) -{ - FILE* file = NULL; - if (m_charLog_Dump_Separate) - { - char fileName[29]; // Max length: name(12) + guid(11) + _.log (5) + \0 - snprintf(fileName, 29, "%d_%s.log", guid, name); - std::string sFileName(m_dumpsDir); - sFileName.append(fileName); - file = fopen((m_logsDir + sFileName).c_str(), "w"); - } - else - file = charLogfile; - if (file) - { - fprintf(file, "== START DUMP == (account: %u guid: %u name: %s )\n%s\n== END DUMP ==\n", - account_id, guid, name, str); - fflush(file); - if (m_charLog_Dump_Separate) - fclose(file); - } -} - -void Log::outRemote(const char * str, ...) -{ - if (!str) - return; - - if (m_enableLogDB && m_dbRA) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_RA, nnew_str); - va_end(ap2); - } - - if (raLogfile) - { - outTimestamp(raLogfile); - va_list ap; - va_start(ap, str); - vfprintf(raLogfile, str, ap); - fprintf(raLogfile, "\n" ); - va_end(ap); - fflush(raLogfile); - } + realm = id; } -void Log::outChat(const char * str, ...) +void Log::Close() { - if (!str) - return; - - if (m_enableLogDB && m_dbChat) - { - va_list ap2; - va_start(ap2, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap2); - outDB(LOG_TYPE_CHAT, nnew_str); - va_end(ap2); - } - - if (chatLogfile) - { - outTimestamp(chatLogfile); - va_list ap; - va_start(ap, str); - vfprintf(chatLogfile, str, ap); - fprintf(chatLogfile, "\n" ); - fflush(chatLogfile); - va_end(ap); - } -} - -void Log::outErrorST(const char * str, ...) -{ - va_list ap; - va_start(ap, str); - char nnew_str[MAX_QUERY_LEN]; - vsnprintf(nnew_str, MAX_QUERY_LEN, str, ap); - va_end(ap); - - ACE_Stack_Trace st; - outError("%s [Stacktrace: %s]", nnew_str, st.c_str()); -} - -void Log::outWarden(const char * str, ...) -{ - if (!str) - return; - - if (wardenLogFile) + for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it) { - outTimestamp(wardenLogFile); - va_list ap; - va_start(ap, str); - vfprintf(wardenLogFile, str, ap); - fprintf(wardenLogFile, "\n" ); - fflush(wardenLogFile); - va_end(ap); + delete it->second; + it->second = NULL; } + appenders.clear(); + delete worker; + worker = NULL; } diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index 296c13d86c9..5e2b7972dc8 100755 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -19,196 +19,69 @@ #ifndef TRINITYCORE_LOG_H #define TRINITYCORE_LOG_H -#include "Common.h" -#include - -class Config; +#include "Define.h" +#include "Appender.h" +#include "LogWorker.h" +#include "Logger.h" -enum DebugLogFilters -{ - LOG_FILTER_NONE = 0x00000000, - LOG_FILTER_UNITS = 0x00000001, // Anything related to units that doesn't fit in other categories. ie. creature formations - LOG_FILTER_PETS = 0x00000002, - LOG_FILTER_VEHICLES = 0x00000004, - LOG_FILTER_TSCR = 0x00000008, // C++ AI, instance scripts, etc. - LOG_FILTER_DATABASE_AI = 0x00000010, // SmartAI, EventAI, CreatureAI - LOG_FILTER_MAPSCRIPTS = 0x00000020, - LOG_FILTER_NETWORKIO = 0x00000040, // Anything packet/netcode related - LOG_FILTER_SPELLS_AURAS = 0x00000080, - LOG_FILTER_ACHIEVEMENTSYS = 0x00000100, - LOG_FILTER_CONDITIONSYS = 0x00000200, - LOG_FILTER_POOLSYS = 0x00000400, - LOG_FILTER_AUCTIONHOUSE = 0x00000800, - LOG_FILTER_BATTLEGROUND = 0x00001000, // Anything related to arena's and battlegrounds - LOG_FILTER_OUTDOORPVP = 0x00002000, - LOG_FILTER_CHATSYS = 0x00004000, - LOG_FILTER_LFG = 0x00008000, - LOG_FILTER_MAPS = 0x00010000, // Maps, instances, grids, cells, visibility - LOG_FILTER_PLAYER_LOADING = 0x00020000, // Debug output from Player::_Load functions - LOG_FILTER_PLAYER_ITEMS = 0x00040000, // Anything item related - LOG_FILTER_PLAYER_SKILLS = 0x00080000, // Skills related - LOG_FILTER_LOOT = 0x00100000, // Loot related - LOG_FILTER_GUILD = 0x00200000, // Guild related - LOG_FILTER_TRANSPORTS = 0x00400000, // Transport related - LOG_FILTER_WARDEN = 0x00800000, // Warden related -}; - -enum LogTypes -{ - LOG_TYPE_STRING = 0, - LOG_TYPE_ERROR = 1, - LOG_TYPE_BASIC = 2, - LOG_TYPE_DETAIL = 3, - LOG_TYPE_DEBUG = 4, - LOG_TYPE_CHAR = 5, - LOG_TYPE_WORLD = 6, - LOG_TYPE_RA = 7, - LOG_TYPE_GM = 8, - LOG_TYPE_CRASH = 9, - LOG_TYPE_CHAT = 10, - MAX_LOG_TYPES -}; - -enum LogLevel -{ - LOGL_NORMAL = 0, - LOGL_BASIC, - LOGL_DETAIL, - LOGL_DEBUG -}; - -const int LogLevels = int(LOGL_DEBUG)+1; - -enum ColorTypes -{ - BLACK, - RED, - GREEN, - BROWN, - BLUE, - MAGENTA, - CYAN, - GREY, - YELLOW, - LRED, - LGREEN, - LBLUE, - LMAGENTA, - LCYAN, - WHITE -}; +#include -const int Colors = int(WHITE)+1; +#include +#include class Log { friend class ACE_Singleton; + typedef std::map LoggerMap; + private: Log(); ~Log(); public: - void Initialize(); - - void ReloadConfig(); - - void InitColors(const std::string& init_str); - void SetColor(bool stdout_stream, ColorTypes color); - void ResetColor(bool stdout_stream); - - void outErrorST(const char * err, ...) ATTR_PRINTF(2, 3); - void outDB(LogTypes type, const char * str); - void outString(const char * str, ...) ATTR_PRINTF(2, 3); - void outString(); - void outStringInLine(const char * str, ...) ATTR_PRINTF(2, 3); - void outError(const char * err, ...) ATTR_PRINTF(2, 3); - void outCrash(const char * err, ...) ATTR_PRINTF(2, 3); - void outBasic(const char * str, ...) ATTR_PRINTF(2, 3); - void outDetail(const char * str, ...) ATTR_PRINTF(2, 3); - void outSQLDev(const char * str, ...) ATTR_PRINTF(2, 3); - void outDebug(DebugLogFilters f, const char* str, ...) ATTR_PRINTF(3, 4); - void outStaticDebug(const char * str, ...) ATTR_PRINTF(2, 3); - void outDebugInLine(const char * str, ...) ATTR_PRINTF(2, 3); - void outErrorDb(const char * str, ...) ATTR_PRINTF(2, 3); - void outChar(const char * str, ...) ATTR_PRINTF(2, 3); - void outCommand(uint32 account, const char * str, ...) ATTR_PRINTF(3, 4); - void outRemote(const char * str, ...) ATTR_PRINTF(2, 3); - void outChat(const char * str, ...) ATTR_PRINTF(2, 3); - void outArena(const char * str, ...) ATTR_PRINTF(2, 3); - void outSQLDriver(const char* str, ...) ATTR_PRINTF(2, 3); - void outWarden(const char * str, ...) ATTR_PRINTF(2, 3); - void outCharDump(const char * str, uint32 account_id, uint32 guid, const char * name); - - static void outTimestamp(FILE* file); - static std::string GetTimestampStr(); + void Close(); + bool ShouldLog(LogFilterType type, LogLevel level) const; + bool SetLogLevel(std::string const& name, char const* level, bool isLogger = true); - void SetLogLevel(char * Level); - void SetLogFileLevel(char * Level); - void SetDBLogLevel(char * Level); - void SetSQLDriverQueryLogging(bool newStatus) { m_sqlDriverQueryLogging = newStatus; } - void SetRealmID(uint32 id) { realm = id; } + void log(LogFilterType f, LogLevel level, char const* str, ...) ATTR_PRINTF(4,5); + + void outTrace(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + void outDebug(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + void outInfo(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + void outWarn(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + void outError(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + void outFatal(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + + void EnableDBAppenders(); + void outCommand(uint32 account, const char * str, ...) ATTR_PRINTF(3, 4); + static std::string GetTimestampStr(); - bool IsOutDebug() const { return m_logLevel > 2 || (m_logFileLevel > 2 && logfile); } - bool IsOutCharDump() const { return m_charLog_Dump; } + void SetRealmID(uint32 id); - bool GetLogDB() const { return m_enableLogDB; } - bool GetLogDBLater() const { return m_enableLogDBLater; } - void SetLogDB(bool enable) { m_enableLogDB = enable; } - void SetLogDBLater(bool value) { m_enableLogDBLater = value; } - bool GetSQLDriverQueryLogging() const { return m_sqlDriverQueryLogging; } private: - FILE* openLogFile(char const* configFileName, char const* configTimeStampFlag, char const* mode); - FILE* openGmlogPerAccount(uint32 account); - - FILE* raLogfile; - FILE* logfile; - FILE* gmLogfile; - FILE* charLogfile; - FILE* dberLogfile; - FILE* chatLogfile; - FILE* arenaLogFile; - FILE* sqlLogFile; - FILE* sqlDevLogFile; - FILE* wardenLogFile; - - // cache values for after initilization use (like gm log per account case) + void vlog(LogFilterType f, LogLevel level, char const* str, va_list argptr); + void write(LogMessage* msg); + + Logger* GetLoggerByType(LogFilterType filter); + Appender* GetAppenderByName(std::string const& name); + uint8 NextAppenderId(); + void CreateAppenderFromConfig(const char* name); + void CreateLoggerFromConfig(const char* name); + void ReadAppendersFromConfig(); + void ReadLoggersFromConfig(); + + AppenderMap appenders; + LoggerMap loggers; + uint8 AppenderId; + std::string m_logsDir; std::string m_logsTimestamp; - // gm log control - bool m_gmlog_per_account; - std::string m_gmlog_filename_format; - - bool m_enableLogDBLater; - bool m_enableLogDB; uint32 realm; - - // log coloring - bool m_colored; - ColorTypes m_colors[4]; - - // log levels: - // false: errors only, true: full query logging - bool m_sqlDriverQueryLogging; - - // log levels: - // 0 minimum/string, 1 basic/error, 2 detail, 3 full/debug - uint8 m_dbLogLevel; - uint8 m_logLevel; - uint8 m_logFileLevel; - bool m_dbChar; - bool m_dbRA; - bool m_dbGM; - bool m_dbChat; - bool m_charLog_Dump; - bool m_charLog_Dump_Separate; - std::string m_dumpsDir; - - DebugLogFilters m_DebugLogMask; + LogWorker* worker; }; #define sLog ACE_Singleton::instance() #endif - diff --git a/src/server/shared/Logging/LogOperation.cpp b/src/server/shared/Logging/LogOperation.cpp new file mode 100644 index 00000000000..59368e519cd --- /dev/null +++ b/src/server/shared/Logging/LogOperation.cpp @@ -0,0 +1,14 @@ +#include "LogOperation.h" +#include "Logger.h" + +LogOperation::~LogOperation() +{ + delete msg; +} + +int LogOperation::call() +{ + if (logger && msg) + logger->write(*msg); + return 0; +} diff --git a/src/server/shared/Logging/LogOperation.h b/src/server/shared/Logging/LogOperation.h new file mode 100644 index 00000000000..046ff44e62e --- /dev/null +++ b/src/server/shared/Logging/LogOperation.h @@ -0,0 +1,24 @@ +#ifndef LOGOPERATION_H +#define LOGOPERATION_H + +class Logger; +struct LogMessage; + +class LogOperation +{ + public: + LogOperation(Logger* _logger, LogMessage* _msg) + : logger(_logger) + , msg(_msg) + { } + + ~LogOperation(); + + int call(); + + protected: + Logger *logger; + LogMessage *msg; +}; + +#endif diff --git a/src/server/shared/Logging/LogWorker.cpp b/src/server/shared/Logging/LogWorker.cpp new file mode 100644 index 00000000000..4dc71f7f878 --- /dev/null +++ b/src/server/shared/Logging/LogWorker.cpp @@ -0,0 +1,33 @@ +#include "LogWorker.h" + +LogWorker::LogWorker() + : m_queue(HIGH_WATERMARK, LOW_WATERMARK) +{ + ACE_Task_Base::activate(THR_NEW_LWP | THR_JOINABLE | THR_INHERIT_SCHED, 1); +} + +LogWorker::~LogWorker() +{ + m_queue.deactivate(); + wait(); +} + +int LogWorker::enqueue(LogOperation* op) +{ + return m_queue.enqueue(op); +} + +int LogWorker::svc() +{ + while (1) + { + LogOperation* request; + if (m_queue.dequeue(request) == -1) + break; + + request->call(); + delete request; + } + + return 0; +} diff --git a/src/server/shared/Logging/LogWorker.h b/src/server/shared/Logging/LogWorker.h new file mode 100644 index 00000000000..fe51be5376c --- /dev/null +++ b/src/server/shared/Logging/LogWorker.h @@ -0,0 +1,30 @@ +#ifndef LOGWORKER_H +#define LOGWORKER_H + +#include "LogOperation.h" + +#include +#include + +class LogWorker: protected ACE_Task_Base +{ + public: + LogWorker(); + ~LogWorker(); + + typedef ACE_Message_Queue_Ex LogMessageQueueType; + + enum + { + HIGH_WATERMARK = 8 * 1024 * 1024, + LOW_WATERMARK = 8 * 1024 * 1024 + }; + + int enqueue(LogOperation *op); + + private: + virtual int svc(); + LogMessageQueueType m_queue; +}; + +#endif diff --git a/src/server/shared/Logging/Logger.cpp b/src/server/shared/Logging/Logger.cpp new file mode 100644 index 00000000000..7464012c0ac --- /dev/null +++ b/src/server/shared/Logging/Logger.cpp @@ -0,0 +1,67 @@ +#include "Logger.h" + +Logger::Logger(): name(""), type(LOG_FILTER_GENERAL), level(LOG_LEVEL_DISABLED) +{ +} + +void Logger::Create(std::string const& _name, LogFilterType _type, LogLevel _level) +{ + name = _name; + type = _type; + level = _level; +} + +Logger::~Logger() +{ + for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it) + it->second = NULL; + appenders.clear(); +} + +std::string const& Logger::getName() const +{ + return name; +} + +LogFilterType Logger::getType() const +{ + return type; +} + +LogLevel Logger::getLogLevel() const +{ + return level; +} + +void Logger::addAppender(uint8 id, Appender* appender) +{ + appenders[id] = appender; +} + +void Logger::delAppender(uint8 id) +{ + AppenderMap::iterator it = appenders.find(id); + if (it != appenders.end()) + { + it->second = NULL; + appenders.erase(it); + } +} + +void Logger::setLogLevel(LogLevel _level) +{ + level = _level; +} + +void Logger::write(LogMessage& message) +{ + if (!level || level > message.level || message.text.empty()) + { + //fprintf(stderr, "Logger::write: Logger %s, Level %u. Msg %s Level %u WRONG LEVEL MASK OR EMPTY MSG\n", getName().c_str(), messge.level, message.text.c_str(), .message.level); // DEBUG - RemoveMe + return; + } + + for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it) + if (it->second) + it->second->write(message); +} diff --git a/src/server/shared/Logging/Logger.h b/src/server/shared/Logging/Logger.h new file mode 100644 index 00000000000..10b3991a537 --- /dev/null +++ b/src/server/shared/Logging/Logger.h @@ -0,0 +1,29 @@ +#ifndef LOGGER_H +#define LOGGER_H + +#include "Appender.h" + +class Logger +{ + public: + Logger(); + ~Logger(); + + void Create(std::string const& name, LogFilterType type, LogLevel level); + void addAppender(uint8 type, Appender *); + void delAppender(uint8 type); + + std::string const& getName() const; + LogFilterType getType() const; + LogLevel getLogLevel() const; + void setLogLevel(LogLevel level); + void write(LogMessage& message); + + private: + std::string name; + LogFilterType type; + LogLevel level; + AppenderMap appenders; +}; + +#endif diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 4fac31a9ac6..6912e841bc3 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -50,7 +50,7 @@ class ByteBufferPositionException : public ByteBufferException protected: void PrintError() const { - sLog->outError("Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD") " , + sLog->outError(LOG_FILTER_GENERAL, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD") " , (_add ? "put" : "get"), ValueSize, Pos, Size); } @@ -70,7 +70,7 @@ class ByteBufferSourceException : public ByteBufferException protected: void PrintError() const { - sLog->outError("Attempted to put a %s in ByteBuffer (pos: "SIZEFMTD" size: "SIZEFMTD")", + sLog->outError(LOG_FILTER_GENERAL, "Attempted to put a %s in ByteBuffer (pos: "SIZEFMTD" size: "SIZEFMTD")", (ValueSize > 0 ? "NULL-pointer" : "zero-sized value"), Pos, Size); } }; @@ -447,79 +447,65 @@ class ByteBuffer void print_storage() const { - if (!sLog->IsOutDebug()) // optimize disabled debug output + if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled debug output return; - sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE_SIZE: %lu", (unsigned long)size() ); + std::ostringstream o; + o << "STORAGE_SIZE: " << size(); for (uint32 i = 0; i < size(); ++i) - sLog->outDebugInLine("%u - ", read(i) ); - sLog->outDebug(LOG_FILTER_NETWORKIO, " "); + o << read(i) << " - "; + o << " "; + + sLog->outTrace(LOG_FILTER_NETWORKIO, "%s", o.str().c_str()); } void textlike() const { - if (!sLog->IsOutDebug()) // optimize disabled debug output + if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled debug output return; - sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE_SIZE: %lu", (unsigned long)size() ); + std::ostringstream o; + o << "STORAGE_SIZE: " << size(); for (uint32 i = 0; i < size(); ++i) - sLog->outDebugInLine("%c", read(i) ); - sLog->outDebug(LOG_FILTER_NETWORKIO, " "); + { + char buf[1]; + snprintf(buf, 1, "%c", read(i)); + o << buf; + } + o << " "; + sLog->outTrace(LOG_FILTER_NETWORKIO, "%s", o.str().c_str()); } void hexlike() const { - if (!sLog->IsOutDebug()) // optimize disabled debug output + if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled debug output return; - + uint32 j = 1, k = 1; - sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE_SIZE: %lu", (unsigned long)size() ); - + + std::ostringstream o; + o << "STORAGE_SIZE: " << size(); + for (uint32 i = 0; i < size(); ++i) { + char buf[3]; + snprintf(buf, 1, "%2X ", read(i)); if ((i == (j * 8)) && ((i != (k * 16)))) { - if (read(i) < 0x10) - { - sLog->outDebugInLine("| 0%X ", read(i) ); - } - else - { - sLog->outDebugInLine("| %X ", read(i) ); - } + o << "| "; ++j; } else if (i == (k * 16)) { - if (read(i) < 0x10) - { - sLog->outDebugInLine("\n"); - - sLog->outDebugInLine("0%X ", read(i) ); - } - else - { - sLog->outDebugInLine("\n"); - - sLog->outDebugInLine("%X ", read(i) ); - } - + o << "\n"; ++k; ++j; } - else - { - if (read(i) < 0x10) - { - sLog->outDebugInLine("0%X ", read(i) ); - } - else - { - sLog->outDebugInLine("%X ", read(i) ); - } - } + + o << buf; } - sLog->outDebugInLine("\n"); + o << " "; + sLog->outTrace(LOG_FILTER_NETWORKIO, "%s", o.str().c_str()); } protected: diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp index f2887a4d1bd..c6e9d385be3 100755 --- a/src/server/shared/Utilities/ServiceWin32.cpp +++ b/src/server/shared/Utilities/ServiceWin32.cpp @@ -257,7 +257,7 @@ bool WinServiceRun() if (!StartServiceCtrlDispatcher(serviceTable)) { - sLog->outError("StartService Failed. Error [%u]", ::GetLastError()); + sLog->outError(LOG_FILTER_GENERAL, "StartService Failed. Error [%u]", ::GetLastError()); return false; } return true; diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 699e7cad97c..23eeca11f66 100755 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -135,7 +135,7 @@ int kb_hit_return() void CliRunnable::run() { ///- Display the list of available CLI functions then beep - //sLog->outString(""); + //sLog->outInfo(LOG_FILTER_WORLDSERVER, ""); #if PLATFORM != PLATFORM_WINDOWS rl_attempted_completion_function = cli_completion; rl_event_hook = cli_hook_func; diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 04820f59355..862ed28f2d3 100755 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -58,7 +58,7 @@ uint32 realmID; ///< Id of the realm /// Print out the usage string for this program on the console. void usage(const char *prog) { - sLog->outString("Usage: \n %s []\n" + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Usage: \n %s []\n" " -c config_file use config_file as configuration file\n\r" #ifdef _WIN32 " Running as service functions:\n\r" @@ -81,7 +81,7 @@ extern int main(int argc, char **argv) { if (++c >= argc) { - sLog->outError("Runtime-Error: -c option requires an input argument"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Runtime-Error: -c option requires an input argument"); usage(argv[0]); return 1; } @@ -97,25 +97,25 @@ extern int main(int argc, char **argv) { if (++c >= argc) { - sLog->outError("Runtime-Error: -s option requires an input argument"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Runtime-Error: -s option requires an input argument"); usage(argv[0]); return 1; } if (strcmp(argv[c], "install") == 0) { if (WinServiceInstall()) - sLog->outString("Installing service"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Installing service"); return 1; } else if (strcmp(argv[c], "uninstall") == 0) { if (WinServiceUninstall()) - sLog->outString("Uninstalling service"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Uninstalling service"); return 1; } else { - sLog->outError("Runtime-Error: unsupported option %s", argv[c]); + sLog->outError(LOG_FILTER_WORLDSERVER, "Runtime-Error: unsupported option %s", argv[c]); usage(argv[0]); return 1; } @@ -131,14 +131,14 @@ extern int main(int argc, char **argv) if (!ConfigMgr::Load(cfg_file)) { - sLog->outError("Invalid or missing configuration file : %s", cfg_file); - sLog->outError("Verify that the file exists and has \'[worldserver]' written in the top of the file!"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Invalid or missing configuration file : %s", cfg_file); + sLog->outError(LOG_FILTER_WORLDSERVER, "Verify that the file exists and has \'[worldserver]' written in the top of the file!"); return 1; } - sLog->outString("Using configuration file %s.", cfg_file); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Using configuration file %s.", cfg_file); - sLog->outString("Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); - sLog->outString("Using ACE version: %s", ACE_VERSION); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Using ACE version: %s", ACE_VERSION); ///- and run the 'Master' /// \todo Why do we need this 'Master'? Can't all of this be in the Main as for Realmd? diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index 03b2859c514..48e07c727b4 100755 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -84,7 +84,7 @@ public: { if (!_delaytime) return; - sLog->outString("Starting up anti-freeze thread (%u seconds max stuck time)...", _delaytime/1000); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Starting up anti-freeze thread (%u seconds max stuck time)...", _delaytime/1000); m_loops = 0; w_loops = 0; m_lastchange = 0; @@ -102,11 +102,11 @@ public: // possible freeze else if (getMSTimeDiff(w_lastchange, curtime) > _delaytime) { - sLog->outError("World Thread hangs, kicking out server!"); + sLog->outError(LOG_FILTER_WORLDSERVER, "World Thread hangs, kicking out server!"); ASSERT(false); } } - sLog->outString("Anti-freeze thread exiting without problems."); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Anti-freeze thread exiting without problems."); } }; @@ -124,18 +124,18 @@ int Master::Run() BigNumber seed1; seed1.SetRand(16 * 8); - sLog->outString("%s (worldserver-daemon)", _FULLVERSION); - sLog->outString(" to stop.\n"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "%s (worldserver-daemon)", _FULLVERSION); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " to stop.\n"); - sLog->outString(" ______ __"); - sLog->outString("/\\__ _\\ __ __/\\ \\__"); - sLog->outString("\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\, _\\ __ __"); - sLog->outString(" \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\"); - sLog->outString(" \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\"); - sLog->outString(" \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\"); - sLog->outString(" \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\"); - sLog->outString(" C O R E /\\___/"); - sLog->outString("http://TrinityCore.org \\/__/\n"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " ______ __"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "/\\__ _\\ __ __/\\ \\__"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\, _\\ __ __"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, " C O R E /\\___/"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "http://TrinityCore.org \\/__/\n"); /// worldserver PID file creation std::string pidfile = ConfigMgr::GetStringDefault("PidFile", ""); @@ -144,11 +144,11 @@ int Master::Run() uint32 pid = CreatePIDFile(pidfile); if (!pid) { - sLog->outError("Cannot create PID file %s.\n", pidfile.c_str()); + sLog->outError(LOG_FILTER_WORLDSERVER, "Cannot create PID file %s.\n", pidfile.c_str()); return 1; } - sLog->outString("Daemon PID: %u\n", pid); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Daemon PID: %u\n", pid); } ///- Start the databases @@ -161,13 +161,13 @@ int Master::Run() ///- Initialize the World sWorld->SetInitialWorldSettings(); - // Initialise the signal handlers + ///- Initialize the signal handlers WorldServerSignalHandler SignalINT, SignalTERM; #ifdef _WIN32 WorldServerSignalHandler SignalBREAK; #endif /* _WIN32 */ - // Register worldserver's signal handlers + ///- Register worldserver's signal handlers ACE_Sig_Handler Handler; Handler.register_handler(SIGINT, &SignalINT); Handler.register_handler(SIGTERM, &SignalTERM); @@ -210,17 +210,16 @@ int Master::Run() if (!curAff) { - sLog->outError("Processors marked in UseProcessors bitmask (hex) %x are not accessible for the worldserver. Accessible processors bitmask (hex): %x", Aff, appAff); + sLog->outError(LOG_FILTER_WORLDSERVER, "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the worldserver. Accessible processors bitmask (hex): %x", Aff, appAff); } else { if (SetProcessAffinityMask(hProcess, curAff)) - sLog->outString("Using processors (bitmask, hex): %x", curAff); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Using processors (bitmask, hex): %x", curAff); else - sLog->outError("Can't set used processors (hex): %x", curAff); + sLog->outError(LOG_FILTER_WORLDSERVER, "Can't set used processors (hex): %x", curAff); } } - sLog->outString(""); } bool Prio = ConfigMgr::GetBoolDefault("ProcessPriority", false); @@ -229,10 +228,9 @@ int Master::Run() if (Prio) { if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS)) - sLog->outString("worldserver process priority class set to HIGH"); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "worldserver process priority class set to HIGH"); else - sLog->outError("Can't set worldserver process priority class."); - sLog->outString(""); + sLog->outError(LOG_FILTER_WORLDSERVER, "Can't set worldserver process priority class."); } } #endif @@ -250,7 +248,7 @@ int Master::Run() if (uint32 freeze_delay = ConfigMgr::GetIntDefault("MaxCoreStuckTime", 0)) { FreezeDetectorRunnable* fdr = new FreezeDetectorRunnable(); - fdr->SetDelayTime(freeze_delay*1000); + fdr->SetDelayTime(freeze_delay * 1000); ACE_Based::Thread freeze_thread(fdr); freeze_thread.setPriority(ACE_Based::Highest); } @@ -259,9 +257,9 @@ int Master::Run() uint16 wsport = sWorld->getIntConfig(CONFIG_PORT_WORLD); std::string bind_ip = ConfigMgr::GetStringDefault("BindIP", "0.0.0.0"); - if (sWorldSocketMgr->StartNetwork(wsport, bind_ip.c_str ()) == -1) + if (sWorldSocketMgr->StartNetwork(wsport, bind_ip.c_str()) == -1) { - sLog->outError("Failed to start network"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Failed to start network"); World::StopNow(ERROR_EXIT_CODE); // go down and shutdown the server } @@ -269,7 +267,7 @@ int Master::Run() // set server online (allow connecting now) LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID); - sLog->outString("%s (worldserver-daemon) ready...", _FULLVERSION); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "%s (worldserver-daemon) ready...", _FULLVERSION); // when the main thread closes the singletons get unloaded // since worldrunnable uses them, it will crash if unloaded after master @@ -291,7 +289,7 @@ int Master::Run() _StopDB(); - sLog->outString("Halting process..."); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Halting process..."); if (cliThread) { @@ -356,21 +354,20 @@ bool Master::_StartDB() { MySQL::Library_Init(); - sLog->SetLogDB(false); std::string dbstring; uint8 async_threads, synch_threads; dbstring = ConfigMgr::GetStringDefault("WorldDatabaseInfo", ""); if (dbstring.empty()) { - sLog->outError("World database not specified in configuration file"); + sLog->outError(LOG_FILTER_WORLDSERVER, "World database not specified in configuration file"); return false; } async_threads = ConfigMgr::GetIntDefault("WorldDatabase.WorkerThreads", 1); if (async_threads < 1 || async_threads > 32) { - sLog->outError("World database: invalid number of worker threads specified. " + sLog->outError(LOG_FILTER_WORLDSERVER, "World database: invalid number of worker threads specified. " "Please pick a value between 1 and 32."); return false; } @@ -379,7 +376,7 @@ bool Master::_StartDB() ///- Initialise the world database if (!WorldDatabase.Open(dbstring, async_threads, synch_threads)) { - sLog->outError("Cannot connect to world database %s", dbstring.c_str()); + sLog->outError(LOG_FILTER_WORLDSERVER, "Cannot connect to world database %s", dbstring.c_str()); return false; } @@ -387,14 +384,14 @@ bool Master::_StartDB() dbstring = ConfigMgr::GetStringDefault("CharacterDatabaseInfo", ""); if (dbstring.empty()) { - sLog->outError("Character database not specified in configuration file"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Character database not specified in configuration file"); return false; } async_threads = ConfigMgr::GetIntDefault("CharacterDatabase.WorkerThreads", 1); if (async_threads < 1 || async_threads > 32) { - sLog->outError("Character database: invalid number of worker threads specified. " + sLog->outError(LOG_FILTER_WORLDSERVER, "Character database: invalid number of worker threads specified. " "Please pick a value between 1 and 32."); return false; } @@ -404,7 +401,7 @@ bool Master::_StartDB() ///- Initialise the Character database if (!CharacterDatabase.Open(dbstring, async_threads, synch_threads)) { - sLog->outError("Cannot connect to Character database %s", dbstring.c_str()); + sLog->outError(LOG_FILTER_WORLDSERVER, "Cannot connect to Character database %s", dbstring.c_str()); return false; } @@ -412,14 +409,14 @@ bool Master::_StartDB() dbstring = ConfigMgr::GetStringDefault("LoginDatabaseInfo", ""); if (dbstring.empty()) { - sLog->outError("Login database not specified in configuration file"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Login database not specified in configuration file"); return false; } async_threads = ConfigMgr::GetIntDefault("LoginDatabase.WorkerThreads", 1); if (async_threads < 1 || async_threads > 32) { - sLog->outError("Login database: invalid number of worker threads specified. " + sLog->outError(LOG_FILTER_WORLDSERVER, "Login database: invalid number of worker threads specified. " "Please pick a value between 1 and 32."); return false; } @@ -428,7 +425,7 @@ bool Master::_StartDB() ///- Initialise the login database if (!LoginDatabase.Open(dbstring, async_threads, synch_threads)) { - sLog->outError("Cannot connect to login database %s", dbstring.c_str()); + sLog->outError(LOG_FILTER_WORLDSERVER, "Cannot connect to login database %s", dbstring.c_str()); return false; } @@ -436,14 +433,11 @@ bool Master::_StartDB() realmID = ConfigMgr::GetIntDefault("RealmID", 0); if (!realmID) { - sLog->outError("Realm ID not defined in configuration file"); + sLog->outError(LOG_FILTER_WORLDSERVER, "Realm ID not defined in configuration file"); return false; } - sLog->outString("Realm running as realm ID %d", realmID); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Realm running as realm ID %d", realmID); - ///- Initialize the DB logging system - sLog->SetLogDBLater(ConfigMgr::GetBoolDefault("EnableLogDB", false)); // set var to enable DB logging once startup finished. - sLog->SetLogDB(false); sLog->SetRealmID(realmID); ///- Clean the database before starting @@ -454,7 +448,7 @@ bool Master::_StartDB() sWorld->LoadDBVersion(); - sLog->outString("Using World DB: %s", sWorld->GetDBVersion()); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Using World DB: %s", sWorld->GetDBVersion()); return true; } diff --git a/src/server/worldserver/RemoteAccess/RARunnable.cpp b/src/server/worldserver/RemoteAccess/RARunnable.cpp index 3f5d7bde736..7a1fff51afd 100644 --- a/src/server/worldserver/RemoteAccess/RARunnable.cpp +++ b/src/server/worldserver/RemoteAccess/RARunnable.cpp @@ -67,11 +67,11 @@ void RARunnable::run() if (acceptor.open(listen_addr, m_Reactor) == -1) { - sLog->outError("Trinity RA can not bind to port %d on %s", raport, stringip.c_str()); + sLog->outError(LOG_FILTER_WORLDSERVER, "Trinity RA can not bind to port %d on %s", raport, stringip.c_str()); return; } - sLog->outString("Starting Trinity RA on port %d on %s", raport, stringip.c_str()); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "Starting Trinity RA on port %d on %s", raport, stringip.c_str()); while (!World::IsStopped()) { @@ -82,5 +82,5 @@ void RARunnable::run() break; } - sLog->outStaticDebug("Trinity RA thread exiting"); + sLog->outDebug(LOG_FILTER_WORLDSERVER, "Trinity RA thread exiting"); } diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index ebc7c7624d9..18c90aa5ba5 100755 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -45,18 +45,18 @@ int RASocket::open(void *) if (peer().get_remote_addr(remote_addr) == -1) { - sLog->outError("RASocket::open: peer().get_remote_addr error is %s", ACE_OS::strerror(errno)); + sLog->outError(LOG_FILTER_WORLDSERVER, "RASocket::open: peer().get_remote_addr error is %s", ACE_OS::strerror(errno)); return -1; } - sLog->outRemote("Incoming connection from %s", remote_addr.get_host_addr()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Incoming connection from %s", remote_addr.get_host_addr()); return activate(); } int RASocket::handle_close(ACE_HANDLE, ACE_Reactor_Mask) { - sLog->outRemote("Closing connection"); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Closing connection"); peer().close_reader(); wait(); destroy(); @@ -122,7 +122,7 @@ int RASocket::recv_line(std::string& out_line) if (recv_line(message_block) == -1) { - sLog->outRemote("Recv error %s", ACE_OS::strerror(errno)); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Recv error %s", ACE_OS::strerror(errno)); return -1; } @@ -136,7 +136,7 @@ int RASocket::process_command(const std::string& command) if (command.length() == 0) return 0; - sLog->outRemote("Got command: %s", command.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Got command: %s", command.c_str()); // handle quit, exit and logout commands to terminate connection if (command == "quit" || command == "exit" || command == "logout") { @@ -186,7 +186,7 @@ int RASocket::check_access_level(const std::string& user) if (!result) { - sLog->outRemote("User %s does not exist in database", user.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User %s does not exist in database", user.c_str()); return -1; } @@ -194,12 +194,12 @@ int RASocket::check_access_level(const std::string& user) if (fields[1].GetUInt8() < _minLevel) { - sLog->outRemote("User %s has no privilege to login", user.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User %s has no privilege to login", user.c_str()); return -1; } else if (fields[2].GetInt32() != -1) { - sLog->outRemote("User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str()); return -1; } @@ -225,7 +225,7 @@ int RASocket::check_password(const std::string& user, const std::string& pass) if (!result) { - sLog->outRemote("Wrong password for user: %s", user.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Wrong password for user: %s", user.c_str()); return -1; } @@ -248,7 +248,7 @@ int RASocket::authenticate() if (recv_line(pass) == -1) return -1; - sLog->outRemote("Login attempt for user: %s", user.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Login attempt for user: %s", user.c_str()); if (check_access_level(user) == -1) return -1; @@ -256,7 +256,7 @@ int RASocket::authenticate() if (check_password(user, pass) == -1) return -1; - sLog->outRemote("User login: %s", user.c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "User login: %s", user.c_str()); return 0; } @@ -290,7 +290,7 @@ int RASocket::subnegotiate() if (n >= 1024) { - sLog->outRemote("RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", uint32(n)); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", uint32(n)); return -1; } @@ -324,7 +324,7 @@ int RASocket::subnegotiate() uint8 param = buf[++i]; ss << uint32(param); - sLog->outRemote(ss.str().c_str()); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, ss.str().c_str()); } ++i; } @@ -385,7 +385,7 @@ void RASocket::zprint(void* callbackArg, const char * szText) if (socket->putq(mb, const_cast(&ACE_Time_Value::zero)) == -1) { - sLog->outRemote("Failed to enqueue message, queue is full or closed. Error is %s", ACE_OS::strerror(errno)); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Failed to enqueue message, queue is full or closed. Error is %s", ACE_OS::strerror(errno)); mb->release(); } } @@ -406,7 +406,7 @@ void RASocket::commandFinished(void* callbackArg, bool /*success*/) if (socket->putq(mb) == -1) { // getting here is bad, command can't be marked as complete - sLog->outRemote("Failed to enqueue command end message. Error is %s", ACE_OS::strerror(errno)); + sLog->outDebug(LOG_FILTER_REMOTECOMMAND, "Failed to enqueue command end message. Error is %s", ACE_OS::strerror(errno)); mb->release(); } } diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index 26b28b25fbb..3ce4d4f59cb 100755 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -32,11 +32,11 @@ void TCSoapRunnable::run() soap.send_timeout = 5; if (!soap_valid_socket(soap_bind(&soap, m_host.c_str(), m_port, 100))) { - sLog->outError("TCSoap: couldn't bind to %s:%d", m_host.c_str(), m_port); + sLog->outError(LOG_FILTER_WORLDSERVER, "TCSoap: couldn't bind to %s:%d", m_host.c_str(), m_port); exit(-1); } - sLog->outString("TCSoap: bound to http://%s:%d", m_host.c_str(), m_port); + sLog->outInfo(LOG_FILTER_WORLDSERVER, "TCSoap: bound to http://%s:%d", m_host.c_str(), m_port); while (!World::IsStopped()) { @@ -119,7 +119,7 @@ int ns1__executeCommand(soap* soap, char* command, char** result) int acc = connection.pendingCommands.acquire(); if (acc) { - sLog->outError("TCSoap: Error while acquiring lock, acc = %i, errno = %u", acc, errno); + sLog->outError(LOG_FILTER_WORLDSERVER, "TCSoap: Error while acquiring lock, acc = %i, errno = %u", acc, errno); } // alright, command finished diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index cc4c4a555c2..01dbd5eaf2d 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -404,317 +404,175 @@ PersistentCharacterCleanFlags = 0 PidFile = "" # -# LogLevel -# Description: Server console level of logging -# Default: 1 - (Basic) -# 0 - (Minimum) -# 2 - (Detail) -# 3 - (Full/Debug) - -LogLevel = 1 - -# -# LogFile -# Description: Log file for main server log. -# Default: "Server.log" - (Enabled) -# "" - (Disabled) - -LogFile = "Server.log" - -# -# LogTimestamp -# Description: Append timestamp to the server log file name. -# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext -# Default: 0 - (Disabled) -# 1 - (Enabled) - -LogTimestamp = 0 - -# -# LogFileLevel -# Description: Server file level of logging -# Default: 0 - (Minimum) -# 1 - (Basic) -# 2 - (Detail) -# 3 - (Full/Debug) - -LogFileLevel = 0 - -# -# Debug Log Mask -# Description: Bitmask that determines which debug log output (level 3) -# will be logged. -# Possible flags: -# 1 - Anything related to units that doesn't fit in other -# categories. -# 2 - Anything related to pets. -# 4 - Anything related to vehicles. -# 8 - Anything related to C++ AI, instance scripts, etc. -# 16 - Anything related to DB AI, such as SAI, EAI, CreatureAI -# 32 - Anything related to DB map scripts -# 64 - Anything related to network input/output, -# such as packet handlers and netcode logs -# 128 - Anything related to the spellsystem and aurasystem -# 256 - Anything related to the achievement system -# 512 - Anything related to the condition system -# 1024 - Anything related to the pool system -# 2048 - Anything related to the auction house -# 4096 - Anything related to arena's and battlegrounds -# 8192 - Anything related to outdoor PVP -# 16384 - Anything related to the chat system -# 32768 - Anything related to the LFG system -# 65536 - Anything related to maps, instances (not scripts), -# grids, cells, visibility, etc. -# 131072 - Anything related to player loading from DB -# (Player::_LoadXXX functions) -# 262144 - Anything related to items -# 524288 - Anything related to player skills -# (do not confuse with spells) -# 1048576 - Anything related to loot -# 2097152 - Anything related to guilds -# 4194304 - Anything related to transports -# 8388608 - Anything related to Warden anti cheat -# -# Simply add the values together to create a bitmask. -# For more info see enum DebugLogFilters in Log.h -# -# Default: 0 (nothing) - -DebugLogMask = 0 - -# -# PacketLogFile -# Description: Binary packet logging file for the world server. -# Filename extension must be .bin to be parsable with WowPacketParser. -# Example: "World.bin" - (Enabled) -# Default: "" - (Disabled) - -PacketLogFile = "" - -# -# DBErrorLogFile -# Description: Log file for database errors. -# Default: "DBErrors.log" - (Enabled) -# "" - (Disabled) - -DBErrorLogFile = "DBErrors.log" - -# -# CharLogFile -# Description: Log file for character operations -# Default: "Char.log" - (Enabled) -# "" - (Disabled) - -CharLogFile = "Char.log" - -# -# CharLogTimestamp -# Description: Append timestamp to the character log file name. -# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext -# Default: 0 - (Disabled) -# 1 - (Enabled) - -CharLogTimestamp = 0 - -# -# CharLogDump -# Description: Write a character dump in the CharLogFile before deleting it. -# For restoration, copy character data from log file starting from -# line == START DUMP == to line == END DUMP == (exclusive) -# and load it using the "pdump load" command. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -CharLogDump = 0 - -# -# CharLogDump.Separate -# Description: Write character dump to separate files files rather than adding it to the -# CharLogFile. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -CharLogDump.Separate = 0 - -# -# CharLogDump.SeparateDir -# Description: Write dump files into the sub folder within the log folder. -# Example: "chardumps" - (Enabled) -# Default: "" - (Disabled) - -CharLogDump.SeparateDir = "" - -# -# GmLogFile -# Description: Log file for gamemaster commands. -# Default: "GM.log" - (Enabled) -# "" - (Disabled) - -GmLogFile = "GM.log" - -# -# GmLogTimestamp -# Description: Append timestamp to the gamemaster log file name. -# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext -# Default: 0 - (Disabled) -# 1 - (Enabled) - -GmLogTimestamp = 0 - -# -# GmLogPerAccount -# Description: Create a log file per gamemaster account. -# Important: Logs not created if GmLogFile is not set. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -GmLogPerAccount = 0 - -# -# RaLogFile -# Description: Log file for Remote Access commands. -# Default: "RA.log" - (Enabled) -# "" - (Disabled) - -RaLogFile = "RA.log" - -# -# ArenaLogFile -# Description: Log file for arena fights and arena team creations. -# Example: "Arena.log" - (Enabled) -# Default: "" - (Disabled) - -ArenaLogFile = "" - -# -# ArenaLog.ExtendedInfo -# Description: Include extended info to ArenaLogFile for each player after rated arena -# matches (guid, name, team, IP, healing/damage done, killing blows). -# Default: 0 - (Disabled) -# 1 - (Enabled) - -ArenaLog.ExtendedInfo = 0 - -# -# SQLDeveloperLogFile -# Description: Log file for core-generated SQL queries/dumps -# Example: "SQLDev.log" - (Enabled) -# Default: "" - (Disabled) - -SQLDeveloperLogFile = "" - -# -# SQLDriverLogFile -# Description: Log file for SQL driver events. -# Example: "SQLDriver.log" - (Enabled) -# Default: "" - (Disabled) - -SQLDriverLogFile = "" - -# -# SQLDriverQueryLogging -# Description: Log SQL queries to the SQLDriverLogFile and console. -# Default: 0 - (Disabled, Query errors only) -# 1 - (Enabled, Full query logging - may have performance impact) - -SQLDriverQueryLogging = 0 - -# -# LogColors -# Description: Colors for log messages (Format: "normal basic detail debug"). -# Colors: 0 - Black -# 1 - Red -# 2 - Green -# 3 - Brown -# 4 - Blue -# 5 - Magenta -# 6 - Cyan -# 7 - Grey -# 8 - Yellow -# 9 - Lred -# 10 - Lgreen -# 11 - Lblue -# 12 - Lmagenta -# 13 - Lcyan -# 14 - White -# Example: "13 11 9 5" - (Enabled) -# Default: "" - (Disabled) - -LogColors = "" - -# -# EnableLogDB -# Description: Write log messages to database (LogDatabaseInfo). -# Default: 0 - (Disabled) -# 1 - (Enabled) - -EnableLogDB = 0 - -# -# DBLogLevel -# Description: Log level of databases logging. -# Default: 2 - (Detail) -# 0 - (Minimum) -# 1 - (Basic) -# 3 - (Full/Debug) - -DBLogLevel = 2 - -# -# LogDB.Char -# Description: Log character operations to database. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -LogDB.Char = 0 - -# -# LogDB.GM -# Description: Log gamemaster commands to database. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -LogDB.GM = 0 - -# -# LogDB.RA -# Description: Log remote access events to database. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -LogDB.RA = 0 - -# -# LogDB.World -# Description: Log world server packets to database. -# Default: 0 - (Disabled) -# 1 - (Enabled, May have performance impact) - -LogDB.World = 0 - -# -# LogDB.Chat -# Description: Log chat messages to database. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -LogDB.Chat = 0 - - -# ChatLogFile -# Description: Log file for chat logs. -# Default: "Chat.log" - (Enabled) -# "" - (Disabled) - -ChatLogFile = "Chat.log" - -# ChatLogTimestamp -# Description: Append timestamp to the chat log file name. +# Appender config values: Given a appender "name" the following options +# can be read: +# +# Appender.name.Type +# Description: Type of appender. Extra appender config options +# will be read depending on this value +# Default: 0 - (None) +# 1 - (Console) +# 2 - (File) +# 3 - (DB) +# +# Appender.name.Level +# Description: Appender level of logging +# Default: 0 - (Disabled) +# 1 - (Trace) +# 2 - (Debug) +# 3 - (Info) +# 4 - (Warn) +# 5 - (Error) +# 6 - (Fatal) +# +# Appender.name.Colors +# Description: Colors for log messages +# (Format: "fatal error warn info debug trace"). +# (Only used with Type = 1) +# Default: "" - no colors +# Colors: 0 - BLACK +# 1 - RED +# 2 - GREEN +# 3 - BROWN +# 4 - BLUE +# 5 - MAGENTA +# 6 - CYAN +# 7 - GREY +# 8 - YELLOW +# 9 - LRED +# 10 - LGREEN +# 11 - LBLUE +# 12 - LMAGENTA +# 13 - LCYAN +# 14 - WHITE +# Example: "13 11 9 5 3 1" +# +# Appender.name.File +# Description: Name of the file +# Allows to use one "%u" to create dynamic files +# (Only used with Type = 2) +# +# Appender.name.Mode +# Description: Mode to open the file +# (Only used with Type = 2) +# Default: a - (Append) +# w - (Overwrite) +# +# Appender.name.Backup +# Description: Make a backup of existing file before overwrite +# (Only used with Mode = w) +# Default: 0 - false +# 1 - true +# +# Appender.name.Timestamp +# Description: Append timestamp to the log file name. # Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext -# Default: 0 - (Disabled) -# 1 - (Enabled) - -ChatLogTimestamp = 0 +# (Only used with Type = 2) +# +# Logger config values: Given a logger "name" the following options +# can be read: +# +# Logger.name.Type +# Description: Type of logger. Logs anything related to... +# If no logger with type = 0 exists core will create +# it but disabled. Logger with type = 0 is the +# default one, used when there is no other specific +# logger configured for other logger types +# Default: 0 - Default. Each type that has no config will +# rely on this one. Core will create this logger +# (disabled) if it's not configured +# 1 - Units that doesn't fit in other categories +# 2 - Pets +# 3 - Vehicles +# 4 - C++ AI, instance scripts, etc. +# 5 - DB AI, such as SAI, EAI, CreatureAI +# 6 - DB map scripts +# 7 - Network input/output, +# such as packet handlers and netcode logs +# 8 - Spellsystem and aurasystem +# 9 - Achievement system +# 10 - Condition system +# 11 - Pool system +# 12 - Auction house +# 13 - Arena's and battlegrounds +# 14 - Outdoor PVP +# 15 - Chat system +# 16 - LFG system +# 17 - Maps, instances (not scripts), +# grids, cells, visibility, etc. +# 18 - Player that doesn't fit in other categories. +# 19 - Player loading from DB +# (Player::_LoadXXX functions) +# 20 - Items +# 21 - Player skills (do not confuse with spells) +# 22 - Player chat logs +# 23 - loot +# 24 - guilds +# 25 - transports +# 26 - SQL. DB errors and SQL Driver +# 27 - GM Commands +# 28 - Remote Access Commands +# 29 - Warden +# 30 - Authserver +# 31 - Worldserver +# 32 - Game Events +# 33 - Calendar +# +# Logger.name.Level +# Description: Logger level of logging +# Default: 0 - (Disabled) +# 1 - (Trace) +# 2 - (Debug) +# 3 - (Info) +# 4 - (Warn) +# 5 - (Error) +# 6 - (Fatal) +# +# Logger.name.Appenders +# Description: List of appenders linked to logger +# (Using spaces as separator). + +# +# Appenders +# Description: List of Appenders to read from config +# (Using spaces as separator). +# Default: "Console Server" +# +# Loggers +# Description: List of Loggers to read from config +# (Using spaces as separator). +# Default: "root" + +Loggers=root GM SQL +Appenders=Console Server GM SQL + +Appender.Console.Type=1 +Appender.Console.Level=2 + +Appender.Server.Type=2 +Appender.Server.Level=2 +Appender.Server.File=Server.log +Appender.Server.Mode=w + +Appender.GM.Type=2 +Appender.GM.Level=2 +Appender.GM.File=gm_#%u.log + +Appender.SQL.Type=2 +Appender.SQL.Level=2 +Appender.SQL.File=SQL.log + +Logger.root.Type=0 +Logger.root.Level=3 +Logger.root.Appenders=Console Server + +Logger.SQL.Type=26 +Logger.SQL.Level=3 +Logger.SQL.Appenders=Console Server SQL + +Logger.GM.Type=27 +Logger.GM.Level=3 +Logger.GM.Appenders=Console Server GM # # ChatLogs.Channel -- cgit v1.2.3 From 634776e0bcc90e610a3f736e8ddf75792ad9b73e Mon Sep 17 00:00:00 2001 From: Spp Date: Fri, 3 Aug 2012 15:54:54 +0200 Subject: Fix compile under windows --- src/server/game/AI/EventAI/CreatureEventAIMgr.cpp | 2 +- src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 6 +- src/server/game/Achievements/AchievementMgr.cpp | 24 +- src/server/game/Addons/AddonMgr.cpp | 4 +- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 12 +- src/server/game/Battlegrounds/ArenaTeamMgr.cpp | 4 +- src/server/game/Battlegrounds/BattlegroundMgr.cpp | 10 +- .../game/Battlegrounds/Zones/BattlegroundRV.cpp | 2 +- src/server/game/Conditions/ConditionMgr.cpp | 4 +- src/server/game/Conditions/DisableMgr.cpp | 8 +- src/server/game/DataStores/DBCStores.cpp | 2 +- src/server/game/DungeonFinding/LFGMgr.cpp | 4 +- .../game/Entities/Creature/CreatureGroups.cpp | 4 +- .../game/Entities/Item/ItemEnchantmentMgr.cpp | 4 +- src/server/game/Entities/Transport/Transport.cpp | 8 +- src/server/game/Events/GameEventMgr.cpp | 66 ++--- src/server/game/Globals/ObjectMgr.cpp | 268 ++++++++++----------- src/server/game/Groups/GroupMgr.cpp | 12 +- src/server/game/Guilds/GuildMgr.cpp | 34 +-- src/server/game/Instances/InstanceSaveMgr.cpp | 2 +- src/server/game/Loot/LootMgr.cpp | 24 +- .../game/Movement/Waypoints/WaypointManager.cpp | 4 +- src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp | 4 +- src/server/game/Scripting/ScriptMgr.cpp | 2 +- src/server/game/Scripting/ScriptSystem.cpp | 14 +- src/server/game/Skills/SkillDiscovery.cpp | 4 +- src/server/game/Skills/SkillExtraItems.cpp | 4 +- src/server/game/Spells/SpellMgr.cpp | 74 +++--- src/server/game/Texts/CreatureTextMgr.cpp | 6 +- src/server/game/Tickets/TicketMgr.cpp | 6 +- src/server/game/Tools/CharacterDatabaseCleaner.cpp | 2 +- src/server/game/Warden/WardenCheckMgr.cpp | 12 +- src/server/game/Weather/WeatherMgr.cpp | 4 +- src/server/game/World/World.cpp | 14 +- src/server/shared/AutoPtr.h | 2 +- src/server/shared/Database/MySQLConnection.cpp | 2 +- src/server/shared/Logging/Appender.h | 2 +- src/server/shared/Packets/ByteBuffer.h | 8 +- 38 files changed, 334 insertions(+), 334 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index 2d7c64bf5df..7289a4eed28 100755 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -209,7 +209,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id); continue; } - + // Only on the first script if (cInfo->AIName != "EventAI" && m_CreatureEventAI_Event_Map[creature_id].empty()) sLog->outError(LOG_FILTER_SQL, "Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 1723e96a08a..7a997609b5d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -51,7 +51,7 @@ void SmartWaypointMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty."); - + return; } @@ -89,7 +89,7 @@ void SmartWaypointMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime)); - + } SmartWaypointMgr::~SmartWaypointMgr() @@ -118,7 +118,7 @@ void SmartAIMgr::LoadSmartAIFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty."); - + return; } diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index be4ce974f70..191d91b61a7 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -2202,7 +2202,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() if (sAchievementCriteriaStore.GetNumRows() == 0) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement criteria."); - + return; } @@ -2220,7 +2220,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() } sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime)); - + } void AchievementGlobalMgr::LoadAchievementReferenceList() @@ -2230,7 +2230,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() if (sAchievementStore.GetNumRows() == 0) { sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement references."); - + return; } @@ -2251,7 +2251,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() const_cast(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar) sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void AchievementGlobalMgr::LoadAchievementCriteriaData() @@ -2265,7 +2265,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() if (!result) { sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty."); - + return; } @@ -2397,7 +2397,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() } sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void AchievementGlobalMgr::LoadCompletedAchievements() @@ -2409,7 +2409,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() if (!result) { sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty."); - + return; } @@ -2437,7 +2437,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void AchievementGlobalMgr::LoadRewards() @@ -2452,7 +2452,7 @@ void AchievementGlobalMgr::LoadRewards() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty."); - + return; } @@ -2544,7 +2544,7 @@ void AchievementGlobalMgr::LoadRewards() while (result->NextRow()); sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void AchievementGlobalMgr::LoadRewardLocales() @@ -2560,7 +2560,7 @@ void AchievementGlobalMgr::LoadRewardLocales() if (!result) { sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty"); - + return; } @@ -2587,5 +2587,5 @@ void AchievementGlobalMgr::LoadRewardLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime)); - + } diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp index 2d1d02cf5d1..6af87827917 100755 --- a/src/server/game/Addons/AddonMgr.cpp +++ b/src/server/game/Addons/AddonMgr.cpp @@ -44,7 +44,7 @@ void LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 known addons. DB table `addons` is empty!"); - + return; } @@ -64,7 +64,7 @@ void LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SaveAddon(AddonInfo const& addon) diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 57ab63cdd16..ab08262a928 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -264,7 +264,7 @@ void AuctionHouseMgr::LoadAuctionItems() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!"); - + return; } @@ -297,7 +297,7 @@ void AuctionHouseMgr::LoadAuctionItems() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void AuctionHouseMgr::LoadAuctions() @@ -310,7 +310,7 @@ void AuctionHouseMgr::LoadAuctions() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 auctions. DB table `auctionhouse` is empty."); - + return; } @@ -336,7 +336,7 @@ void AuctionHouseMgr::LoadAuctions() CharacterDatabase.CommitTransaction(trans); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void AuctionHouseMgr::AddAItem(Item* it) @@ -735,7 +735,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup() if (!expAuctions) { sLog->outInfo(LOG_FILTER_GENERAL, ">> No expired auctions to delete"); - + return; } @@ -783,7 +783,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup() } while (expAuctions->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime)); - + } diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index a36be0e7749..665742c97b1 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -102,7 +102,7 @@ void ArenaTeamMgr::LoadArenaTeams() if (!result) { sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 arena teams. DB table `arena_team` is empty!"); - + return; } @@ -133,7 +133,7 @@ void ArenaTeamMgr::LoadArenaTeams() while (result->NextRow()); sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ArenaTeamMgr::DistributeArenaPoints() diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index b2615d3e54c..290da0bb31f 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -684,7 +684,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty."); - + return; } @@ -772,7 +772,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() } data.StartMaxDist = fields[9].GetFloat(); - + selectionWeight = fields[10].GetUInt8(); data.scriptId = sObjectMgr->GetScriptId(fields[11].GetCString()); data.BattlegroundName = bl->name[sWorld->GetDefaultDbcLocale()]; @@ -793,7 +793,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void BattlegroundMgr::InitAutomaticArenaPointDistribution() @@ -1078,7 +1078,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() if (!result) { sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!"); - + return; } @@ -1103,7 +1103,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() while (result->NextRow()); sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 561cac54025..769df5445c7 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -245,6 +245,6 @@ void BattlegroundRV::TogglePillarCollision() gob->SendUpdateToPlayer(player); } } - + SetPillarCollision(!apply); } \ No newline at end of file diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index e6acefcce48..67ba643dd97 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -713,7 +713,7 @@ void ConditionMgr::LoadConditions(bool isReload) if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 conditions. DB table `conditions` is empty!"); - + return; } @@ -927,7 +927,7 @@ void ConditionMgr::LoadConditions(bool isReload) while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot) diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index 99a492a224e..6215cf5bb75 100755 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -60,7 +60,7 @@ void LoadDisables() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 disables. DB table `disables` is empty!"); - + return; } @@ -229,7 +229,7 @@ void LoadDisables() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime)); - + } void CheckQuestDisables() @@ -240,7 +240,7 @@ void CheckQuestDisables() if (!count) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Checked 0 quest disables."); - + return; } @@ -260,7 +260,7 @@ void CheckQuestDisables() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index abf385b1463..48ceda2a212 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -637,7 +637,7 @@ void LoadDBCStores(const std::string& dataPath) } sLog->outInfo(LOG_FILTER_GENERAL, ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime)); - + } SimpleFactionsList const* GetFactionTeamList(uint32 faction) diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 05385361e1b..3a2a044ca3b 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -136,7 +136,7 @@ void LFGMgr::LoadRewards() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!"); - + return; } @@ -184,7 +184,7 @@ void LFGMgr::LoadRewards() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_LFG, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void LFGMgr::Update(uint32 diff) diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 6468e611b13..21ed1a23828 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -85,7 +85,7 @@ void FormationMgr::LoadCreatureFormations() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!"); - + return; } @@ -137,7 +137,7 @@ void FormationMgr::LoadCreatureFormations() while (result->NextRow()); sLog->outInfo(LOG_FILTER_UNITS, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void CreatureGroup::AddMember(Creature* member) diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index c6ed8a2925a..0478173b96e 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -71,12 +71,12 @@ void LoadRandomEnchantmentsTable() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_PLAYER_ITEMS, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } else { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty."); - + } } diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 238b6e9cd5a..52d5c9114ff 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -36,7 +36,7 @@ void MapManager::LoadTransports() if (!result) { sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transports. DB table `transports` is empty!"); - + return; } @@ -122,7 +122,7 @@ void MapManager::LoadTransports() } sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void MapManager::LoadTransportNPCs() @@ -135,7 +135,7 @@ void MapManager::LoadTransportNPCs() if (!result) { sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!"); - + return; } @@ -167,7 +167,7 @@ void MapManager::LoadTransportNPCs() while (result->NextRow()); sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } Transport::Transport(uint32 period, uint32 script) : GameObject(), m_pathTime(0), m_timer(0), diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index e1141f785e1..afbae063e5e 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -211,7 +211,7 @@ void GameEventMgr::LoadFromDB() { mGameEvent.clear(); sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 game events. DB table `game_event` is empty."); - + return; } @@ -261,7 +261,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Saves Data..."); @@ -274,7 +274,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty."); - + } else { @@ -307,7 +307,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -320,7 +320,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty."); - + } else { @@ -358,7 +358,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -373,7 +373,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty"); - + } else { @@ -401,7 +401,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -416,7 +416,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty."); - + } else { @@ -444,7 +444,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -459,7 +459,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty."); - + } else { @@ -501,7 +501,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -515,7 +515,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty."); - + } else { @@ -542,7 +542,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -556,7 +556,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty."); - + } else { @@ -583,7 +583,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -597,7 +597,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty."); - + } else { @@ -626,7 +626,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -640,7 +640,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty."); - + } else { @@ -668,7 +668,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -682,7 +682,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty."); - + } else { @@ -716,7 +716,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -730,7 +730,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty."); - + } else { @@ -756,7 +756,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -770,7 +770,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty."); - + } else { @@ -800,7 +800,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -814,7 +814,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty."); - + } else { @@ -866,7 +866,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -880,7 +880,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty."); - + } else { @@ -904,7 +904,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -919,7 +919,7 @@ void GameEventMgr::LoadFromDB() if (!result) { sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty."); - + } else { @@ -953,7 +953,7 @@ void GameEventMgr::LoadFromDB() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } } @@ -1030,7 +1030,7 @@ void GameEventMgr::StartArenaSeason() StartEvent(eventId, true); sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Arena Season %u started...", season); - + } uint32 GameEventMgr::Update() // return the next event delay in ms diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 9cbf9ed1ee2..fc4386633ff 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -297,7 +297,7 @@ void ObjectMgr::LoadCreatureLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadGossipMenuItemsLocales() @@ -334,7 +334,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadPointOfInterestLocales() @@ -361,7 +361,7 @@ void ObjectMgr::LoadPointOfInterestLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadCreatureTemplates() @@ -389,7 +389,7 @@ void ObjectMgr::LoadCreatureTemplates() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature template definitions. DB table `creature_template` is empty."); - + return; } @@ -492,7 +492,7 @@ void ObjectMgr::LoadCreatureTemplates() CheckCreatureTemplate(&itr->second); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadCreatureTemplateAddons() @@ -505,7 +505,7 @@ void ObjectMgr::LoadCreatureTemplateAddons() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty."); - + return; } @@ -564,7 +564,7 @@ void ObjectMgr::LoadCreatureTemplateAddons() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) @@ -882,7 +882,7 @@ void ObjectMgr::LoadCreatureAddons() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty."); - + return; } @@ -948,7 +948,7 @@ void ObjectMgr::LoadCreatureAddons() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid) @@ -987,7 +987,7 @@ void ObjectMgr::LoadEquipmentTemplates() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!"); - + return; } @@ -1040,7 +1040,7 @@ void ObjectMgr::LoadEquipmentTemplates() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId) @@ -1118,7 +1118,7 @@ void ObjectMgr::LoadCreatureModelInfo() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty."); - + return; } @@ -1163,7 +1163,7 @@ void ObjectMgr::LoadCreatureModelInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadLinkedRespawn() @@ -1177,7 +1177,7 @@ void ObjectMgr::LoadLinkedRespawn() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty."); - + return; } @@ -1349,7 +1349,7 @@ void ObjectMgr::LoadLinkedRespawn() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime)); - + } bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow) @@ -1409,7 +1409,7 @@ void ObjectMgr::LoadCreatures() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creatures. DB table `creature` is empty."); - + return; } @@ -1536,7 +1536,7 @@ void ObjectMgr::LoadCreatures() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data) @@ -1719,7 +1719,7 @@ void ObjectMgr::LoadGameobjects() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobjects. DB table `gameobject` is empty."); - + return; } @@ -1841,7 +1841,7 @@ void ObjectMgr::LoadGameobjects() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data) @@ -2010,7 +2010,7 @@ void ObjectMgr::LoadItemLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadItemTemplates() @@ -2053,7 +2053,7 @@ void ObjectMgr::LoadItemTemplates() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 item templates. DB table `item_template` is empty."); - + return; } @@ -2615,7 +2615,7 @@ void ObjectMgr::LoadItemTemplates() sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry) @@ -2651,7 +2651,7 @@ void ObjectMgr::LoadItemSetNameLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadItemSetNames() @@ -2680,7 +2680,7 @@ void ObjectMgr::LoadItemSetNames() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 item set names. DB table `item_set_names` is empty."); - + return; } @@ -2735,7 +2735,7 @@ void ObjectMgr::LoadItemSetNames() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadVehicleTemplateAccessories() @@ -2752,7 +2752,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty."); - + return; } @@ -2792,7 +2792,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadVehicleAccessories() @@ -2809,7 +2809,7 @@ void ObjectMgr::LoadVehicleAccessories() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + return; } @@ -2837,7 +2837,7 @@ void ObjectMgr::LoadVehicleAccessories() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadPetLevelInfo() @@ -2850,7 +2850,7 @@ void ObjectMgr::LoadPetLevelInfo() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty."); - + return; } @@ -2930,7 +2930,7 @@ void ObjectMgr::LoadPetLevelInfo() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) const @@ -2996,7 +2996,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { - + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty."); exit(1); } @@ -3072,7 +3072,7 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -3086,7 +3086,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty."); - + } else { @@ -3144,7 +3144,7 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -3159,7 +3159,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 player create spells. DB table `%s` is empty.", sWorld->getBoolConfig(CONFIG_START_ALL_SPELLS) ? "playercreateinfo_spell_custom" : "playercreateinfo_spell"); - + } else { @@ -3201,7 +3201,7 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -3216,7 +3216,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty."); - + } else { @@ -3248,7 +3248,7 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -3263,7 +3263,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty."); - + exit(1); } @@ -3330,7 +3330,7 @@ void ObjectMgr::LoadPlayerInfo() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } // Loading levels data (class/race dependent) @@ -3344,7 +3344,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty."); - + exit(1); } @@ -3444,7 +3444,7 @@ void ObjectMgr::LoadPlayerInfo() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } // Loading xp per level data @@ -3462,7 +3462,7 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty."); - + exit(1); } @@ -3503,7 +3503,7 @@ void ObjectMgr::LoadPlayerInfo() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -3661,7 +3661,7 @@ void ObjectMgr::LoadQuests() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quests definitions. DB table `quest_template` is empty."); - + return; } @@ -4290,7 +4290,7 @@ void ObjectMgr::LoadQuests() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadQuestLocales() @@ -4339,7 +4339,7 @@ void ObjectMgr::LoadQuestLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadScripts(ScriptsType type) @@ -4368,7 +4368,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str()); - + return; } @@ -4660,7 +4660,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadGameObjectScripts() @@ -4805,7 +4805,7 @@ void ObjectMgr::LoadSpellScriptNames() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!"); - + return; } @@ -4853,7 +4853,7 @@ void ObjectMgr::LoadSpellScriptNames() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::ValidateSpellScripts() @@ -4863,7 +4863,7 @@ void ObjectMgr::ValidateSpellScripts() if (_spellScriptsStore.empty()) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Validated 0 scripts."); - + return; } @@ -4911,7 +4911,7 @@ void ObjectMgr::ValidateSpellScripts() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadPageTexts() @@ -4924,7 +4924,7 @@ void ObjectMgr::LoadPageTexts() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 page texts. DB table `page_text` is empty!"); - + return; } @@ -4954,7 +4954,7 @@ void ObjectMgr::LoadPageTexts() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } PageText const* ObjectMgr::GetPageText(uint32 pageEntry) @@ -4990,7 +4990,7 @@ void ObjectMgr::LoadPageTextLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadInstanceTemplate() @@ -5003,7 +5003,7 @@ void ObjectMgr::LoadInstanceTemplate() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 instance templates. DB table `page_text` is empty!"); - + return; } @@ -5033,7 +5033,7 @@ void ObjectMgr::LoadInstanceTemplate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID) @@ -5054,7 +5054,7 @@ void ObjectMgr::LoadInstanceEncounters() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 instance encounters, table is empty!"); - + return; } @@ -5123,7 +5123,7 @@ void ObjectMgr::LoadInstanceEncounters() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const @@ -5144,7 +5144,7 @@ void ObjectMgr::LoadGossipText() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u npc texts", count); - + return; } _gossipTextStore.rehash(result->GetRowCount()); @@ -5184,7 +5184,7 @@ void ObjectMgr::LoadGossipText() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadNpcTextLocales() @@ -5227,7 +5227,7 @@ void ObjectMgr::LoadNpcTextLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } //not very fast function but it is called only once a day, or on starting-up @@ -5253,7 +5253,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> No expired mails found."); - + return; // any mails need to be returned or deleted } @@ -5357,7 +5357,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadQuestAreaTriggers() @@ -5371,7 +5371,7 @@ void ObjectMgr::LoadQuestAreaTriggers() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty."); - + return; } @@ -5416,7 +5416,7 @@ void ObjectMgr::LoadQuestAreaTriggers() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadTavernAreaTriggers() @@ -5430,7 +5430,7 @@ void ObjectMgr::LoadTavernAreaTriggers() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty."); - + return; } @@ -5455,7 +5455,7 @@ void ObjectMgr::LoadTavernAreaTriggers() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadAreaTriggerScripts() @@ -5468,7 +5468,7 @@ void ObjectMgr::LoadAreaTriggerScripts() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty."); - + return; } @@ -5493,7 +5493,7 @@ void ObjectMgr::LoadAreaTriggerScripts() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team) @@ -5612,7 +5612,7 @@ void ObjectMgr::LoadGraveyardZones() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty."); - + return; } @@ -5659,7 +5659,7 @@ void ObjectMgr::LoadGraveyardZones() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveYard(uint32 team) @@ -5905,7 +5905,7 @@ void ObjectMgr::LoadAreaTriggerTeleports() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty."); - + return; } @@ -5952,7 +5952,7 @@ void ObjectMgr::LoadAreaTriggerTeleports() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadAccessRequirements() @@ -5966,7 +5966,7 @@ void ObjectMgr::LoadAccessRequirements() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 access requirement definitions. DB table `access_requirement` is empty."); - + return; } @@ -6044,7 +6044,7 @@ void ObjectMgr::LoadAccessRequirements() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } /* @@ -6269,7 +6269,7 @@ void ObjectMgr::LoadGameObjectLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - + } inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N) @@ -6346,7 +6346,7 @@ void ObjectMgr::LoadGameObjectTemplate() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty."); - + return; } @@ -6516,7 +6516,7 @@ void ObjectMgr::LoadGameObjectTemplate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadExplorationBaseXP() @@ -6528,7 +6528,7 @@ void ObjectMgr::LoadExplorationBaseXP() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty."); - + return; } @@ -6545,7 +6545,7 @@ void ObjectMgr::LoadExplorationBaseXP() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } uint32 ObjectMgr::GetBaseXP(uint8 level) @@ -6569,7 +6569,7 @@ void ObjectMgr::LoadPetNames() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!"); - + return; } @@ -6590,7 +6590,7 @@ void ObjectMgr::LoadPetNames() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadPetNumber() @@ -6605,7 +6605,7 @@ void ObjectMgr::LoadPetNumber() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime)); - + } std::string ObjectMgr::GeneratePetName(uint32 entry) @@ -6639,7 +6639,7 @@ void ObjectMgr::LoadCorpses() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 corpses. DB table `corpse` is empty."); - + return; } @@ -6668,7 +6668,7 @@ void ObjectMgr::LoadCorpses() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u corpses in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadReputationRewardRate() @@ -6683,7 +6683,7 @@ void ObjectMgr::LoadReputationRewardRate() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded `reputation_reward_rate`, table is empty!"); - + return; } @@ -6731,7 +6731,7 @@ void ObjectMgr::LoadReputationRewardRate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadReputationOnKill() @@ -6752,7 +6752,7 @@ void ObjectMgr::LoadReputationOnKill() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty."); - + return; } @@ -6805,7 +6805,7 @@ void ObjectMgr::LoadReputationOnKill() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadReputationSpilloverTemplate() @@ -6820,7 +6820,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded `reputation_spillover_template`, table is empty."); - + return; } @@ -6917,7 +6917,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadPointsOfInterest() @@ -6934,7 +6934,7 @@ void ObjectMgr::LoadPointsOfInterest() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty."); - + return; } @@ -6964,7 +6964,7 @@ void ObjectMgr::LoadPointsOfInterest() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadQuestPOI() @@ -6981,7 +6981,7 @@ void ObjectMgr::LoadQuestPOI() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty."); - + return; } @@ -7036,7 +7036,7 @@ void ObjectMgr::LoadQuestPOI() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadNPCSpellClickSpells() @@ -7050,7 +7050,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty."); - + return; } @@ -7104,7 +7104,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::DeleteCreatureData(uint32 guid) @@ -7154,7 +7154,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 quest relations from `%s`, table is empty.", table.c_str()); - + return; } @@ -7183,7 +7183,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadGameobjectQuestRelations() @@ -7253,7 +7253,7 @@ void ObjectMgr::LoadReservedPlayersNames() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!"); - + return; } @@ -7280,7 +7280,7 @@ void ObjectMgr::LoadReservedPlayersNames() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } bool ObjectMgr::IsReservedName(const std::string& name) const @@ -7434,7 +7434,7 @@ void ObjectMgr::LoadGameObjectForQuests() if (sObjectMgr->GetGameObjectTemplates()->empty()) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 GameObjects for quests"); - + return; } @@ -7483,7 +7483,7 @@ void ObjectMgr::LoadGameObjectForQuests() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max_value) @@ -7532,7 +7532,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.", table); else sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 string templates. DB table `%s` is empty.", table); - + return false; } @@ -7575,7 +7575,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max else sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u string templates from %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); - + return true; } @@ -7607,7 +7607,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty."); - + return; } @@ -7632,7 +7632,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& names) @@ -7716,7 +7716,7 @@ void ObjectMgr::LoadGameTele() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!"); - + return; } @@ -7758,7 +7758,7 @@ void ObjectMgr::LoadGameTele() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } GameTele const* ObjectMgr::GetGameTele(const std::string& name) const @@ -7857,7 +7857,7 @@ void ObjectMgr::LoadMailLevelRewards() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty."); - + return; } @@ -7903,7 +7903,7 @@ void ObjectMgr::LoadMailLevelRewards() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, uint32 reqSkill, uint32 reqSkillValue, uint32 reqLevel) @@ -8000,7 +8000,7 @@ void ObjectMgr::LoadTrainerSpell() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!"); - + return; } @@ -8024,7 +8024,7 @@ void ObjectMgr::LoadTrainerSpell() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set *skip_vendors) @@ -8080,7 +8080,7 @@ void ObjectMgr::LoadVendors() QueryResult result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor ORDER BY entry, slot ASC"); if (!result) { - + sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!"); return; } @@ -8115,7 +8115,7 @@ void ObjectMgr::LoadVendors() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadGossipMenu() @@ -8129,7 +8129,7 @@ void ObjectMgr::LoadGossipMenu() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!"); - + return; } @@ -8157,7 +8157,7 @@ void ObjectMgr::LoadGossipMenu() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u gossip_menu entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadGossipMenuItems() @@ -8176,7 +8176,7 @@ void ObjectMgr::LoadGossipMenuItems() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gossip_menu_option entries. DB table `gossip_menu_option` is empty!"); - + return; } @@ -8221,7 +8221,7 @@ void ObjectMgr::LoadGossipMenuItems() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u gossip_menu_option entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/) @@ -8384,7 +8384,7 @@ void ObjectMgr::LoadScriptNames() if (!result) { - + sLog->outError(LOG_FILTER_SQL, ">> Loaded empty set of Script Names!"); return; } @@ -8400,7 +8400,7 @@ void ObjectMgr::LoadScriptNames() std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } uint32 ObjectMgr::GetScriptId(const char *name) @@ -8504,7 +8504,7 @@ void ObjectMgr::LoadCreatureClassLevelStats() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty."); - + return; } @@ -8553,7 +8553,7 @@ void ObjectMgr::LoadCreatureClassLevelStats() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadFactionChangeAchievements() @@ -8565,7 +8565,7 @@ void ObjectMgr::LoadFactionChangeAchievements() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty."); - + return; } @@ -8590,7 +8590,7 @@ void ObjectMgr::LoadFactionChangeAchievements() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadFactionChangeItems() @@ -8602,7 +8602,7 @@ void ObjectMgr::LoadFactionChangeItems() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty."); - + return; } @@ -8627,7 +8627,7 @@ void ObjectMgr::LoadFactionChangeItems() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadFactionChangeSpells() @@ -8639,7 +8639,7 @@ void ObjectMgr::LoadFactionChangeSpells() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty."); - + return; } @@ -8664,7 +8664,7 @@ void ObjectMgr::LoadFactionChangeSpells() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void ObjectMgr::LoadFactionChangeReputations() @@ -8676,7 +8676,7 @@ void ObjectMgr::LoadFactionChangeReputations() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty."); - + return; } @@ -8701,7 +8701,7 @@ void ObjectMgr::LoadFactionChangeReputations() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry) diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index acec13ab2c3..3a758f6df30 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -126,7 +126,7 @@ void GroupMgr::LoadGroups() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 group definitions. DB table `groups` is empty!"); - + return; } @@ -152,7 +152,7 @@ void GroupMgr::LoadGroups() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } sLog->outInfo(LOG_FILTER_GENERAL, "Loading Group members..."); @@ -170,7 +170,7 @@ void GroupMgr::LoadGroups() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 group members. DB table `group_member` is empty!"); - + return; } @@ -191,7 +191,7 @@ void GroupMgr::LoadGroups() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } sLog->outInfo(LOG_FILTER_GENERAL, "Loading Group instance saves..."); @@ -204,7 +204,7 @@ void GroupMgr::LoadGroups() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 group-instance saves. DB table `group_instance` is empty!"); - + return; } @@ -236,6 +236,6 @@ void GroupMgr::LoadGroups() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 35a217200ad..dab67c59d2a 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -106,7 +106,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild definitions. DB table `guild` is empty."); - + return; } else @@ -129,7 +129,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -147,7 +147,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild ranks. DB table `guild_rank` is empty."); - + } else { @@ -165,7 +165,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -190,7 +190,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild members. DB table `guild_member` is empty."); - + } else { @@ -209,7 +209,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -227,7 +227,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty."); - + } else { @@ -245,7 +245,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -262,7 +262,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty."); - + } else { @@ -280,7 +280,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -298,7 +298,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty."); - + } else { @@ -316,7 +316,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -334,7 +334,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty."); - + } else { @@ -352,7 +352,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -372,7 +372,7 @@ void GuildMgr::LoadGuilds() if (!result) { sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty."); - + } else { @@ -390,7 +390,7 @@ void GuildMgr::LoadGuilds() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } } @@ -413,6 +413,6 @@ void GuildMgr::LoadGuilds() } sLog->outInfo(LOG_FILTER_GUILD, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } } diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 6e76f37c9d6..4ca7f97c02b 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -276,7 +276,7 @@ void InstanceSaveManager::LoadInstances() sInstanceSaveMgr->LoadResetTimes(); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } void InstanceSaveManager::LoadResetTimes() diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index ddacf64507f..6f49a555950 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1481,7 +1481,7 @@ void LoadLootTemplates_Creature() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty"); - + } void LoadLootTemplates_Disenchant() @@ -1515,7 +1515,7 @@ void LoadLootTemplates_Disenchant() sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty"); - + } void LoadLootTemplates_Fishing() @@ -1541,7 +1541,7 @@ void LoadLootTemplates_Fishing() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty"); - + } void LoadLootTemplates_Gameobject() @@ -1577,7 +1577,7 @@ void LoadLootTemplates_Gameobject() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty"); - + } void LoadLootTemplates_Item() @@ -1603,7 +1603,7 @@ void LoadLootTemplates_Item() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty"); - + } void LoadLootTemplates_Milling() @@ -1634,7 +1634,7 @@ void LoadLootTemplates_Milling() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty"); - + } void LoadLootTemplates_Pickpocketing() @@ -1670,7 +1670,7 @@ void LoadLootTemplates_Pickpocketing() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty"); - + } void LoadLootTemplates_Prospecting() @@ -1701,7 +1701,7 @@ void LoadLootTemplates_Prospecting() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty"); - + } void LoadLootTemplates_Mail() @@ -1727,7 +1727,7 @@ void LoadLootTemplates_Mail() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty"); - + } void LoadLootTemplates_Skinning() @@ -1763,7 +1763,7 @@ void LoadLootTemplates_Skinning() else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty"); - + } void LoadLootTemplates_Spell() @@ -1806,7 +1806,7 @@ void LoadLootTemplates_Spell() sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty"); - + } void LoadLootTemplates_Reference() @@ -1835,5 +1835,5 @@ void LoadLootTemplates_Reference() LootTemplates_Reference.ReportUnusedIds(lootIdSet); sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index a23c84b0134..214fd23fc8a 100755 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -49,7 +49,7 @@ void WaypointMgr::Load() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!"); - + return; } @@ -87,7 +87,7 @@ void WaypointMgr::Load() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void WaypointMgr::ReloadPath(uint32 id) diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index 3da3efe4823..5ada88cdf7a 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -47,7 +47,7 @@ void OutdoorPvPMgr::InitOutdoorPvP() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty."); - + return; } @@ -107,7 +107,7 @@ void OutdoorPvPMgr::InitOutdoorPvP() } sLog->outInfo(LOG_FILTER_OUTDOORPVP, ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle) diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 0ce3878db96..f5adf67a9ab 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -257,7 +257,7 @@ void ScriptMgr::Initialize() AddScripts(); sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); - + } void ScriptMgr::Unload() diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 6337a358866..f24b01306c5 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -30,14 +30,14 @@ void SystemMgr::LoadScriptTexts() sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Texts additional data..."); uint32 oldMSTime = getMSTime(); - + // 0 1 2 3 QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM script_texts"); if (!result) { sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); - + return; } @@ -84,7 +84,7 @@ void SystemMgr::LoadScriptTexts() while (result->NextRow()); sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime)); - + } void SystemMgr::LoadScriptTextsCustom() @@ -99,7 +99,7 @@ void SystemMgr::LoadScriptTextsCustom() if (!result) { sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); - + return; } @@ -146,7 +146,7 @@ void SystemMgr::LoadScriptTextsCustom() while (result->NextRow()); sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u additional Custom Texts data.", uiCount); - + } void SystemMgr::LoadScriptWaypoints() @@ -171,7 +171,7 @@ void SystemMgr::LoadScriptWaypoints() if (!result) { sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); - + return; } @@ -207,5 +207,5 @@ void SystemMgr::LoadScriptWaypoints() while (result->NextRow()); sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index 96a3538c759..d9cfbe6b69c 100755 --- a/src/server/game/Skills/SkillDiscovery.cpp +++ b/src/server/game/Skills/SkillDiscovery.cpp @@ -56,7 +56,7 @@ void LoadSkillDiscoveryTable() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty."); - + return; } @@ -154,7 +154,7 @@ void LoadSkillDiscoveryTable() } sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player) diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp index 869f5476719..9cb4c145b3d 100755 --- a/src/server/game/Skills/SkillExtraItems.cpp +++ b/src/server/game/Skills/SkillExtraItems.cpp @@ -61,7 +61,7 @@ void LoadSkillExtraItemTable() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty."); - + return; } @@ -111,7 +111,7 @@ void LoadSkillExtraItemTable() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } bool canCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 2b0e71b4dd8..3cc3a877337 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1156,7 +1156,7 @@ void SpellMgr::LoadSpellRanks() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); - + return; } @@ -1252,7 +1252,7 @@ void SpellMgr::LoadSpellRanks() } while (!finished); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellRequired() @@ -1268,7 +1268,7 @@ void SpellMgr::LoadSpellRequired() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell required records. DB table `spell_required` is empty."); - + return; } @@ -1313,7 +1313,7 @@ void SpellMgr::LoadSpellRequired() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellLearnSkills() @@ -1351,7 +1351,7 @@ void SpellMgr::LoadSpellLearnSkills() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellLearnSpells() @@ -1365,7 +1365,7 @@ void SpellMgr::LoadSpellLearnSpells() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); - + return; } @@ -1454,7 +1454,7 @@ void SpellMgr::LoadSpellLearnSpells() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellTargetPositions() @@ -1468,7 +1468,7 @@ void SpellMgr::LoadSpellTargetPositions() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); - + return; } @@ -1574,7 +1574,7 @@ void SpellMgr::LoadSpellTargetPositions() }*/ sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellGroups() @@ -1589,7 +1589,7 @@ void SpellMgr::LoadSpellGroups() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); - + return; } @@ -1656,7 +1656,7 @@ void SpellMgr::LoadSpellGroups() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellGroupStackRules() @@ -1670,7 +1670,7 @@ void SpellMgr::LoadSpellGroupStackRules() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); - + return; } @@ -1701,7 +1701,7 @@ void SpellMgr::LoadSpellGroupStackRules() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellProcEvents() @@ -1715,7 +1715,7 @@ void SpellMgr::LoadSpellProcEvents() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); - + return; } @@ -1765,7 +1765,7 @@ void SpellMgr::LoadSpellProcEvents() sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); else sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellProcs() @@ -1779,7 +1779,7 @@ void SpellMgr::LoadSpellProcs() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); - + return; } @@ -1906,7 +1906,7 @@ void SpellMgr::LoadSpellProcs() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellBonusess() @@ -1920,7 +1920,7 @@ void SpellMgr::LoadSpellBonusess() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); - + return; } @@ -1947,7 +1947,7 @@ void SpellMgr::LoadSpellBonusess() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellThreats() @@ -1961,7 +1961,7 @@ void SpellMgr::LoadSpellThreats() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); - + return; } @@ -1988,7 +1988,7 @@ void SpellMgr::LoadSpellThreats() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSkillLineAbilityMap() @@ -2010,7 +2010,7 @@ void SpellMgr::LoadSkillLineAbilityMap() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellPetAuras() @@ -2024,7 +2024,7 @@ void SpellMgr::LoadSpellPetAuras() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); - + return; } @@ -2072,7 +2072,7 @@ void SpellMgr::LoadSpellPetAuras() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } // Fill custom data about enchancments @@ -2113,7 +2113,7 @@ void SpellMgr::LoadEnchantCustomAttr() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellEnchantProcData() @@ -2127,7 +2127,7 @@ void SpellMgr::LoadSpellEnchantProcData() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); - + return; } @@ -2157,7 +2157,7 @@ void SpellMgr::LoadSpellEnchantProcData() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellLinked() @@ -2171,7 +2171,7 @@ void SpellMgr::LoadSpellLinked() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); - + return; } @@ -2210,7 +2210,7 @@ void SpellMgr::LoadSpellLinked() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadPetLevelupSpellMap() @@ -2267,7 +2267,7 @@ void SpellMgr::LoadPetLevelupSpellMap() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); - + } bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells) @@ -2352,7 +2352,7 @@ void SpellMgr::LoadPetDefaultSpells() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Loading summonable creature templates..."); oldMSTime = getMSTime(); @@ -2396,7 +2396,7 @@ void SpellMgr::LoadPetDefaultSpells() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellAreas() @@ -2415,7 +2415,7 @@ void SpellMgr::LoadSpellAreas() if (!result) { sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); - + return; } @@ -2596,7 +2596,7 @@ void SpellMgr::LoadSpellAreas() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadSpellInfoStore() @@ -2613,7 +2613,7 @@ void SpellMgr::LoadSpellInfoStore() } sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::UnloadSpellInfoStore() @@ -2926,7 +2926,7 @@ void SpellMgr::LoadSpellCustomAttr() CreatureAI::FillAISpellInfo(); sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } void SpellMgr::LoadDbcDataCorrections() @@ -3570,5 +3570,5 @@ void SpellMgr::LoadDbcDataCorrections() properties->Type = SUMMON_TYPE_TOTEM; sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 32d361faa9a..f64043b7038 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -78,7 +78,7 @@ void CreatureTextMgr::LoadCreatureTexts() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 ceature texts. DB table `creature_texts` is empty."); - + return; } @@ -137,7 +137,7 @@ void CreatureTextMgr::LoadCreatureTexts() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime)); - + } void CreatureTextMgr::LoadCreatureTextLocales() @@ -167,7 +167,7 @@ void CreatureTextMgr::LoadCreatureTextLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime)); - + } uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid /*= 0*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, TextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= NULL*/) diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index aedb27a040f..d03ffbbb1f6 100755 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -264,7 +264,7 @@ void TicketMgr::LoadTickets() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!"); - + return; } @@ -291,7 +291,7 @@ void TicketMgr::LoadTickets() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void TicketMgr::LoadSurveys() @@ -304,7 +304,7 @@ void TicketMgr::LoadSurveys() _lastSurveyId = (*result)[0].GetUInt32(); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } void TicketMgr::AddTicket(GmTicket* ticket) diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 0619491f364..2bd9a157e73 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -64,7 +64,7 @@ void CharacterDatabaseCleaner::CleanDatabase() sWorld->SetCleaningFlags(flags); sLog->outInfo(LOG_FILTER_GENERAL, ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + } void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32)) diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp index 177f373c978..f6daba76c1a 100644 --- a/src/server/game/Warden/WardenCheckMgr.cpp +++ b/src/server/game/Warden/WardenCheckMgr.cpp @@ -44,7 +44,7 @@ void WardenCheckMgr::LoadWardenChecks() if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED)) { sLog->outInfo(LOG_FILTER_WARDEN, ">> Warden disabled, loading checks skipped."); - + return; } @@ -53,7 +53,7 @@ void WardenCheckMgr::LoadWardenChecks() if (!result) { sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!"); - + return; } @@ -146,7 +146,7 @@ void WardenCheckMgr::LoadWardenChecks() while (result->NextRow()); sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded %u warden checks.", count); - + } void WardenCheckMgr::LoadWardenOverrides() @@ -155,7 +155,7 @@ void WardenCheckMgr::LoadWardenOverrides() if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED)) { sLog->outInfo(LOG_FILTER_WARDEN, ">> Warden disabled, loading check overrides skipped."); - + return; } @@ -165,7 +165,7 @@ void WardenCheckMgr::LoadWardenOverrides() if (!result) { sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!"); - + return; } @@ -195,7 +195,7 @@ void WardenCheckMgr::LoadWardenOverrides() while (result->NextRow()); sLog->outInfo(LOG_FILTER_WARDEN, ">> Loaded %u warden action overrides.", count); - + } WardenCheck* WardenCheckMgr::GetWardenDataById(uint16 Id) diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index 150e9f845ec..0e7f1c87b26 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -94,7 +94,7 @@ void LoadWeatherData() if (!result) { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 weather definitions. DB table `game_weather` is empty."); - + return; } @@ -138,7 +138,7 @@ void LoadWeatherData() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } void SendFineWeatherUpdateToPlayer(Player* player) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 717cfd67ac6..3a13f48d807 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1246,7 +1246,7 @@ void World::SetInitialWorldSettings() sGameEventMgr->Initialize(); ///- Loading strings. Getting no records means core load has to be canceled because no error message can be output. - + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Trinity strings..."); if (!sObjectMgr->LoadTrinityStrings()) exit(1); // Error message displayed in function already @@ -1314,7 +1314,7 @@ void World::SetInitialWorldSettings() sObjectMgr->SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts) sLog->outInfo(LOG_FILTER_GENERAL, ">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_GENERAL, "Loading Page Texts..."); sObjectMgr->LoadPageTexts(); @@ -1794,7 +1794,7 @@ void World::DetectDBCLang() m_defaultDbcLocale = LocaleConstant(default_locale); sLog->outInfo(LOG_FILTER_GENERAL, "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "" : availableLocalsStr.c_str()); - + } void World::RecordTimeDiff(const char *text, ...) @@ -1834,7 +1834,7 @@ void World::LoadAutobroadcasts() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty!"); - + return; } @@ -1852,7 +1852,7 @@ void World::LoadAutobroadcasts() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u autobroadcasts definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } /// Update the World ! @@ -2835,7 +2835,7 @@ void World::LoadWorldStates() if (!result) { sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 world states. DB table `worldstates` is empty!"); - + return; } @@ -2850,7 +2850,7 @@ void World::LoadWorldStates() while (result->NextRow()); sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + } // Setting a worldstate will save it to DB diff --git a/src/server/shared/AutoPtr.h b/src/server/shared/AutoPtr.h index 988c46cc5a2..19f0680c267 100644 --- a/src/server/shared/AutoPtr.h +++ b/src/server/shared/AutoPtr.h @@ -27,7 +27,7 @@ namespace Trinity { public: AutoPtr() : ACE_Strong_Bound_Ptr() {} - + AutoPtr(Pointer* x) { ACE_Strong_Bound_Ptr::reset(x); diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 324efab067e..7332cb3ec01 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -175,7 +175,7 @@ bool MySQLConnection::Execute(const char* sql) return false; } - else + else sLog->outDebug(LOG_FILTER_SQL, "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql); } diff --git a/src/server/shared/Logging/Appender.h b/src/server/shared/Logging/Appender.h index 992554d59aa..c32f51e5a88 100644 --- a/src/server/shared/Logging/Appender.h +++ b/src/server/shared/Logging/Appender.h @@ -2,7 +2,7 @@ #define APPENDER_H #include "Define.h" - +#include #include #include diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 6912e841bc3..045c5fd91c8 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -480,12 +480,12 @@ class ByteBuffer { if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled debug output return; - + uint32 j = 1, k = 1; - + std::ostringstream o; o << "STORAGE_SIZE: " << size(); - + for (uint32 i = 0; i < size(); ++i) { char buf[3]; @@ -501,7 +501,7 @@ class ByteBuffer ++k; ++j; } - + o << buf; } o << " "; -- cgit v1.2.3 From a566e3e58bc54635c0caa019f6fdbe6f7adf8ceb Mon Sep 17 00:00:00 2001 From: Spp Date: Thu, 16 Aug 2012 11:02:46 +0200 Subject: Core/Logging: Move more log messages to LOG_FILTER_SERVER_LOADING --- src/server/authserver/authserver.conf.dist | 28 ++--- src/server/game/Achievements/AchievementMgr.cpp | 36 +++---- src/server/game/Battlegrounds/ArenaTeamMgr.cpp | 6 +- src/server/game/Battlegrounds/BattlegroundMgr.cpp | 12 +-- .../game/Battlegrounds/Zones/BattlegroundWS.cpp | 54 ++++++---- src/server/game/DungeonFinding/LFGMgr.cpp | 6 +- .../game/Entities/Creature/CreatureGroups.cpp | 6 +- .../game/Entities/Item/ItemEnchantmentMgr.cpp | 6 +- src/server/game/Entities/Transport/Transport.cpp | 14 +-- src/server/game/Events/GameEventMgr.cpp | 115 ++++++++------------ src/server/game/Globals/ObjectMgr.cpp | 117 ++------------------- src/server/game/Globals/ObjectMgr.h | 8 +- src/server/game/Groups/GroupMgr.cpp | 10 +- src/server/game/Guilds/GuildMgr.cpp | 65 +++++------- src/server/game/Loot/LootMgr.cpp | 69 +++++------- src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp | 6 +- src/server/game/Pools/PoolMgr.cpp | 32 +++--- src/server/game/Scripting/ScriptMgr.cpp | 5 +- src/server/game/Scripting/ScriptMgr.h | 2 +- src/server/game/Scripting/ScriptSystem.cpp | 28 ++--- src/server/game/Spells/SpellMgr.cpp | 109 +++++++------------ src/server/shared/Logging/Log.cpp | 6 -- src/server/worldserver/worldserver.conf.dist | 9 +- 23 files changed, 258 insertions(+), 491 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist index 15dd02d9052..9a4beca9bf6 100644 --- a/src/server/authserver/authserver.conf.dist +++ b/src/server/authserver/authserver.conf.dist @@ -198,7 +198,7 @@ LoginDatabase.WorkerThreads = 1 # Example: "13 11 9 5 3 1" # # File: Name of the file (read as optional1 if Type = File) -# Allows to use one "%u" to create dynamic files +# Allows to use one "%s" to create dynamic files # # Mode: Mode to open the file (read as optional2 if Type = File) # a - (Append) @@ -208,19 +208,6 @@ LoginDatabase.WorkerThreads = 1 Appender.Console=1,2,6 Appender.Auth=2,2,7,Auth.log,w -# Logger config values: Given a logger "name" -# Logger.name -# Description: Defines 'What to log' -# Format: Type,LogLevel,AppenderList -# Type -# 0 - Default. Each type that has no config will -# rely on this one. Core will create this logger -# (disabled) if it's not configured -# 7 - Network input/output, -# 30 - Authserver - -Logger.Root=0,3,Console Auth - # LogLevel # 0 - (Disabled) # 1 - (Trace) @@ -240,6 +227,19 @@ Logger.Root=0,3,Console Auth Appenders=Console Auth +# Logger config values: Given a logger "name" +# Logger.name +# Description: Defines 'What to log' +# Format: Type,LogLevel,AppenderList +# Type +# 0 - Default. Each type that has no config will +# rely on this one. Core will create this logger +# (disabled) if it's not configured +# 7 - Network input/output, +# 30 - Authserver + +Logger.Root=0,3,Console Auth + # # Loggers # Description: List of Loggers to read from config diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 191d91b61a7..c607132dfe1 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -2201,8 +2201,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() if (sAchievementCriteriaStore.GetNumRows() == 0) { - sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement criteria."); - + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement criteria."); return; } @@ -2219,8 +2218,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList() m_AchievementCriteriasByTimedType[criteria->timedType].push_back(criteria); } - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime)); } void AchievementGlobalMgr::LoadAchievementReferenceList() @@ -2229,8 +2227,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() if (sAchievementStore.GetNumRows() == 0) { - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement references."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement references."); return; } @@ -2250,8 +2247,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList() if (AchievementEntry const* achievement = sAchievementStore.LookupEntry(4539)) const_cast(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar) - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void AchievementGlobalMgr::LoadAchievementCriteriaData() @@ -2264,8 +2260,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() if (!result) { - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty."); return; } @@ -2396,8 +2391,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement); } - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void AchievementGlobalMgr::LoadCompletedAchievements() @@ -2408,8 +2402,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() if (!result) { - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty."); return; } @@ -2436,8 +2429,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() m_allCompletedAchievements.insert(achievementId); } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime)); } void AchievementGlobalMgr::LoadRewards() @@ -2451,8 +2443,7 @@ void AchievementGlobalMgr::LoadRewards() if (!result) { - sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty."); - + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty."); return; } @@ -2543,8 +2534,7 @@ void AchievementGlobalMgr::LoadRewards() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void AchievementGlobalMgr::LoadRewardLocales() @@ -2559,8 +2549,7 @@ void AchievementGlobalMgr::LoadRewardLocales() if (!result) { - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty"); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty"); return; } @@ -2586,6 +2575,5 @@ void AchievementGlobalMgr::LoadRewardLocales() } } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime)); } diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index 665742c97b1..55de445345b 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -101,8 +101,7 @@ void ArenaTeamMgr::LoadArenaTeams() if (!result) { - sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 arena teams. DB table `arena_team` is empty!"); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 arena teams. DB table `arena_team` is empty!"); return; } @@ -132,8 +131,7 @@ void ArenaTeamMgr::LoadArenaTeams() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void ArenaTeamMgr::DistributeArenaPoints() diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 290da0bb31f..0b107983379 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -683,8 +683,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() if (!result) { - sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty."); - + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty."); return; } @@ -792,8 +791,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void BattlegroundMgr::InitAutomaticArenaPointDistribution() @@ -1077,8 +1075,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() if (!result) { - sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!"); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!"); return; } @@ -1102,8 +1099,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index 483e8ffdaf6..ededaf15bb5 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -700,28 +700,40 @@ void BattlegroundWS::Reset() //call parent's class reset Battleground::Reset(); - m_FlagKeepers[BG_TEAM_ALLIANCE] = 0; - m_FlagKeepers[BG_TEAM_HORDE] = 0; + m_FlagKeepers[BG_TEAM_ALLIANCE] = 0; + m_FlagKeepers[BG_TEAM_HORDE] = 0; + m_DroppedFlagGUID[BG_TEAM_ALLIANCE] = 0; - m_DroppedFlagGUID[BG_TEAM_HORDE] = 0; - _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE; - _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE; - m_TeamScores[BG_TEAM_ALLIANCE] = 0; - m_TeamScores[BG_TEAM_HORDE] = 0; - bool isBGWeekend = sBattlegroundMgr->IsBGWeekend(GetTypeID()); - m_ReputationCapture = (isBGWeekend) ? 45 : 35; - m_HonorWinKills = (isBGWeekend) ? 3 : 1; - m_HonorEndKills = (isBGWeekend) ? 4 : 2; - // For WorldState - _minutesElapsed = 0; - _lastFlagCaptureTeam = 0; - - /* Spirit nodes is static at this BG and then not required deleting at BG reset. - if (BgCreatures[WS_SPIRIT_MAIN_ALLIANCE]) - DelCreature(WS_SPIRIT_MAIN_ALLIANCE); - if (BgCreatures[WS_SPIRIT_MAIN_HORDE]) - DelCreature(WS_SPIRIT_MAIN_HORDE); - */ + m_DroppedFlagGUID[BG_TEAM_HORDE] = 0; + + _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE; + _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE; + + m_TeamScores[BG_TEAM_ALLIANCE] = 0; + m_TeamScores[BG_TEAM_HORDE] = 0; + + if (sBattlegroundMgr->IsBGWeekend(GetTypeID())) + { + m_ReputationCapture = 45; + m_HonorWinKills = 3; + m_HonorEndKills = 4; + } + else + { + m_ReputationCapture = 35; + m_HonorWinKills = 1; + m_HonorEndKills = 2; + } + _minutesElapsed = 0; + _lastFlagCaptureTeam = 0; + _bothFlagsKept = false; + _flagDebuffState = 0; + _flagSpellForceTimer = 0; + _lastFlagCaptureTeam = 0; + _flagsDropTimer[BG_TEAM_ALLIANCE] = 0; + _flagsDropTimer[BG_TEAM_HORDE] = 0; + _flagsTimer[BG_TEAM_ALLIANCE] = 0; + _flagsTimer[BG_TEAM_HORDE] = 0; } void BattlegroundWS::EndBattleground(uint32 winner) diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 3a2a044ca3b..a7dd677313e 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -135,8 +135,7 @@ void LFGMgr::LoadRewards() if (!result) { - sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!"); - + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!"); return; } @@ -183,8 +182,7 @@ void LFGMgr::LoadRewards() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_LFG, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void LFGMgr::Update(uint32 diff) diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 21ed1a23828..8823a788555 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -84,8 +84,7 @@ void FormationMgr::LoadCreatureFormations() if (!result) { - sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!"); - + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!"); return; } @@ -136,8 +135,7 @@ void FormationMgr::LoadCreatureFormations() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_UNITS, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void CreatureGroup::AddMember(Creature* member) diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 0478173b96e..f85bf80e145 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -70,14 +70,10 @@ void LoadRandomEnchantmentsTable() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_PLAYER_ITEMS, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } else - { sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty."); - - } } uint32 GetItemEnchantMod(int32 entry) diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 52d5c9114ff..88d3108dbe2 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -35,8 +35,7 @@ void MapManager::LoadTransports() if (!result) { - sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transports. DB table `transports` is empty!"); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transports. DB table `transports` is empty!"); return; } @@ -66,7 +65,7 @@ void MapManager::LoadTransports() continue; } - // sLog->outInfo(LOG_FILTER_TRANSPORTS, "Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name); + // sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name); std::set mapsUsed; @@ -121,8 +120,7 @@ void MapManager::LoadTransports() while (result->NextRow()); } - sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void MapManager::LoadTransportNPCs() @@ -134,8 +132,7 @@ void MapManager::LoadTransportNPCs() if (!result) { - sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!"); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!"); return; } @@ -166,8 +163,7 @@ void MapManager::LoadTransportNPCs() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } Transport::Transport(uint32 period, uint32 script) : GameObject(), m_pathTime(0), m_timer(0), diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index afbae063e5e..bead65bbfdd 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -260,11 +260,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Saves Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Saves Data..."); { uint32 oldMSTime = getMSTime(); @@ -273,7 +273,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty."); } else @@ -306,12 +306,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Prerequisite Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Prerequisite Data..."); { uint32 oldMSTime = getMSTime(); @@ -319,7 +319,7 @@ void GameEventMgr::LoadFromDB() QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite"); if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty."); } else @@ -357,12 +357,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Creature Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Creature Data..."); { uint32 oldMSTime = getMSTime(); @@ -372,7 +372,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty"); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty"); } else @@ -400,12 +400,12 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event GO Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event GO Data..."); { uint32 oldMSTime = getMSTime(); @@ -415,7 +415,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty."); } else @@ -443,12 +443,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Model/Equipment Change Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Model/Equipment Change Data..."); { uint32 oldMSTime = getMSTime(); @@ -458,8 +457,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty."); } else { @@ -500,12 +498,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Quest Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Quest Data..."); { uint32 oldMSTime = getMSTime(); @@ -514,8 +511,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty."); } else { @@ -541,12 +537,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event GO Quest Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event GO Quest Data..."); { uint32 oldMSTime = getMSTime(); @@ -555,8 +550,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty."); } else { @@ -582,12 +576,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Quest Condition Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Quest Condition Data..."); { uint32 oldMSTime = getMSTime(); @@ -596,8 +589,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty."); } else { @@ -625,12 +617,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Condition Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Condition Data..."); { uint32 oldMSTime = getMSTime(); @@ -639,8 +630,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty."); } else { @@ -667,12 +657,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Condition Save Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Condition Save Data..."); { uint32 oldMSTime = getMSTime(); @@ -681,8 +670,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty."); } else { @@ -715,12 +703,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event NPCflag Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event NPCflag Data..."); { uint32 oldMSTime = getMSTime(); @@ -729,8 +716,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty."); } else { @@ -755,12 +741,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Seasonal Quest Relations..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Seasonal Quest Relations..."); { uint32 oldMSTime = getMSTime(); @@ -769,8 +754,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty."); } else { @@ -799,12 +783,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Vendor Additions Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Vendor Additions Data..."); { uint32 oldMSTime = getMSTime(); @@ -813,8 +796,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty."); } else { @@ -865,12 +847,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Battleground Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Battleground Data..."); { uint32 oldMSTime = getMSTime(); @@ -879,8 +860,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty."); } else { @@ -903,12 +883,11 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Pool Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Game Event Pool Data..."); { uint32 oldMSTime = getMSTime(); @@ -918,8 +897,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty."); } else { @@ -952,8 +930,7 @@ void GameEventMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index efe944d541b..08a76008fde 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -297,7 +297,6 @@ void ObjectMgr::LoadCreatureLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadGossipMenuItemsLocales() @@ -334,7 +333,6 @@ void ObjectMgr::LoadGossipMenuItemsLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadPointOfInterestLocales() @@ -361,7 +359,6 @@ void ObjectMgr::LoadPointOfInterestLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadCreatureTemplates() @@ -389,7 +386,6 @@ void ObjectMgr::LoadCreatureTemplates() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature template definitions. DB table `creature_template` is empty."); - return; } @@ -492,7 +488,6 @@ void ObjectMgr::LoadCreatureTemplates() CheckCreatureTemplate(&itr->second); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadCreatureTemplateAddons() @@ -505,7 +500,6 @@ void ObjectMgr::LoadCreatureTemplateAddons() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty."); - return; } @@ -564,7 +558,6 @@ void ObjectMgr::LoadCreatureTemplateAddons() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) @@ -882,7 +875,6 @@ void ObjectMgr::LoadCreatureAddons() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty."); - return; } @@ -948,7 +940,6 @@ void ObjectMgr::LoadCreatureAddons() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid) @@ -987,7 +978,6 @@ void ObjectMgr::LoadEquipmentTemplates() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!"); - return; } @@ -1040,7 +1030,6 @@ void ObjectMgr::LoadEquipmentTemplates() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId) @@ -1118,7 +1107,6 @@ void ObjectMgr::LoadCreatureModelInfo() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty."); - return; } @@ -1163,7 +1151,6 @@ void ObjectMgr::LoadCreatureModelInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadLinkedRespawn() @@ -1349,7 +1336,6 @@ void ObjectMgr::LoadLinkedRespawn() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime)); - } bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow) @@ -1536,7 +1522,6 @@ void ObjectMgr::LoadCreatures() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data) @@ -1841,7 +1826,6 @@ void ObjectMgr::LoadGameobjects() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data) @@ -2010,7 +1994,6 @@ void ObjectMgr::LoadItemLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadItemTemplates() @@ -2053,7 +2036,6 @@ void ObjectMgr::LoadItemTemplates() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 item templates. DB table `item_template` is empty."); - return; } @@ -2615,7 +2597,6 @@ void ObjectMgr::LoadItemTemplates() sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry) @@ -2651,7 +2632,6 @@ void ObjectMgr::LoadItemSetNameLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadItemSetNames() @@ -2680,7 +2660,6 @@ void ObjectMgr::LoadItemSetNames() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 item set names. DB table `item_set_names` is empty."); - return; } @@ -2735,7 +2714,6 @@ void ObjectMgr::LoadItemSetNames() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadVehicleTemplateAccessories() @@ -2792,7 +2770,6 @@ void ObjectMgr::LoadVehicleTemplateAccessories() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadVehicleAccessories() @@ -2809,7 +2786,6 @@ void ObjectMgr::LoadVehicleAccessories() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime)); - return; } @@ -2837,7 +2813,6 @@ void ObjectMgr::LoadVehicleAccessories() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadPetLevelInfo() @@ -2930,7 +2905,6 @@ void ObjectMgr::LoadPetLevelInfo() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) const @@ -3072,12 +3046,11 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } // Load playercreate items - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Items Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Player Create Items Data..."); { uint32 oldMSTime = getMSTime(); // 0 1 2 3 @@ -3086,7 +3059,6 @@ void ObjectMgr::LoadPlayerInfo() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty."); - } else { @@ -3144,12 +3116,11 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } // Load playercreate spells - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Spell Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Player Create Spell Data..."); { uint32 oldMSTime = getMSTime(); @@ -3201,12 +3172,11 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } // Load playercreate actions - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Action Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Player Create Action Data..."); { uint32 oldMSTime = getMSTime(); @@ -3248,12 +3218,11 @@ void ObjectMgr::LoadPlayerInfo() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } // Loading levels data (class only dependent) - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Level HP/Mana Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Player Create Level HP/Mana Data..."); { uint32 oldMSTime = getMSTime(); @@ -3330,11 +3299,10 @@ void ObjectMgr::LoadPlayerInfo() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } // Loading levels data (class/race dependent) - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create Level Stats Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Player Create Level Stats Data..."); { uint32 oldMSTime = getMSTime(); @@ -3444,11 +3412,10 @@ void ObjectMgr::LoadPlayerInfo() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } // Loading xp per level data - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Player Create XP Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Player Create XP Data..."); { uint32 oldMSTime = getMSTime(); @@ -3503,7 +3470,6 @@ void ObjectMgr::LoadPlayerInfo() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } @@ -4290,7 +4256,6 @@ void ObjectMgr::LoadQuests() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadQuestLocales() @@ -4339,7 +4304,6 @@ void ObjectMgr::LoadQuestLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadScripts(ScriptsType type) @@ -4357,7 +4321,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) if (sScriptMgr->IsScriptScheduled()) // function cannot be called when scripts are in use. return; - sLog->outInfo(LOG_FILTER_GENERAL, "Loading %s...", tableName.c_str()); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading %s...", tableName.c_str()); scripts->clear(); // need for reload support @@ -4368,7 +4332,6 @@ void ObjectMgr::LoadScripts(ScriptsType type) if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str()); - return; } @@ -4660,7 +4623,6 @@ void ObjectMgr::LoadScripts(ScriptsType type) while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadGameObjectScripts() @@ -4805,7 +4767,6 @@ void ObjectMgr::LoadSpellScriptNames() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!"); - return; } @@ -4853,7 +4814,6 @@ void ObjectMgr::LoadSpellScriptNames() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::ValidateSpellScripts() @@ -4863,7 +4823,6 @@ void ObjectMgr::ValidateSpellScripts() if (_spellScriptsStore.empty()) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Validated 0 scripts."); - return; } @@ -4911,7 +4870,6 @@ void ObjectMgr::ValidateSpellScripts() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadPageTexts() @@ -4924,7 +4882,6 @@ void ObjectMgr::LoadPageTexts() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 page texts. DB table `page_text` is empty!"); - return; } @@ -4954,7 +4911,6 @@ void ObjectMgr::LoadPageTexts() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } PageText const* ObjectMgr::GetPageText(uint32 pageEntry) @@ -4990,7 +4946,6 @@ void ObjectMgr::LoadPageTextLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadInstanceTemplate() @@ -5003,7 +4958,6 @@ void ObjectMgr::LoadInstanceTemplate() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 instance templates. DB table `page_text` is empty!"); - return; } @@ -5033,7 +4987,6 @@ void ObjectMgr::LoadInstanceTemplate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID) @@ -5123,7 +5076,6 @@ void ObjectMgr::LoadInstanceEncounters() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const @@ -5144,7 +5096,6 @@ void ObjectMgr::LoadGossipText() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u npc texts", count); - return; } _gossipTextStore.rehash(result->GetRowCount()); @@ -5184,7 +5135,6 @@ void ObjectMgr::LoadGossipText() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadNpcTextLocales() @@ -5227,7 +5177,6 @@ void ObjectMgr::LoadNpcTextLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } //not very fast function but it is called only once a day, or on starting-up @@ -5253,7 +5202,6 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> No expired mails found."); - return; // any mails need to be returned or deleted } @@ -5357,7 +5305,6 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadQuestAreaTriggers() @@ -5371,7 +5318,6 @@ void ObjectMgr::LoadQuestAreaTriggers() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty."); - return; } @@ -5416,7 +5362,6 @@ void ObjectMgr::LoadQuestAreaTriggers() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadTavernAreaTriggers() @@ -5430,7 +5375,6 @@ void ObjectMgr::LoadTavernAreaTriggers() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty."); - return; } @@ -5455,7 +5399,6 @@ void ObjectMgr::LoadTavernAreaTriggers() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadAreaTriggerScripts() @@ -5468,7 +5411,6 @@ void ObjectMgr::LoadAreaTriggerScripts() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty."); - return; } @@ -5493,7 +5435,6 @@ void ObjectMgr::LoadAreaTriggerScripts() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team) @@ -5612,7 +5553,6 @@ void ObjectMgr::LoadGraveyardZones() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty."); - return; } @@ -5659,7 +5599,6 @@ void ObjectMgr::LoadGraveyardZones() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveYard(uint32 team) @@ -5905,7 +5844,6 @@ void ObjectMgr::LoadAreaTriggerTeleports() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty."); - return; } @@ -5952,7 +5890,6 @@ void ObjectMgr::LoadAreaTriggerTeleports() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadAccessRequirements() @@ -5966,7 +5903,6 @@ void ObjectMgr::LoadAccessRequirements() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 access requirement definitions. DB table `access_requirement` is empty."); - return; } @@ -6044,7 +5980,6 @@ void ObjectMgr::LoadAccessRequirements() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } /* @@ -6269,7 +6204,6 @@ void ObjectMgr::LoadGameObjectLocales() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime)); - } inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N) @@ -6346,7 +6280,6 @@ void ObjectMgr::LoadGameObjectTemplate() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty."); - return; } @@ -6516,7 +6449,6 @@ void ObjectMgr::LoadGameObjectTemplate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadExplorationBaseXP() @@ -6545,7 +6477,6 @@ void ObjectMgr::LoadExplorationBaseXP() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } uint32 ObjectMgr::GetBaseXP(uint8 level) @@ -6569,7 +6500,6 @@ void ObjectMgr::LoadPetNames() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!"); - return; } @@ -6590,7 +6520,6 @@ void ObjectMgr::LoadPetNames() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadPetNumber() @@ -6605,7 +6534,6 @@ void ObjectMgr::LoadPetNumber() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime)); - } std::string ObjectMgr::GeneratePetName(uint32 entry) @@ -6639,7 +6567,6 @@ void ObjectMgr::LoadCorpses() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 corpses. DB table `corpse` is empty."); - return; } @@ -6668,7 +6595,6 @@ void ObjectMgr::LoadCorpses() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u corpses in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadReputationRewardRate() @@ -6731,7 +6657,6 @@ void ObjectMgr::LoadReputationRewardRate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadReputationOnKill() @@ -6805,7 +6730,6 @@ void ObjectMgr::LoadReputationOnKill() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadReputationSpilloverTemplate() @@ -6820,7 +6744,6 @@ void ObjectMgr::LoadReputationSpilloverTemplate() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded `reputation_spillover_template`, table is empty."); - return; } @@ -6917,7 +6840,6 @@ void ObjectMgr::LoadReputationSpilloverTemplate() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadPointsOfInterest() @@ -6964,7 +6886,6 @@ void ObjectMgr::LoadPointsOfInterest() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadQuestPOI() @@ -7036,7 +6957,6 @@ void ObjectMgr::LoadQuestPOI() } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadNPCSpellClickSpells() @@ -7104,7 +7024,6 @@ void ObjectMgr::LoadNPCSpellClickSpells() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::DeleteCreatureData(uint32 guid) @@ -7183,7 +7102,6 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, } while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadGameobjectQuestRelations() @@ -7253,7 +7171,6 @@ void ObjectMgr::LoadReservedPlayersNames() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!"); - return; } @@ -7280,7 +7197,6 @@ void ObjectMgr::LoadReservedPlayersNames() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } bool ObjectMgr::IsReservedName(const std::string& name) const @@ -7434,7 +7350,6 @@ void ObjectMgr::LoadGameObjectForQuests() if (sObjectMgr->GetGameObjectTemplates()->empty()) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 GameObjects for quests"); - return; } @@ -7483,7 +7398,6 @@ void ObjectMgr::LoadGameObjectForQuests() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max_value) @@ -7575,7 +7489,6 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max else sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u string templates from %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); - return true; } @@ -7632,7 +7545,6 @@ void ObjectMgr::LoadFishingBaseSkillLevel() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& names) @@ -7758,7 +7670,6 @@ void ObjectMgr::LoadGameTele() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } GameTele const* ObjectMgr::GetGameTele(const std::string& name) const @@ -7903,7 +7814,6 @@ void ObjectMgr::LoadMailLevelRewards() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, uint32 reqSkill, uint32 reqSkillValue, uint32 reqLevel) @@ -8024,7 +7934,6 @@ void ObjectMgr::LoadTrainerSpell() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set *skip_vendors) @@ -8115,7 +8024,6 @@ void ObjectMgr::LoadVendors() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadGossipMenu() @@ -8157,7 +8065,6 @@ void ObjectMgr::LoadGossipMenu() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gossip_menu entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadGossipMenuItems() @@ -8221,7 +8128,6 @@ void ObjectMgr::LoadGossipMenuItems() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gossip_menu_option entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/) @@ -8400,7 +8306,6 @@ void ObjectMgr::LoadScriptNames() std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } uint32 ObjectMgr::GetScriptId(const char *name) @@ -8504,7 +8409,6 @@ void ObjectMgr::LoadCreatureClassLevelStats() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty."); - return; } @@ -8553,7 +8457,6 @@ void ObjectMgr::LoadCreatureClassLevelStats() } sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadFactionChangeAchievements() @@ -8590,7 +8493,6 @@ void ObjectMgr::LoadFactionChangeAchievements() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadFactionChangeItems() @@ -8602,7 +8504,6 @@ void ObjectMgr::LoadFactionChangeItems() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty."); - return; } @@ -8627,7 +8528,6 @@ void ObjectMgr::LoadFactionChangeItems() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadFactionChangeSpells() @@ -8664,7 +8564,6 @@ void ObjectMgr::LoadFactionChangeSpells() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } void ObjectMgr::LoadFactionChangeReputations() @@ -8676,7 +8575,6 @@ void ObjectMgr::LoadFactionChangeReputations() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty."); - return; } @@ -8701,7 +8599,6 @@ void ObjectMgr::LoadFactionChangeReputations() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry) diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 59bb2fb536f..da0d37cf27a 100755 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -787,13 +787,13 @@ class ObjectMgr void LoadQuests(); void LoadQuestRelations() { - sLog->outInfo(LOG_FILTER_GENERAL, "Loading GO Start Quest Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading GO Start Quest Data..."); LoadGameobjectQuestRelations(); - sLog->outInfo(LOG_FILTER_GENERAL, "Loading GO End Quest Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading GO End Quest Data..."); LoadGameobjectInvolvedRelations(); - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature Start Quest Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Creature Start Quest Data..."); LoadCreatureQuestRelations(); - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Creature End Quest Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Creature End Quest Data..."); LoadCreatureInvolvedRelations(); } void LoadGameobjectQuestRelations(); diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index 7cb8a8ff7b1..77b3a304f6b 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -126,7 +126,6 @@ void GroupMgr::LoadGroups() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 group definitions. DB table `groups` is empty!"); - return; } @@ -152,10 +151,9 @@ void GroupMgr::LoadGroups() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Group members..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Group members..."); { uint32 oldMSTime = getMSTime(); @@ -170,7 +168,6 @@ void GroupMgr::LoadGroups() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 group members. DB table `group_member` is empty!"); - return; } @@ -191,10 +188,9 @@ void GroupMgr::LoadGroups() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } - sLog->outInfo(LOG_FILTER_GENERAL, "Loading Group instance saves..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Group instance saves..."); { uint32 oldMSTime = getMSTime(); // 0 1 2 3 4 5 6 @@ -204,7 +200,6 @@ void GroupMgr::LoadGroups() if (!result) { sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 group-instance saves. DB table `group_instance` is empty!"); - return; } @@ -236,6 +231,5 @@ void GroupMgr::LoadGroups() while (result->NextRow()); sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - } } diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index dab67c59d2a..cebcf6040f9 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -93,7 +93,7 @@ Guild* GuildMgr::GetGuildByLeader(uint64 guid) const void GuildMgr::LoadGuilds() { // 1. Load all guilds - sLog->outInfo(LOG_FILTER_GUILD, "Loading guilds definitions..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading guilds definitions..."); { uint32 oldMSTime = getMSTime(); @@ -105,8 +105,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild definitions. DB table `guild` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild definitions. DB table `guild` is empty."); return; } else @@ -128,13 +127,12 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // 2. Load all guild ranks - sLog->outInfo(LOG_FILTER_GUILD, "Loading guild ranks..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading guild ranks..."); { uint32 oldMSTime = getMSTime(); @@ -146,8 +144,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild ranks. DB table `guild_rank` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild ranks. DB table `guild_rank` is empty."); } else { @@ -164,13 +161,12 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // 3. Load all guild members - sLog->outInfo(LOG_FILTER_GUILD, "Loading guild members..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading guild members..."); { uint32 oldMSTime = getMSTime(); @@ -189,8 +185,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild members. DB table `guild_member` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild members. DB table `guild_member` is empty."); } else { @@ -208,13 +203,12 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // 4. Load all guild bank tab rights - sLog->outInfo(LOG_FILTER_GUILD, "Loading bank tab rights..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading bank tab rights..."); { uint32 oldMSTime = getMSTime(); @@ -226,8 +220,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty."); } else { @@ -244,13 +237,12 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // 5. Load all event logs - sLog->outInfo(LOG_FILTER_GUILD, "Loading guild event logs..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading guild event logs..."); { uint32 oldMSTime = getMSTime(); @@ -261,8 +253,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty."); } else { @@ -279,13 +270,12 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // 6. Load all bank event logs - sLog->outInfo(LOG_FILTER_GUILD, "Loading guild bank event logs..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading guild bank event logs..."); { uint32 oldMSTime = getMSTime(); @@ -297,8 +287,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty."); } else { @@ -315,13 +304,12 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // 7. Load all guild bank tabs - sLog->outInfo(LOG_FILTER_GUILD, "Loading guild bank tabs..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading guild bank tabs..."); { uint32 oldMSTime = getMSTime(); @@ -333,8 +321,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty."); } else { @@ -351,8 +338,7 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } @@ -371,8 +357,7 @@ void GuildMgr::LoadGuilds() if (!result) { - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty."); } else { @@ -389,8 +374,7 @@ void GuildMgr::LoadGuilds() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } @@ -412,7 +396,6 @@ void GuildMgr::LoadGuilds() } } - sLog->outInfo(LOG_FILTER_GUILD, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime)); } } diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 6f49a555950..72636a5d2aa 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1450,7 +1450,7 @@ bool LootTemplate::isReference(uint32 id) void LoadLootTemplates_Creature() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading creature loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading creature loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1477,16 +1477,14 @@ void LoadLootTemplates_Creature() LootTemplates_Creature.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty"); - - } void LoadLootTemplates_Disenchant() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading disenchanting loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading disenchanting loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1512,15 +1510,14 @@ void LoadLootTemplates_Disenchant() LootTemplates_Disenchant.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty"); - } void LoadLootTemplates_Fishing() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading fishing loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading fishing loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1537,16 +1534,14 @@ void LoadLootTemplates_Fishing() LootTemplates_Fishing.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty"); - - } void LoadLootTemplates_Gameobject() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading gameobject loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading gameobject loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1573,16 +1568,14 @@ void LoadLootTemplates_Gameobject() LootTemplates_Gameobject.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty"); - - } void LoadLootTemplates_Item() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading item loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading item loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1599,16 +1592,14 @@ void LoadLootTemplates_Item() LootTemplates_Item.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty"); - - } void LoadLootTemplates_Milling() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading milling loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading milling loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1630,16 +1621,14 @@ void LoadLootTemplates_Milling() LootTemplates_Milling.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty"); - - } void LoadLootTemplates_Pickpocketing() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading pickpocketing loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading pickpocketing loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1666,16 +1655,14 @@ void LoadLootTemplates_Pickpocketing() LootTemplates_Pickpocketing.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty"); - - } void LoadLootTemplates_Prospecting() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading prospecting loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading prospecting loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1697,16 +1684,14 @@ void LoadLootTemplates_Prospecting() LootTemplates_Prospecting.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty"); - - } void LoadLootTemplates_Mail() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading mail loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading mail loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1723,16 +1708,14 @@ void LoadLootTemplates_Mail() LootTemplates_Mail.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty"); - - } void LoadLootTemplates_Skinning() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading skinning loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading skinning loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1759,16 +1742,14 @@ void LoadLootTemplates_Skinning() LootTemplates_Skinning.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty"); - - } void LoadLootTemplates_Spell() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading spell loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading spell loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1803,15 +1784,14 @@ void LoadLootTemplates_Spell() LootTemplates_Spell.ReportUnusedIds(lootIdSet); if (count) - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); else sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty"); - } void LoadLootTemplates_Reference() { - sLog->outInfo(LOG_FILTER_LOOT, "Loading reference loot templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading reference loot templates..."); uint32 oldMSTime = getMSTime(); @@ -1834,6 +1814,5 @@ void LoadLootTemplates_Reference() // output error for any still listed ids (not referenced from any loot table) LootTemplates_Reference.ReportUnusedIds(lootIdSet); - sLog->outInfo(LOG_FILTER_LOOT, ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime)); } diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index 5ada88cdf7a..ce987e25eed 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -46,8 +46,7 @@ void OutdoorPvPMgr::InitOutdoorPvP() if (!result) { - sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty."); - + sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty."); return; } @@ -106,8 +105,7 @@ void OutdoorPvPMgr::InitOutdoorPvP() m_OutdoorPvPSet.push_back(pvp); } - sLog->outInfo(LOG_FILTER_OUTDOORPVP, ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle) diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 6ee70101af7..79e8d47aa94 100755 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -571,7 +571,7 @@ void PoolMgr::LoadFromDB() if (!result) { mPoolTemplate.clear(); - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 object pools. DB table `pool_template` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 object pools. DB table `pool_template` is empty."); return; } @@ -589,12 +589,12 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } // Creatures - sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Creatures Pooling Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Creatures Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -603,7 +603,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty."); } else { @@ -644,13 +644,13 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // Gameobjects - sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Gameobject Pooling Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Gameobject Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -659,7 +659,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty."); } else { @@ -712,13 +712,13 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // Pool of pools - sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Mother Pooling Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Mother Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -727,7 +727,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 pools in pools"); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools in pools"); } else { @@ -796,11 +796,11 @@ void PoolMgr::LoadFromDB() } } - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } - sLog->outInfo(LOG_FILTER_POOLSYS, "Loading Quest Pooling Data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Quest Pooling Data..."); { uint32 oldMSTime = getMSTime(); @@ -809,7 +809,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded 0 quests in pools"); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests in pools"); } else { @@ -884,12 +884,12 @@ void PoolMgr::LoadFromDB() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } } // The initialize method will spawn all pools not in an event and not in another pool, this is why there is 2 left joins with 2 null checks - sLog->outInfo(LOG_FILTER_POOLSYS, "Starting objects pooling system..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Starting objects pooling system..."); { uint32 oldMSTime = getMSTime(); @@ -899,7 +899,7 @@ void PoolMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_POOLSYS, ">> Pool handling system initialized, 0 pools spawned."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Pool handling system initialized, 0 pools spawned."); } else { diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index f5adf67a9ab..98675f118e1 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -251,13 +251,12 @@ void ScriptMgr::Initialize() LoadDatabase(); - sLog->outInfo(LOG_FILTER_TSCR, "Loading C++ scripts"); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts"); FillSpellSummary(); AddScripts(); - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime)); } void ScriptMgr::Unload() diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 3c2ee81afff..270182509f9 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -164,7 +164,7 @@ class ScriptObject protected: ScriptObject(const char* name) - : _name(std::string(name)) + : _name(name) { } diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index f24b01306c5..41b41b91808 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -25,10 +25,10 @@ ScriptPointVector const SystemMgr::_empty; void SystemMgr::LoadScriptTexts() { - sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Texts..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Texts..."); LoadTrinityStrings("script_texts", TEXT_SOURCE_RANGE, 1+(TEXT_SOURCE_RANGE*2)); - sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Texts additional data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Texts additional data..."); uint32 oldMSTime = getMSTime(); // 0 1 2 3 @@ -36,8 +36,7 @@ void SystemMgr::LoadScriptTexts() if (!result) { - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); return; } @@ -83,23 +82,21 @@ void SystemMgr::LoadScriptTexts() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional Script Texts data in %u ms", uiCount, GetMSTimeDiffToNow(oldMSTime)); } void SystemMgr::LoadScriptTextsCustom() { - sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Custom Texts..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Custom Texts..."); LoadTrinityStrings("custom_texts", TEXT_SOURCE_RANGE*2, 1+(TEXT_SOURCE_RANGE*3)); - sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Custom Texts additional data..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Custom Texts additional data..."); QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts"); if (!result) { - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); return; } @@ -145,8 +142,7 @@ void SystemMgr::LoadScriptTextsCustom() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u additional Custom Texts data.", uiCount); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional Custom Texts data.", uiCount); } void SystemMgr::LoadScriptWaypoints() @@ -163,15 +159,14 @@ void SystemMgr::LoadScriptWaypoints() if (result) uiCreatureCount = result->GetRowCount(); - sLog->outInfo(LOG_FILTER_TSCR, "TSCR: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount); // 0 1 2 3 4 5 result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid"); if (!result) { - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); return; } @@ -206,6 +201,5 @@ void SystemMgr::LoadScriptWaypoints() } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_TSCR, ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e2b7df2889d..c26e78f3418 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1155,7 +1155,7 @@ void SpellMgr::LoadSpellRanks() if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); return; } @@ -1251,7 +1251,7 @@ void SpellMgr::LoadSpellRanks() while (true); } while (!finished); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } @@ -1267,7 +1267,7 @@ void SpellMgr::LoadSpellRequired() if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell required records. DB table `spell_required` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell required records. DB table `spell_required` is empty."); return; } @@ -1312,7 +1312,7 @@ void SpellMgr::LoadSpellRequired() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } @@ -1350,8 +1350,7 @@ void SpellMgr::LoadSpellLearnSkills() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellLearnSpells() @@ -1364,8 +1363,7 @@ void SpellMgr::LoadSpellLearnSpells() QueryResult result = WorldDatabase.Query("SELECT entry, SpellID, Active FROM spell_learn_spell"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); return; } @@ -1453,8 +1451,7 @@ void SpellMgr::LoadSpellLearnSpells() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellTargetPositions() @@ -1467,8 +1464,7 @@ void SpellMgr::LoadSpellTargetPositions() QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); return; } @@ -1573,8 +1569,7 @@ void SpellMgr::LoadSpellTargetPositions() } }*/ - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellGroups() @@ -1588,8 +1583,7 @@ void SpellMgr::LoadSpellGroups() QueryResult result = WorldDatabase.Query("SELECT id, spell_id FROM spell_group"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); return; } @@ -1655,8 +1649,7 @@ void SpellMgr::LoadSpellGroups() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellGroupStackRules() @@ -1669,8 +1662,7 @@ void SpellMgr::LoadSpellGroupStackRules() QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); return; } @@ -1700,8 +1692,7 @@ void SpellMgr::LoadSpellGroupStackRules() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellProcEvents() @@ -1714,8 +1705,7 @@ void SpellMgr::LoadSpellProcEvents() QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); return; } @@ -1762,9 +1752,9 @@ void SpellMgr::LoadSpellProcEvents() } while (result->NextRow()); if (customProc) - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } @@ -1778,8 +1768,7 @@ void SpellMgr::LoadSpellProcs() QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); return; } @@ -1905,8 +1894,7 @@ void SpellMgr::LoadSpellProcs() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellBonusess() @@ -1919,8 +1907,7 @@ void SpellMgr::LoadSpellBonusess() QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); return; } @@ -1946,8 +1933,7 @@ void SpellMgr::LoadSpellBonusess() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellThreats() @@ -1960,8 +1946,7 @@ void SpellMgr::LoadSpellThreats() QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); return; } @@ -1987,8 +1972,7 @@ void SpellMgr::LoadSpellThreats() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSkillLineAbilityMap() @@ -2009,8 +1993,7 @@ void SpellMgr::LoadSkillLineAbilityMap() ++count; } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellPetAuras() @@ -2023,8 +2006,7 @@ void SpellMgr::LoadSpellPetAuras() QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); return; } @@ -2071,8 +2053,7 @@ void SpellMgr::LoadSpellPetAuras() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } // Fill custom data about enchancments @@ -2112,8 +2093,7 @@ void SpellMgr::LoadEnchantCustomAttr() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellEnchantProcData() @@ -2126,8 +2106,7 @@ void SpellMgr::LoadSpellEnchantProcData() QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); return; } @@ -2156,8 +2135,7 @@ void SpellMgr::LoadSpellEnchantProcData() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellLinked() @@ -2170,8 +2148,7 @@ void SpellMgr::LoadSpellLinked() QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell"); if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); return; } @@ -2209,8 +2186,7 @@ void SpellMgr::LoadSpellLinked() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadPetLevelupSpellMap() @@ -2266,8 +2242,7 @@ void SpellMgr::LoadPetLevelupSpellMap() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); } bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells) @@ -2351,10 +2326,9 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, "Loading summonable creature templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading summonable creature templates..."); oldMSTime = getMSTime(); // different summon spells @@ -2395,8 +2369,7 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellAreas() @@ -2414,7 +2387,7 @@ void SpellMgr::LoadSpellAreas() if (!result) { - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); return; } @@ -2595,8 +2568,7 @@ void SpellMgr::LoadSpellAreas() ++count; } while (result->NextRow()); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellInfoStore() @@ -2612,8 +2584,7 @@ void SpellMgr::LoadSpellInfoStore() mSpellInfoMap[i] = new SpellInfo(spellEntry); } - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::UnloadSpellInfoStore() @@ -2925,8 +2896,7 @@ void SpellMgr::LoadSpellCustomAttr() CreatureAI::FillAISpellInfo(); - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadDbcDataCorrections() @@ -3565,6 +3535,5 @@ void SpellMgr::LoadDbcDataCorrections() properties = const_cast(sSummonPropertiesStore.LookupEntry(647)); // 52893 properties->Type = SUMMON_TYPE_TOTEM; - sLog->outInfo(LOG_FILTER_SPELLS_AURAS, ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); - + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); } diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 8e740ba83b8..3a24190d8fa 100755 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -114,9 +114,6 @@ void Log::CreateAppenderFromConfig(const char* name) { case APPENDER_CONSOLE: { - if (flags == APPENDER_FLAGS_NONE) - flags = AppenderFlags(APPENDER_FLAGS_PREFIX_LOGLEVEL | APPENDER_FLAGS_PREFIX_LOGFILTERTYPE); - AppenderConsole* appender = new AppenderConsole(NextAppenderId(), name, level, flags); appenders[appender->getId()] = appender; if (++iter != tokens.end()) @@ -135,9 +132,6 @@ void Log::CreateAppenderFromConfig(const char* name) return; } - if (flags == APPENDER_FLAGS_NONE) - flags = AppenderFlags(APPENDER_FLAGS_PREFIX_LOGLEVEL | APPENDER_FLAGS_PREFIX_LOGFILTERTYPE | APPENDER_FLAGS_PREFIX_TIMESTAMP); - filename = *iter; if (++iter != tokens.end()) diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index ce084e2fb96..bdeb60129ec 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -2620,14 +2620,14 @@ PlayerDump.DisallowOverwrite = 1 # Example: "13 11 9 5 3 1" # # File: Name of the file (read as optional1 if Type = File) -# Allows to use one "%u" to create dynamic files +# Allows to use one "%s" to create dynamic files # # Mode: Mode to open the file (read as optional2 if Type = File) # a - (Append) # w - (Overwrite) # -Appender.Console=1,5,0 +Appender.Console=1,3,0 Appender.Server=2,2,0,Server.log,w Appender.GM=2,2,0,GM.log Appender.DBErrors=2,2,0,DBErrors.log @@ -2712,12 +2712,13 @@ Appenders=Console Server GM DBErrors Char RA Warden Chat # (Using spaces as separator). # -Logger.Root=0,3,Console Server +Logger.Root=0,5,Console Server Logger.Chat=22,3,Chat Logger.DBErrors=26,5,Console Server DBErrors Logger.GM=27,3,Console Server GM Logger.RA=28,3,RA Logger.Warden=29,3,Warden +Logger.WorldServer=31,3,Console Server Logger.Character=34,3,Char Logger.Arenas=35,3,Arenas Logger.SQLDriver=36,5,SQLDriver @@ -2731,5 +2732,5 @@ Logger.Load=40,3,Console Server # (Using spaces as separator). # Default: "Root Chat DBErrors GM RA Warden Character Load" -Loggers=Root Chat DBErrors GM RA Warden Character Load +Loggers=Root Chat DBErrors GM RA Warden Character Load WorldServer -- cgit v1.2.3 From e4bf9d5cd459624ec65e1dd8e691ca72d8ce63f2 Mon Sep 17 00:00:00 2001 From: Kandera Date: Tue, 17 Apr 2012 09:16:56 -0400 Subject: cleanup merge and some unneeded selects in functions --- src/server/game/Battlefield/Zones/BattlefieldWG.h | 108 +++++++--------------- src/server/game/Scripting/ScriptMgr.cpp | 8 -- src/server/scripts/Northrend/wintergrasp.cpp | 2 +- 3 files changed, 34 insertions(+), 84 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index f62d2d962f8..53c051a03d2 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -372,7 +372,7 @@ class BattlefieldWG : public Battlefield void UpdatedDestroyedTowerCount(TeamId team); void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1); - + void RemoveAurasFromPlayer(Player* player); /** @@ -1458,48 +1458,27 @@ struct BfWGGameObjectBuilding if (m_Build) { if (disable) - { - switch (m_Build->GetEntry()) - { - case 190221: - case 190373: - case 190377: - case 190378: - { - creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]); - break; - } - case 190356: - case 190357: - case 190358: - { - creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]); - break; - } - } m_WG->HideNpc(creature); - } else + m_WG->ShowNpc(creature, true); + + switch (m_Build->GetEntry()) { - switch (m_Build->GetEntry()) + case 190221: + case 190373: + case 190377: + case 190378: { - case 190221: - case 190373: - case 190377: - case 190378: - { - creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]); - break; - } - case 190356: - case 190357: - case 190358: - { - creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]); - break; - } + creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]); + break; + } + case 190356: + case 190357: + case 190358: + { + creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]); + break; } - m_WG->ShowNpc(creature, true); } } } @@ -1515,48 +1494,27 @@ struct BfWGGameObjectBuilding if (m_Build) { if (disable) + m_WG->HideNpc(creature); + else + m_WG->ShowNpc(creature, true); + + switch (m_Build->GetEntry()) { - switch (m_Build->GetEntry()) + case 190221: + case 190373: + case 190377: + case 190378: { - case 190221: - case 190373: - case 190377: - case 190378: - { - creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]); - break; - } - case 190356: - case 190357: - case 190358: - { - creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]); - break; - } + creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]); + break; } - m_WG->HideNpc(creature); - } - else - { - switch (m_Build->GetEntry()) + case 190356: + case 190357: + case 190358: { - case 190221: - case 190373: - case 190377: - case 190378: - { - creature->setFaction(WintergraspFaction[m_WG->GetDefenderTeam()]); - break; - } - case 190356: - case 190357: - case 190358: - { - creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]); - break; - } + creature->setFaction(WintergraspFaction[m_WG->GetAttackerTeam()]); + break; } - m_WG->ShowNpc(creature, true); } } } diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 98675f118e1..2d7d86b5f73 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -972,14 +972,6 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd return tmpscript->OnDummyEffect(caster, spellId, effIndex, target); } -GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go) -{ - ASSERT(go); - - GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL); - return tmpscript->GetAI(go); -} - bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger) { ASSERT(player); diff --git a/src/server/scripts/Northrend/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp index 41bb5f3f54b..66a79a4be22 100644 --- a/src/server/scripts/Northrend/wintergrasp.cpp +++ b/src/server/scripts/Northrend/wintergrasp.cpp @@ -301,7 +301,7 @@ class go_wg_vehicle_teleporter : public GameObjectScript _checkTimer(1000) { } - void UpdateAI(const uint32 diff) + void UpdateAI(uint32 diff) { if (_checkTimer <= diff) { -- cgit v1.2.3 From b9f60fe56c86914c15f3a3064f9b8b91ea166012 Mon Sep 17 00:00:00 2001 From: Kandera Date: Mon, 20 Aug 2012 16:23:24 -0400 Subject: Core/Wintergrasp: finish implementation for battlefields. this is highly experimental enable at you're own risk. will almost definatly cause issues with the wintergrasp patch floating around --- src/server/game/Battlefield/Battlefield.cpp | 2 +- src/server/game/Entities/Object/Object.cpp | 5 +-- src/server/game/Entities/Player/Player.cpp | 2 + src/server/game/Entities/Unit/Unit.cpp | 2 + src/server/game/Groups/Group.cpp | 12 +++++- src/server/game/Groups/Group.h | 5 +++ src/server/game/Handlers/BattleGroundHandler.cpp | 49 +++++++++++++++++++++++ src/server/game/Handlers/MiscHandler.cpp | 49 +---------------------- src/server/game/Scripting/ScriptMgr.cpp | 8 ++++ src/server/game/Server/WorldSession.h | 1 + src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 + src/server/game/Spells/Spell.cpp | 2 + src/server/game/World/World.cpp | 1 + src/server/game/World/World.h | 7 ++++ src/server/scripts/CMakeLists.txt | 2 + src/server/scripts/Northrend/CMakeLists.txt | 1 + src/server/scripts/Northrend/wintergrasp.cpp | 3 +- 17 files changed, 100 insertions(+), 53 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index eb74c53ccb3..cdb8e1999fe 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -563,7 +563,7 @@ bool Battlefield::AddOrSetPlayerToCorrectBfGroup(Player* player) else if (group->IsMember(player->GetGUID())) { uint8 subgroup = group->GetMemberGroup(player->GetGUID()); - player->SetBattlegroundOrBattlefieldRaid(group, subgroup); + player->SetBattlegroundRaid(group, subgroup); } else group->AddMember(player); diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index b265648d0c4..9138dcedc27 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -48,6 +48,8 @@ #include "MovementPacketBuilder.h" #include "DynamicTree.h" #include "Group.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" uint32 GuidHigh2TypeId(uint32 guid_hi) { @@ -2331,9 +2333,6 @@ void WorldObject::SetZoneScript() else if (!map->IsBattlegroundOrArena()) { if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())) - m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId()); - } -} m_zoneScript = bf; else m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId()); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 2cb38d615ac..1dcdfa9d8b4 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -74,6 +74,8 @@ #include "InstanceScript.h" #include #include "AccountMgr.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" #define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5e94ea3146a..3f088c556f6 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -57,6 +57,8 @@ #include "MoveSpline.h" #include "ConditionMgr.h" #include "UpdateFieldFlags.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" #include diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 5ace6da2f44..c270597d15b 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -59,7 +59,7 @@ Loot* Roll::getLoot() Group::Group() : m_leaderGuid(0), m_leaderName(""), m_groupType(GROUPTYPE_NORMAL), m_dungeonDifficulty(DUNGEON_DIFFICULTY_NORMAL), m_raidDifficulty(RAID_DIFFICULTY_10MAN_NORMAL), -m_bgGroup(NULL), m_lootMethod(FREE_FOR_ALL), m_lootThreshold(ITEM_QUALITY_UNCOMMON), m_looterGuid(0), +m_bgGroup(NULL), m_bfGroup(NULL), m_lootMethod(FREE_FOR_ALL), m_lootThreshold(ITEM_QUALITY_UNCOMMON), m_looterGuid(0), m_subGroupsCounts(NULL), m_guid(0), m_counter(0), m_maxEnchantingLevel(0), m_dbStoreId(0) { for (uint8 i = 0; i < TARGETICONCOUNT; ++i) @@ -2149,6 +2149,11 @@ bool Group::isBGGroup() const return m_bgGroup != NULL; } +bool Group::isBFGroup() const +{ + return m_bfGroup != NULL; +} + bool Group::IsCreated() const { return GetMembersCount() > 0; @@ -2250,6 +2255,11 @@ void Group::SetBattlegroundGroup(Battleground* bg) m_bgGroup = bg; } +void Group::SetBattlefieldGroup(Battlefield *bg) +{ + m_bfGroup = bg; +} + void Group::SetGroupMemberFlag(uint64 guid, bool apply, GroupMemberFlags flag) { // Assistants, main assistants and main tanks are only available in raid groups diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index e5f174c4230..41f5cd0de5f 100755 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -26,6 +26,8 @@ #include "QueryResult.h" #include "SharedDefines.h" #include "Player.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" class Creature; class GroupReference; @@ -205,6 +207,7 @@ class Group bool isLFGGroup() const; bool isRaidGroup() const; bool isBGGroup() const; + bool isBFGroup() const; bool IsCreated() const; uint64 GetLeaderGUID() const; uint64 GetGUID() const; @@ -241,6 +244,7 @@ class Group void ConvertToRaid(); void SetBattlegroundGroup(Battleground* bg); + void SetBattlefieldGroup(Battlefield *bf); GroupJoinBattlegroundResult CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot); void ChangeMembersGroup(uint64 guid, uint8 group); @@ -324,6 +328,7 @@ class Group Difficulty m_dungeonDifficulty; Difficulty m_raidDifficulty; Battleground* m_bgGroup; + Battlefield* m_bfGroup; uint64 m_targetIcons[TARGETICONCOUNT]; LootMethod m_lootMethod; ItemQualities m_lootThreshold; diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index 475c1c42fca..b47eaf52064 100755 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -34,6 +34,8 @@ #include "Opcodes.h" #include "DisableMgr.h" #include "Group.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data) { @@ -565,6 +567,53 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/) } } +void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) +{ + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); + + Battleground* bg = _player->GetBattleground(); + + uint64 guid; + recv_data >> guid; + + Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); + if (!unit) + return; + + if (!unit->isSpiritService()) // it's not spirit service + return; + + if (bg) + sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid); + + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) + bf->SendAreaSpiritHealerQueryOpcode(_player,guid); +} + +void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) +{ + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); + + Battleground* bg = _player->GetBattleground(); + + uint64 guid; + recv_data >> guid; + + Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); + if (!unit) + return; + + if (!unit->isSpiritService()) // it's not spirit service + return; + + if (bg) + bg->AddPlayerToResurrectQueue(guid, _player->GetGUID()); + + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) + bf->AddPlayerToResurrectQueue(guid, _player->GetGUID()); +} + + void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA"); diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 26b41a62928..bb0ca39fa37 100755 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -52,6 +52,8 @@ #include "Group.h" #include "AccountMgr.h" #include "Spell.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) { @@ -1687,53 +1689,6 @@ void WorldSession::SendSetPhaseShift(uint32 PhaseShift) SendPacket(&data); } -//Battlefield and Battleground -void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) -{ - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); - - Battleground* bg = _player->GetBattleground(); - - uint64 guid; - recv_data >> guid; - - Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); - if (!unit) - return; - - if (!unit->isSpiritService()) // it's not spirit service - return; - - if (bg) - sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid); - - if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) - bf->SendAreaSpiritHealerQueryOpcode(_player,guid); -} - -void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) -{ - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); - - Battleground* bg = _player->GetBattleground(); - - uint64 guid; - recv_data >> guid; - - Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); - if (!unit) - return; - - if (!unit->isSpiritService()) // it's not spirit service - return; - - if (bg) - bg->AddPlayerToResurrectQueue(guid, _player->GetGUID()); - - if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) - bf->AddPlayerToResurrectQueue(guid, _player->GetGUID()); -} - void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/) { if (_player->isInFlight()) diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 2d7d86b5f73..61d8711fd71 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -723,6 +723,14 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd return tmpscript->OnDummyEffect(caster, spellId, effIndex, target); } +GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go) +{ + ASSERT(go); + + GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL); + return tmpscript->GetAI(go); +} + bool ScriptMgr::OnQuestAccept(Player* player, Item* item, Quest const* quest) { ASSERT(player); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 98a8f3e5641..40485e2fa3b 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -933,6 +933,7 @@ class WorldSession void HandleEjectPassenger(WorldPacket& data); void HandleEnterPlayerVehicle(WorldPacket& data); void HandleUpdateProjectilePosition(WorldPacket& recvPacket); + void HandleUpdateMissileTrajectory(WorldPacket& recvPacket); private: void InitializeQueryCallbackParameters(); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index e8675d52b2d..f6cd5008b3c 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -36,6 +36,8 @@ #include "CellImpl.h" #include "ScriptMgr.h" #include "Vehicle.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" class Aura; // diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 5281eb16f0c..be92a86f958 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -53,6 +53,8 @@ #include "SpellScript.h" #include "InstanceScript.h" #include "SpellInfo.h" +#include "Battlefield.h" +#include "BattlefieldMgr.h" extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS]; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index b6e9ee1651d..d860530d97d 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -77,6 +77,7 @@ #include "WardenCheckMgr.h" #include "Warden.h" #include "CalendarMgr.h" +#include "BattlefieldMgr.h" ACE_Atomic_Op World::m_stopEvent = false; uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE; diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index f0dbc3c84ad..a6cdd4742f6 100755 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -164,6 +164,7 @@ enum WorldBoolConfigs CONFIG_QUEST_IGNORE_AUTO_ACCEPT, CONFIG_QUEST_IGNORE_AUTO_COMPLETE, CONFIG_WARDEN_ENABLED, + CONFIG_WINTERGRASP_ENABLE, BOOL_CONFIG_VALUE_COUNT }; @@ -318,6 +319,12 @@ enum WorldIntConfigs CONFIG_WARDEN_CLIENT_BAN_DURATION, CONFIG_WARDEN_NUM_MEM_CHECKS, CONFIG_WARDEN_NUM_OTHER_CHECKS, + CONFIG_WINTERGRASP_PLR_MAX, + CONFIG_WINTERGRASP_PLR_MIN, + CONFIG_WINTERGRASP_PLR_MIN_LVL, + CONFIG_WINTERGRASP_BATTLETIME, + CONFIG_WINTERGRASP_NOBATTLETIME, + CONFIG_WINTERGRASP_RESTART_AFTER_CRASH, INT_CONFIG_VALUE_COUNT }; diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt index 792fdeb3e7b..f148ae2b3ee 100644 --- a/src/server/scripts/CMakeLists.txt +++ b/src/server/scripts/CMakeLists.txt @@ -80,6 +80,8 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/game/AI/ScriptedAI ${CMAKE_SOURCE_DIR}/src/server/game/AI/SmartScripts ${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse + ${CMAKE_SOURCE_DIR}/src/server/game/Battlefield + ${CMAKE_SOURCE_DIR}/src/server/game/Battlefield/Zones ${CMAKE_SOURCE_DIR}/src/server/game/Battlegrounds ${CMAKE_SOURCE_DIR}/src/server/game/Battlegrounds/Zones ${CMAKE_SOURCE_DIR}/src/server/game/Calendar diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt index 3502e7fb104..dd8dd17c947 100644 --- a/src/server/scripts/Northrend/CMakeLists.txt +++ b/src/server/scripts/Northrend/CMakeLists.txt @@ -10,6 +10,7 @@ set(scripts_STAT_SRCS ${scripts_STAT_SRCS} + Northrend/wintergrasp.cpp Northrend/isle_of_conquest.cpp Northrend/storm_peaks.cpp Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp diff --git a/src/server/scripts/Northrend/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp index 66a79a4be22..eba5b7f69d4 100644 --- a/src/server/scripts/Northrend/wintergrasp.cpp +++ b/src/server/scripts/Northrend/wintergrasp.cpp @@ -21,6 +21,7 @@ #include "WorldSession.h" #include "ObjectMgr.h" #include "Vehicle.h" +#include "GameObjectAI.h" #define GOSSIP_HELLO_DEMO1 "Build catapult." #define GOSSIP_HELLO_DEMO2 "Build demolisher." @@ -323,7 +324,7 @@ class go_wg_vehicle_teleporter : public GameObjectScript uint32 _checkTimer; }; - GameObjectAI* GetAI(GameObject* go) const + GameObjectAI* GetGameObjectAI(GameObject* go) const { return new go_wg_vehicle_teleporterAI(go); } -- cgit v1.2.3 From 6891fe6248ca0016fdb520bc8db2a1929c299c67 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Tue, 21 Aug 2012 23:01:24 +0200 Subject: Core/Battlefield: Add missing stuff for wintergrasp --- src/server/game/AI/CoreAI/GameObjectAI.h | 5 ++ src/server/game/AI/CreatureAISelector.cpp | 5 ++ src/server/game/Battlefield/Battlefield.cpp | 2 +- src/server/game/Battlegrounds/Battleground.cpp | 2 +- src/server/game/Entities/GameObject/GameObject.cpp | 9 +++- src/server/game/Entities/GameObject/GameObject.h | 1 + src/server/game/Entities/Object/Object.cpp | 7 ++- src/server/game/Entities/Player/Player.cpp | 13 +++-- src/server/game/Entities/Player/Player.h | 6 +-- src/server/game/Entities/Vehicle/Vehicle.h | 4 ++ src/server/game/Globals/ObjectAccessor.h | 1 + src/server/game/Groups/Group.cpp | 62 +++++++++++----------- src/server/game/Groups/Group.h | 2 +- src/server/game/Handlers/BattleGroundHandler.cpp | 49 ----------------- src/server/game/Handlers/MiscHandler.cpp | 47 ++++++++++++++++ src/server/game/Scripting/ScriptMgr.cpp | 16 +++--- src/server/game/Server/Protocol/Opcodes.cpp | 6 +-- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 3 +- src/server/game/Spells/Spell.cpp | 4 +- src/server/game/Spells/SpellEffects.cpp | 1 + 20 files changed, 139 insertions(+), 106 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.cpp') diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index fbc8675cc47..6dfea9ac158 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -39,6 +39,11 @@ class GameObjectAI virtual void Reset() {}; + // Pass parameters between AI + virtual void DoAction(const int32 /*param = 0 */) {} + virtual void SetGUID(const uint64& /*guid*/, int32 /*id = 0 */) {} + virtual uint64 GetGUID(int32 /*id = 0 */) { return 0; } + static int Permissible(GameObject const* go); virtual bool GossipHello(Player* /*player*/) { return false; } diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 2d69f1e0243..4ccaa174e67 100755 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -137,6 +137,11 @@ namespace FactorySelector ai_factory = ai_registry.GetRegistryItem(go->GetAIName()); + // scriptname in db + if (!ai_factory) + if (GameObjectAI* scriptedAI = sScriptMgr->GetGameObjectAI(go)) + return scriptedAI; + //future goAI types go here std::string ainame = (ai_factory == NULL || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key(); diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index 7a09420acb6..d159580d189 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -563,7 +563,7 @@ bool Battlefield::AddOrSetPlayerToCorrectBfGroup(Player* player) else if (group->IsMember(player->GetGUID())) { uint8 subgroup = group->GetMemberGroup(player->GetGUID()); - player->SetBattlegroundRaid(group, subgroup); + player->SetBattlegroundOrBattlefieldRaid(group, subgroup); } else group->AddMember(player); diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index cf767a2986e..eb5f3459edf 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1213,7 +1213,7 @@ void Battleground::AddOrSetPlayerToCorrectBgGroup(Player* player, uint32 team) if (group->IsMember(playerGuid)) { uint8 subgroup = group->GetMemberGroup(playerGuid); - player->SetBattlegroundRaid(group, subgroup); + player->SetBattlegroundOrBattlefieldRaid(group, subgroup); } else { diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index bebed9ce0bd..08518217e26 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -854,6 +854,13 @@ bool GameObject::IsDynTransport() const return gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT || (gInfo->type == GAMEOBJECT_TYPE_TRANSPORT && !gInfo->transport.pause); } +bool GameObject::IsDestructibleBuilding() const +{ + GameObjectTemplate const* gInfo = GetGOInfo(); + if (!gInfo) return false; + return gInfo->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING; +} + Unit* GameObject::GetOwner() const { return ObjectAccessor::GetUnit(*this, GetOwnerGUID()); @@ -870,7 +877,7 @@ bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const if (WorldObject::IsAlwaysVisibleFor(seer)) return true; - if (IsTransport()) + if (IsTransport() || IsDestructibleBuilding()) return true; if (!seer) diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index a8035043543..eb2fa8f1a0e 100755 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -632,6 +632,7 @@ class GameObject : public WorldObject, public GridObject bool IsTransport() const; bool IsDynTransport() const; + bool IsDestructibleBuilding() const; uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; } diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 9138dcedc27..2e4ad07f86d 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2335,7 +2335,12 @@ void WorldObject::SetZoneScript() if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())) m_zoneScript = bf; else - m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId()); + { + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())) + m_zoneScript = bf; + else + m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId()); + } } } } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 1dcdfa9d8b4..f463a62e9fa 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5500,7 +5500,12 @@ void Player::RepopAtGraveyard() if (sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())) ClosestGrave = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())->GetClosestGraveYard(this); else - ClosestGrave = sObjectMgr->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()); + { + if (sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())) + ClosestGrave = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())->GetClosestGraveYard(this); + else + ClosestGrave = sObjectMgr->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()); + } } // stop countdown until repop @@ -7570,7 +7575,7 @@ void Player::CheckDuelDistance(time_t currTime) bool Player::IsOutdoorPvPActive() { - return isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (IsPvP() || sWorld->IsPvPRealm()) && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !isInFlight(); + return isAlive() && !HasInvisibilityAura() && !HasStealthAura() && IsPvP() && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !isInFlight(); } void Player::DuelComplete(DuelCompleteType type) @@ -23310,7 +23315,7 @@ bool Player::isUsingLfg() return sLFGMgr->GetState(guid) != LFG_STATE_NONE; } -void Player::SetBattlegroundRaid(Group* group, int8 subgroup) +void Player::SetBattlegroundOrBattlefieldRaid(Group* group, int8 subgroup) { //we must move references from m_group to m_originalGroup SetOriginalGroup(GetGroup(), GetSubGroup()); @@ -23320,7 +23325,7 @@ void Player::SetBattlegroundRaid(Group* group, int8 subgroup) m_group.setSubGroup((uint8)subgroup); } -void Player::RemoveFromBattlegroundRaid() +void Player::RemoveFromBattlegroundOrBattlefieldRaid() { //remove existing reference m_group.unlink(); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 271bf2b22f8..358eebb7548 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2417,9 +2417,9 @@ class Player : public Unit, public GridObject Player* GetNextRandomRaidMember(float radius); PartyResult CanUninviteFromGroup() const; - // Battleground Group System - void SetBattlegroundRaid(Group* group, int8 subgroup = -1); - void RemoveFromBattlegroundRaid(); + // Battleground / Battlefield Group System + void SetBattlegroundOrBattlefieldRaid(Group* group, int8 subgroup = -1); + void RemoveFromBattlegroundOrBattlefieldRaid(); Group* GetOriginalGroup() { return m_originalGroup.getTarget(); } GroupReference& GetOriginalGroupRef() { return m_originalGroup; } uint8 GetOriginalSubGroup() const { return m_originalGroup.getSubGroup(); } diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index 213be5a21fe..95fc2364256 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -25,6 +25,8 @@ struct VehicleEntry; class Unit; +typedef std::set GuidSet; + class Vehicle { public: @@ -53,6 +55,7 @@ class Vehicle void RelocatePassengers(float x, float y, float z, float ang); void RemoveAllPassengers(); void Dismiss(); + void TeleportVehicle(float x, float y, float z, float ang); bool IsVehicleInUse() { return Seats.begin() != Seats.end(); } SeatMap Seats; @@ -65,6 +68,7 @@ class Vehicle Unit* _me; VehicleEntry const* _vehicleInfo; + GuidSet vehiclePlayers; uint32 _usableSeatNum; // Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags uint32 _creatureEntry; // Can be different than me->GetBase()->GetEntry() in case of players }; diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 5b31c6bfff4..0a1b41eb292 100755 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -191,6 +191,7 @@ class ObjectAccessor // ACCESS LIKE THAT IS NOT THREAD SAFE static Pet* FindPet(uint64); static Player* FindPlayer(uint64); + static Creature* FindCreature(uint64); static Unit* FindUnit(uint64); static Player* FindPlayerByName(const char* name); diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index c270597d15b..eae865592df 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -104,7 +104,7 @@ bool Group::Create(Player* leader) m_leaderGuid = leaderGuid; m_leaderName = leader->GetName(); - m_groupType = isBGGroup() ? GROUPTYPE_BGRAID : GROUPTYPE_NORMAL; + m_groupType = (isBGGroup() || isBFGroup()) ? GROUPTYPE_BGRAID : GROUPTYPE_NORMAL; if (m_groupType & GROUPTYPE_RAID) _initRaidSubGroupsCounter(); @@ -116,7 +116,7 @@ bool Group::Create(Player* leader) m_dungeonDifficulty = DUNGEON_DIFFICULTY_NORMAL; m_raidDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { m_dungeonDifficulty = leader->GetDungeonDifficulty(); m_raidDifficulty = leader->GetRaidDifficulty(); @@ -232,7 +232,7 @@ void Group::ConvertToLFG() { m_groupType = GroupType(m_groupType | GROUPTYPE_LFG | GROUPTYPE_UNK1); m_lootMethod = NEED_BEFORE_GREED; - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_TYPE); @@ -251,7 +251,7 @@ void Group::ConvertToRaid() _initRaidSubGroupsCounter(); - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_TYPE); @@ -274,7 +274,7 @@ bool Group::AddInvite(Player* player) if (!player || player->GetGroupInvite()) return false; Group* group = player->GetGroup(); - if (group && group->isBGGroup()) + if (group && (group->isBGGroup() || group->isBFGroup())) group = player->GetOriginalGroup(); if (group) return false; @@ -371,8 +371,8 @@ bool Group::AddMember(Player* player) if (player) { player->SetGroupInvite(NULL); - if (player->GetGroup() && isBGGroup()) //if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid() - player->SetBattlegroundRaid(this, subGroup); + if (player->GetGroup() && (isBGGroup() || isBFGroup())) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid() + player->SetBattlegroundOrBattlefieldRaid(this, subGroup); else if (player->GetGroup()) //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup() player->SetOriginalGroup(this, subGroup); else //if player is not in group, then call set group @@ -391,7 +391,7 @@ bool Group::AddMember(Player* player) } // insert into the table if we're not a battleground group - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GROUP_MEMBER); @@ -410,7 +410,7 @@ bool Group::AddMember(Player* player) if (player) { - if (!IsLeader(player->GetGUID()) && !isBGGroup()) + if (!IsLeader(player->GetGUID()) && !isBGGroup() && !isBFGroup()) { // reset the new member's instances, unless he is currently in one of them // including raid/heroic instances that they are not permanently bound to! @@ -496,15 +496,15 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV if (isLFGGroup() && method == GROUP_REMOVEMETHOD_KICK) return m_memberSlots.size(); - // remove member and change leader (if need) only if strong more 2 members _before_ member remove (BG allow 1 member group) - if (GetMembersCount() > ((isBGGroup() || isLFGGroup()) ? 1u : 2u)) + // remove member and change leader (if need) only if strong more 2 members _before_ member remove (BG/BF allow 1 member group) + if (GetMembersCount() > ((isBGGroup() || isLFGGroup() || isBFGroup()) ? 1u : 2u)) { Player* player = ObjectAccessor::FindPlayer(guid); if (player) { // Battleground group handling - if (isBGGroup()) - player->RemoveFromBattlegroundRaid(); + if (isBGGroup() || isBFGroup()) + player->RemoveFromBattlegroundOrBattlefieldRaid(); else // Regular group { @@ -535,13 +535,13 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV } // Remove player from group in DB - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER); - - stmt->setUInt32(0, GUID_LOPART(guid)); - - CharacterDatabase.Execute(stmt); - - DelinkMember(guid); + if (!isBGGroup() && !isBFGroup()) + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER); + stmt->setUInt32(0, GUID_LOPART(guid)); + CharacterDatabase.Execute(stmt); + DelinkMember(guid); + } // Reevaluate group enchanter if the leaving player had enchanting skill or the player is offline if ((player && player->GetSkillValue(SKILL_ENCHANTING)) || !player) @@ -632,7 +632,7 @@ void Group::ChangeLeader(uint64 guid) sScriptMgr->OnGroupChangeLeader(this, m_leaderGuid, guid); - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { // Remove the groups permanent instance bindings for (uint8 i = 0; i < MAX_DIFFICULTY; ++i) @@ -692,8 +692,8 @@ void Group::Disband(bool hideDestroy /* = false */) //we cannot call _removeMember because it would invalidate member iterator //if we are removing player from battleground raid - if (isBGGroup()) - player->RemoveFromBattlegroundRaid(); + if (isBGGroup() || isBFGroup()) + player->RemoveFromBattlegroundOrBattlefieldRaid(); else { //we can remove player who is in battleground from his original group @@ -737,7 +737,7 @@ void Group::Disband(bool hideDestroy /* = false */) RemoveAllInvites(); - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { SQLTransaction trans = CharacterDatabase.BeginTransaction(); @@ -1507,7 +1507,7 @@ void Group::SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot) Player* member = ObjectAccessor::FindPlayer(citr->guid); uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE; - onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0); + onlineState = onlineState | ((isBGGroup() || isBFGroup()) ? MEMBER_STATUS_PVP : 0); data << citr->name; data << uint64(citr->guid); // guid @@ -1598,7 +1598,7 @@ bool Group::_setMembersGroup(uint64 guid, uint8 group) SubGroupCounterIncrease(group); - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_MEMBER_SUBGROUP); @@ -1649,7 +1649,7 @@ void Group::ChangeMembersGroup(uint64 guid, uint8 group) SubGroupCounterDecrease(prevSubGroup); // Preserve new sub group in database for non-raid groups - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_MEMBER_SUBGROUP); @@ -1844,7 +1844,7 @@ void Roll::targetObjectBuildLink() void Group::SetDungeonDifficulty(Difficulty difficulty) { m_dungeonDifficulty = difficulty; - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_DIFFICULTY); @@ -1868,7 +1868,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty) void Group::SetRaidDifficulty(Difficulty difficulty) { m_raidDifficulty = difficulty; - if (!isBGGroup()) + if (!isBGGroup() && !isBFGroup()) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GROUP_RAID_DIFFICULTY); @@ -1904,7 +1904,7 @@ bool Group::InCombatToInstance(uint32 instanceId) void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) { - if (isBGGroup()) + if (isBGGroup() || isBFGroup()) return; // method can be INSTANCE_RESET_ALL, INSTANCE_RESET_CHANGE_DIFFICULTY, INSTANCE_RESET_GROUP_DISBAND @@ -2019,7 +2019,7 @@ InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry) InstanceGroupBind* Group::BindToInstance(InstanceSave* save, bool permanent, bool load) { - if (!save || isBGGroup()) + if (!save || isBGGroup() || isBFGroup()) return NULL; InstanceGroupBind& bind = m_boundInstances[save->GetDifficulty()][save->GetMapId()]; diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index 41f5cd0de5f..de622a16301 100755 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -244,7 +244,7 @@ class Group void ConvertToRaid(); void SetBattlegroundGroup(Battleground* bg); - void SetBattlefieldGroup(Battlefield *bf); + void SetBattlefieldGroup(Battlefield* bf); GroupJoinBattlegroundResult CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot); void ChangeMembersGroup(uint64 guid, uint8 group); diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index b47eaf52064..475c1c42fca 100755 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -34,8 +34,6 @@ #include "Opcodes.h" #include "DisableMgr.h" #include "Group.h" -#include "Battlefield.h" -#include "BattlefieldMgr.h" void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data) { @@ -567,53 +565,6 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/) } } -void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) -{ - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); - - Battleground* bg = _player->GetBattleground(); - - uint64 guid; - recv_data >> guid; - - Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); - if (!unit) - return; - - if (!unit->isSpiritService()) // it's not spirit service - return; - - if (bg) - sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid); - - if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) - bf->SendAreaSpiritHealerQueryOpcode(_player,guid); -} - -void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) -{ - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); - - Battleground* bg = _player->GetBattleground(); - - uint64 guid; - recv_data >> guid; - - Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); - if (!unit) - return; - - if (!unit->isSpiritService()) // it's not spirit service - return; - - if (bg) - bg->AddPlayerToResurrectQueue(guid, _player->GetGUID()); - - if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) - bf->AddPlayerToResurrectQueue(guid, _player->GetGUID()); -} - - void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA"); diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index bb0ca39fa37..80caee7d896 100755 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -52,6 +52,7 @@ #include "Group.h" #include "AccountMgr.h" #include "Spell.h" +#include "BattlegroundMgr.h" #include "Battlefield.h" #include "BattlefieldMgr.h" @@ -1688,6 +1689,52 @@ void WorldSession::SendSetPhaseShift(uint32 PhaseShift) data << uint32(PhaseShift); SendPacket(&data); } +// Battlefield and Battleground +void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) +{ + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); + + Battleground* bg = _player->GetBattleground(); + + uint64 guid; + recv_data >> guid; + + Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); + if (!unit) + return; + + if (!unit->isSpiritService()) // it's not spirit service + return; + + if (bg) + sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid); + + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) + bf->SendAreaSpiritHealerQueryOpcode(_player,guid); +} + +void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) +{ + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); + + Battleground* bg = _player->GetBattleground(); + + uint64 guid; + recv_data >> guid; + + Creature* unit = GetPlayer()->GetMap()->GetCreature(guid); + if (!unit) + return; + + if (!unit->isSpiritService()) // it's not spirit service + return; + + if (bg) + bg->AddPlayerToResurrectQueue(guid, _player->GetGUID()); + + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) + bf->AddPlayerToResurrectQueue(guid, _player->GetGUID()); +} void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/) { diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 61d8711fd71..47ce6c17b28 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -723,14 +723,6 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd return tmpscript->OnDummyEffect(caster, spellId, effIndex, target); } -GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go) -{ - ASSERT(go); - - GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL); - return tmpscript->GetAI(go); -} - bool ScriptMgr::OnQuestAccept(Player* player, Item* item, Quest const* quest) { ASSERT(player); @@ -861,6 +853,14 @@ CreatureAI* ScriptMgr::GetCreatureAI(Creature* creature) return tmpscript->GetAI(creature); } +GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* gameobject) +{ + ASSERT(gameobject); + + GET_SCRIPT_RET(GameObjectScript, gameobject->GetScriptId(), tmpscript, NULL); + return tmpscript->GetAI(gameobject); +} + void ScriptMgr::OnCreatureUpdate(Creature* creature, uint32 diff) { ASSERT(creature); diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 8fb8ea0298b..a229d3ed536 100755 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1273,15 +1273,15 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] = /*0x4DC*/ { "SMSG_PVP_QUEUE_STATS", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4DD*/ { "CMSG_SET_PAID_SERVICE_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4DE*/ { "SMSG_BATTLEFIELD_MGR_ENTRY_INVITE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x4DF*/ { "CMSG_BATTLEFIELD_MGR_ENTRY_INVITE_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x4DF*/ { "CMSG_BATTLEFIELD_MGR_ENTRY_INVITE_RESPONSE", STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleBfEntryInviteResponse }, /*0x4E0*/ { "SMSG_BATTLEFIELD_MGR_ENTERED", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4E1*/ { "SMSG_BATTLEFIELD_MGR_QUEUE_INVITE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x4E2*/ { "CMSG_BATTLEFIELD_MGR_QUEUE_INVITE_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x4E2*/ { "CMSG_BATTLEFIELD_MGR_QUEUE_INVITE_RESPONSE", STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleBfQueueInviteResponse }, /*0x4E3*/ { "CMSG_BATTLEFIELD_MGR_QUEUE_REQUEST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4E4*/ { "SMSG_BATTLEFIELD_MGR_QUEUE_REQUEST_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4E5*/ { "SMSG_BATTLEFIELD_MGR_EJECT_PENDING", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4E6*/ { "SMSG_BATTLEFIELD_MGR_EJECTED", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, - /*0x4E7*/ { "CMSG_BATTLEFIELD_MGR_EXIT_REQUEST", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, + /*0x4E7*/ { "CMSG_BATTLEFIELD_MGR_EXIT_REQUEST", STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleBfExitRequest }, /*0x4E8*/ { "SMSG_BATTLEFIELD_MGR_STATE_CHANGE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide }, /*0x4E9*/ { "CMSG_BATTLEFIELD_MANAGER_ADVANCE_STATE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, /*0x4EA*/ { "CMSG_BATTLEFIELD_MANAGER_SET_NEXT_TRANSITION_TIME", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL }, diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index f6cd5008b3c..b83e44d6a73 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5021,7 +5021,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool { if (Battleground* bg = target->ToPlayer()->GetBattleground()) bg->RemovePlayerFromResurrectQueue(target->GetGUID()); - if(Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(target->GetZoneId())) + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(target->GetZoneId())) bf->RemovePlayerFromResurrectQueue(target->GetGUID()); } break; @@ -5060,6 +5060,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this); break; case 58600: // Restricted Flight Area + case 58730: // Restricted Flight Area if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) target->CastSpell(target, 58601, true); break; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index be92a86f958..6376ff6e50b 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5445,8 +5445,8 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->isAlive()) { Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(m_originalCaster->GetZoneId()); - if (AreaTableEntry const* pArea = GetAreaEntryByAreaID(m_originalCaster->GetAreaId())) - if (pArea->flags & AREA_FLAG_NO_FLY_ZONE) + if (AreaTableEntry const* area = GetAreaEntryByAreaID(m_originalCaster->GetAreaId())) + if (area->flags & AREA_FLAG_NO_FLY_ZONE || (Bf && !Bf->CanFlyIn())) return (_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR) ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE; } break; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d30f6e593dd..11356e8b155 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -6196,6 +6196,7 @@ void Spell::EffectPlayerNotification(SpellEffIndex effIndex) case 58730: // Restricted Flight Area case 58600: // Restricted Flight Area unitTarget->ToPlayer()->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE); + unitTarget->PlayDirectSound(9417); // Fel Reaver sound break; } -- cgit v1.2.3