aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-05-13 15:07:36 +0200
committerSpp <spp@jorge.gr>2013-05-13 15:07:36 +0200
commitd1677b2db08f71a5bddedd9659cc5a66f325f47f (patch)
treeafb68e15d84d4e64de9f80b9bbbeb126c4aa8c54 /src/server/scripts/Kalimdor
parent243c325ca4323feb4f7f80c0ecd3873c78cbf887 (diff)
Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros. Memleak fix
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp8
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp20
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp2
9 files changed, 28 insertions, 28 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 5e7c52a8ff3..1544ceee857 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -72,7 +72,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- sLog->outDebug(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled");
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled");
break;
}
return true;
@@ -149,7 +149,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- sLog->outDebug(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled");
+ TC_LOG_DEBUG(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 a7d4a7087f8..a624cd4a4f7 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(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ } else TC_LOG_ERROR(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(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ TC_LOG_ERROR(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, "HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
+ TC_LOG_DEBUG(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(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ else TC_LOG_ERROR(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 7854322b0c6..fb2c1b3e47d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -276,7 +276,7 @@ public:
break;
}
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
+ TC_LOG_DEBUG(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 69054727e4a..8159b53741e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -331,7 +331,7 @@ public:
uint32 entry = 0;
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
- sLog->outDebug(LOG_FILTER_TSCR, "npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
++mRiftWaveCount;
@@ -356,7 +356,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
return;
- sLog->outDebug(LOG_FILTER_TSCR, "npc_time_rift: not casting anylonger, i need to die.");
+ TC_LOG_DEBUG(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 78b655bb73b..37b39b3a938 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
@@ -196,7 +196,7 @@ public:
{
if (data == IN_PROGRESS)
{
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Starting event.");
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Starting event.");
InitWorldState();
m_auiEncounter[1] = IN_PROGRESS;
NextPortal_Timer = 15000;
@@ -205,7 +205,7 @@ public:
if (data == DONE)
{
//this may be completed further out in the post-event
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Event completed.");
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Event completed.");
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
@@ -270,7 +270,7 @@ public:
if (entry == RIFT_BOSS)
entry = RandRiftBoss();
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Summoning rift boss entry %u.", entry);
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: Summoning rift boss entry %u.", entry);
Position pos;
me->GetRandomNearPosition(pos, 10.0f);
@@ -281,7 +281,7 @@ public:
if (Creature* summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000))
return summon;
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
return NULL;
}
@@ -294,7 +294,7 @@ public:
if (tmp >= CurrentRiftId)
++tmp;
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", tmp, CurrentRiftId);
+ TC_LOG_DEBUG(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 b69b8b38945..05ce40f500b 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -86,7 +86,7 @@ public:
}
}
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
@@ -126,7 +126,7 @@ public:
if (!player)
{
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
return;
}
@@ -142,7 +142,7 @@ public:
++mBarrelCount;
DoUpdateWorldState(WORLD_STATE_OH, mBarrelCount);
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount);
+ TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount);
m_auiEncounter[0] = IN_PROGRESS;
@@ -163,7 +163,7 @@ public:
{
++mThrallEventCount;
m_auiEncounter[1] = NOT_STARTED;
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount);
+ TC_LOG_DEBUG(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;
@@ -176,29 +176,29 @@ public:
m_auiEncounter[3] = data;
m_auiEncounter[4] = data;
m_auiEncounter[5] = data;
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount);
+ TC_LOG_DEBUG(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, "Instance Old Hillsbrad: Thrall escort event adjusted to data %u.", data);
+ TC_LOG_DEBUG(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, "Instance Old Hillsbrad: Thrall event part I adjusted to data %u.", data);
+ TC_LOG_DEBUG(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, "Instance Old Hillsbrad: Thrall event part II adjusted to data %u.", data);
+ TC_LOG_DEBUG(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, "Instance Old Hillsbrad: Thrall event part III adjusted to data %u.", data);
+ TC_LOG_DEBUG(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, "Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.", data);
+ TC_LOG_DEBUG(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 e661ce42198..b374ed47d55 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -65,7 +65,7 @@ public:
return player;
}
}
- sLog->outDebug(LOG_FILTER_TSCR, "Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
+ TC_LOG_DEBUG(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 e6460c00ab6..cd1f5c1befa 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -162,7 +162,7 @@ public:
{
instance = creature->GetInstanceScript();
if (!instance)
- sLog->outError(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI");
+ TC_LOG_ERROR(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI");
SetCombatMovement(false);
}
@@ -470,7 +470,7 @@ public:
instance = creature->GetInstanceScript();
if (!instance)
- sLog->outError(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI");
+ TC_LOG_ERROR(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI");
}
InstanceScript* instance;
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index 5b6993dfef0..cb5c36e4412 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -553,7 +553,7 @@ public:
}
}
else
- sLog->outError(LOG_FILTER_TSCR, "SD2 ERROR: FlagList is empty!");
+ TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: FlagList is empty!");
}
void UpdateAI(uint32 diff)