aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp8
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp36
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp20
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedInstance.h10
-rw-r--r--src/server/game/Instances/InstanceData.cpp8
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp54
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp66
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.h2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp2
-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/azuremyst_isle.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp2
-rw-r--r--src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp8
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp16
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp6
-rw-r--r--src/server/scripts/Outland/hellfire_peninsula.cpp2
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp2
-rw-r--r--src/server/scripts/World/go_scripts.cpp2
-rw-r--r--src/server/scripts/World/item_scripts.cpp2
-rw-r--r--src/server/scripts/World/npc_professions.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp8
-rw-r--r--src/server/shared/Logging/Log.cpp76
-rw-r--r--src/server/shared/Logging/Log.h6
55 files changed, 216 insertions, 296 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index a10d576e309..9ab9e06b624 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -153,7 +153,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId)
if (!GetSoundEntriesStore()->LookupEntry(uiSoundId))
{
- error_log("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow());
+ sLog.outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow());
return;
}
@@ -398,7 +398,7 @@ void ScriptedAI::DoResetThreat()
{
if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty())
{
- error_log("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
+ sLog.outError("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
return;
}
@@ -441,7 +441,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo
if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER)
{
if (pUnit)
- error_log("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
+ sLog.outError("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
return;
}
@@ -578,7 +578,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
return false;
break;
default:
- error_log("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", me->GetEntry());
+ sLog.outError("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", me->GetEntry());
return false;
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 217dd066310..0549858d1c7 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -177,7 +177,7 @@ void npc_escortAI::EnterEvadeMode()
{
AddEscortState(STATE_ESCORT_RETURNING);
ReturnToLastPoint();
- debug_log("TSCR: EscortAI has left combat and is now returning to last point");
+ sLog.outDebug("TSCR: EscortAI has left combat and is now returning to last point");
}
else
{
@@ -224,7 +224,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
{
if (DespawnAtEnd)
{
- debug_log("TSCR: EscortAI reached end of waypoints");
+ sLog.outDebug("TSCR: EscortAI reached end of waypoints");
if (m_bCanReturnToStart)
{
@@ -235,7 +235,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
m_uiWPWaitTimer = 0;
- debug_log("TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
+ sLog.outDebug("TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
return;
}
@@ -251,7 +251,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
}
else
{
- debug_log("TSCR: EscortAI reached end of waypoints with Despawn off");
+ sLog.outDebug("TSCR: EscortAI reached end of waypoints with Despawn off");
return;
}
@@ -260,7 +260,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
if (!HasEscortState(STATE_ESCORT_PAUSED))
{
me->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
- debug_log("TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
+ sLog.outDebug("TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
WaypointStart(CurrentWP->id);
@@ -278,7 +278,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
{
if (DespawnAtFar && !IsPlayerOrGroupInRange())
{
- debug_log("TSCR: EscortAI failed because player/group was to far away or not found");
+ sLog.outDebug("TSCR: EscortAI failed because player/group was to far away or not found");
if (m_bCanInstantRespawn)
{
@@ -316,7 +316,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)
//Combat start position reached, continue waypoint movement
if (uiPointId == POINT_LAST_POINT)
{
- debug_log("TSCR: EscortAI has returned to original position before combat");
+ sLog.outDebug("TSCR: EscortAI has returned to original position before combat");
if (m_bIsRunning && me->HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
@@ -330,7 +330,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)
}
else if (uiPointId == POINT_HOME)
{
- debug_log("TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list.");
+ sLog.outDebug("TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list.");
CurrentWP = WaypointList.begin();
m_uiWPWaitTimer = 1;
@@ -340,11 +340,11 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)
//Make sure that we are still on the right waypoint
if (CurrentWP->id != uiPointId)
{
- error_log("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", uiPointId, CurrentWP->id, me->GetEntry());
+ sLog.outError("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", uiPointId, CurrentWP->id, me->GetEntry());
return;
}
- debug_log("TSCR: EscortAI Waypoint %u reached", CurrentWP->id);
+ sLog.outDebug("TSCR: EscortAI Waypoint %u reached", CurrentWP->id);
//Call WP function
WaypointReached(CurrentWP->id);
@@ -415,14 +415,14 @@ void npc_escortAI::SetRun(bool bRun)
if (!m_bIsRunning)
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
else
- debug_log("TSCR: EscortAI attempt to set run mode, but is already running.");
+ sLog.outDebug("TSCR: EscortAI attempt to set run mode, but is already running.");
}
else
{
if (m_bIsRunning)
me->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
else
- debug_log("TSCR: EscortAI attempt to set walk mode, but is already walking.");
+ sLog.outDebug("TSCR: EscortAI attempt to set walk mode, but is already walking.");
}
m_bIsRunning = bRun;
}
@@ -432,13 +432,13 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
{
if (me->getVictim())
{
- error_log("TSCR ERROR: EscortAI attempt to Start while in combat. Scriptname: %s, creature entry: %u", me->GetScriptName().c_str(), me->GetEntry());
+ sLog.outError("TSCR ERROR: EscortAI attempt to Start while in combat. Scriptname: %s, creature entry: %u", me->GetScriptName().c_str(), me->GetEntry());
return;
}
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
- error_log("TSCR: EscortAI attempt to Start while already escorting.");
+ sLog.outError("TSCR: EscortAI attempt to Start while already escorting.");
return;
}
@@ -454,7 +454,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
if (WaypointList.empty())
{
- error_db_log("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest ? pQuest->GetQuestId() : 0);
+ sLog.outErrorDb("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest ? pQuest->GetQuestId() : 0);
return;
}
@@ -469,19 +469,19 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
m_bCanReturnToStart = bCanLoopPath;
if (m_bCanReturnToStart && m_bCanInstantRespawn)
- debug_log("TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
+ sLog.outDebug("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();
- debug_log("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
+ sLog.outDebug("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
}
//disable npcflags
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
- debug_log("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
+ sLog.outDebug("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
CurrentWP = WaypointList.begin();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index b4a51f9eb27..6147edac45c 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -164,7 +164,7 @@ void FollowerAI::EnterEvadeMode()
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- debug_log("TSCR: FollowerAI left combat, returning to CombatStartPosition.");
+ sLog.outDebug("TSCR: FollowerAI left combat, returning to CombatStartPosition.");
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
{
@@ -190,7 +190,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT))
{
- debug_log("TSCR: FollowerAI is set completed, despawns.");
+ sLog.outDebug("TSCR: FollowerAI is set completed, despawns.");
me->ForcedDespawn();
return;
}
@@ -201,7 +201,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_RETURNING))
{
- debug_log("TSCR: FollowerAI is returning to leader.");
+ sLog.outDebug("TSCR: FollowerAI is returning to leader.");
RemoveFollowState(STATE_FOLLOW_RETURNING);
me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
@@ -230,7 +230,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
if (bIsMaxRangeExceeded)
{
- debug_log("TSCR: FollowerAI failed because player/group was to far away or not found");
+ sLog.outDebug("TSCR: FollowerAI failed because player/group was to far away or not found");
me->ForcedDespawn();
return;
}
@@ -273,13 +273,13 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
{
if (me->getVictim())
{
- debug_log("TSCR: FollowerAI attempt to StartFollow while in combat.");
+ sLog.outDebug("TSCR: FollowerAI attempt to StartFollow while in combat.");
return;
}
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- error_log("TSCR: FollowerAI attempt to StartFollow while already following.");
+ sLog.outError("TSCR: FollowerAI attempt to StartFollow while already following.");
return;
}
@@ -295,7 +295,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
- debug_log("TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
+ sLog.outDebug("TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
}
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
@@ -304,7 +304,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
me->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
- debug_log("TSCR: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID);
+ sLog.outDebug("TSCR: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID);
}
Player* FollowerAI::GetLeaderForFollower()
@@ -323,7 +323,7 @@ Player* FollowerAI::GetLeaderForFollower()
if (pMember && pMember->isAlive() && me->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE))
{
- debug_log("TSCR: FollowerAI GetLeader changed and returned new leader.");
+ sLog.outDebug("TSCR: FollowerAI GetLeader changed and returned new leader.");
m_uiLeaderGUID = pMember->GetGUID();
return pMember;
break;
@@ -333,7 +333,7 @@ Player* FollowerAI::GetLeaderForFollower()
}
}
- debug_log("TSCR: FollowerAI GetLeader can not find suitable leader.");
+ sLog.outDebug("TSCR: FollowerAI GetLeader can not find suitable leader.");
return NULL;
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedInstance.h b/src/server/game/AI/ScriptedAI/ScriptedInstance.h
index 25593e05300..8a9b8c4c5a3 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedInstance.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedInstance.h
@@ -8,11 +8,11 @@
#include "InstanceData.h"
#include "Map.h"
-#define OUT_SAVE_INST_DATA debug_log("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
-#define OUT_SAVE_INST_DATA_COMPLETE debug_log("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) debug_log("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 debug_log("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 error_log("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("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("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("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("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 ScriptedInstance InstanceData
diff --git a/src/server/game/Instances/InstanceData.cpp b/src/server/game/Instances/InstanceData.cpp
index 5392ad4cbd1..7408efe97e5 100644
--- a/src/server/game/Instances/InstanceData.cpp
+++ b/src/server/game/Instances/InstanceData.cpp
@@ -43,7 +43,7 @@ void InstanceData::HandleGameObject(uint64 GUID, bool open, GameObject *go)
if (go)
go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
else
- debug_log("TSCR: InstanceData: HandleGameObject failed");
+ sLog.outDebug("TSCR: InstanceData: HandleGameObject failed");
}
bool InstanceData::IsEncounterInProgress() const
@@ -263,7 +263,7 @@ void InstanceData::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bo
pGo->ResetDoorOrButton();
}
else
- error_log("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType());
+ sLog.outError("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType());
}
}
@@ -294,7 +294,7 @@ void InstanceData::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
pPlayer->SendUpdateWorldState(uiStateId, uiStateData);
}
else
- debug_log("TSCR: DoUpdateWorldState attempt send data but no players in map.");
+ sLog.outDebug("TSCR: DoUpdateWorldState attempt send data but no players in map.");
}
// Send Notify to all players in instance
@@ -318,7 +318,7 @@ void InstanceData::DoCompleteAchievement(uint32 achievement)
if (!pAE)
{
- error_log("TSCR: DoCompleteAchievement called for not existing achievement %u", achievement);
+ sLog.outError("TSCR: DoCompleteAchievement called for not existing achievement %u", achievement);
return;
}
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index b41f6a215f8..88e5b7284c0 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -45,22 +45,22 @@ ScriptMgr::~ScriptMgr()
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
- /*outstring_log(" _____ _ _ _ ____ _ _");
- outstring_log("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
- outstring_log(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
- outstring_log(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
- outstring_log(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
- outstring_log(" |___/ |_| ");
- outstring_log("");
- outstring_log("");*/
+ /*sLog.outString(" _____ _ _ _ ____ _ _");
+ sLog.outString("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
+ sLog.outString(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
+ sLog.outString(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
+ sLog.outString(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
+ sLog.outString(" |___/ |_| ");
+ sLog.outString("");
+ sLog.outString("");*/
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
- outstring_log("Loading C++ scripts");
+ sLog.outString("Loading C++ scripts");
barGoLink bar(1);
bar.step();
- outstring_log("");
+ sLog.outString("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
@@ -69,9 +69,9 @@ void ScriptMgr::ScriptsInit()
AddScripts();
- outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
+ sLog.outString(">> Loaded %i C++ Scripts.", num_sc_scripts);
- outstring_log(">> Load Overriden SQL Data.");
+ sLog.outString(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
@@ -82,13 +82,13 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
{
if (!pSource)
{
- error_log("TSCR: DoScriptText entry %i, invalid Source pointer.", iTextEntry);
+ sLog.outError("TSCR: DoScriptText entry %i, invalid Source pointer.", iTextEntry);
return;
}
if (iTextEntry >= 0)
{
- error_log("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("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;
}
@@ -96,11 +96,11 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (!pData)
{
- error_log("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("TSCR: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
return;
}
- debug_log("TSCR: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote);
+ sLog.outDebug("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)
{
@@ -109,7 +109,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
pSource->SendPlaySound(pData->uiSoundId, false);
}
else
- error_log("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId);
+ sLog.outError("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId);
}
if (pData->uiEmote)
@@ -117,7 +117,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote);
else
- error_log("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId());
+ sLog.outError("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId());
}
switch(pData->uiType)
@@ -139,7 +139,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID());
else
- error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
+ sLog.outError("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
}
break;
case CHAT_TYPE_BOSS_WHISPER:
@@ -147,7 +147,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID(), true);
else
- error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
+ sLog.outError("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
}
break;
case CHAT_TYPE_ZONE_YELL:
@@ -165,7 +165,7 @@ void Script::RegisterSelf()
// somebody forgot to allocate memory for a script by a method like this: newscript = new Script
if (m_scripts[i] == this)
{
- error_log("ScriptName: '%s' - Forgot to allocate memory, so this script and/or the script before that can't work.", Name.c_str());
+ sLog.outError("ScriptName: '%s' - Forgot to allocate memory, so this script and/or the script before that can't work.", Name.c_str());
// don't register it
// and don't delete it because its memory is used for another script
return;
@@ -200,14 +200,14 @@ void Script::RegisterSelf()
else
{
// TODO: write a better error message than this one :)
- error_log("ScriptName: '%s' already assigned with the same ScriptName, so the script can't work.", Name.c_str());
+ sLog.outError("ScriptName: '%s' already assigned with the same ScriptName, so the script can't work.", Name.c_str());
delete this;
}
}
else
{
if (Name.find("example") == std::string::npos)
- error_db_log("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
+ sLog.outErrorDb("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
delete this;
}
}
@@ -326,7 +326,7 @@ bool ScriptMgr::GossipHello (Player * pPlayer, Creature* pCreature)
bool ScriptMgr::GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
- debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipSelect) return false;
@@ -337,7 +337,7 @@ bool ScriptMgr::GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSend
bool ScriptMgr::GossipSelectWithCode(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode)
{
- debug_log("TSCR: Gossip selection with code, sender: %d, action: %d", uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection with code, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false;
@@ -350,7 +350,7 @@ bool ScriptMgr::GOSelect(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint
{
if (!pGO)
return false;
- debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOSelect) return false;
@@ -363,7 +363,7 @@ bool ScriptMgr::GOSelectWithCode(Player* pPlayer, GameObject* pGO, uint32 uiSend
{
if (!pGO)
return false;
- debug_log("TSCR: Gossip selection, sender: %d, action: %d",uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection, sender: %d, action: %d",uiSender, uiAction);
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOSelectWithCode) return false;
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index fcd5c81add4..54a14228bc1 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -43,24 +43,24 @@ void SystemMgr::LoadVersion()
{
Field* pFields = Result->Fetch();
- outstring_log("TSCR: Database version is: %s", pFields[0].GetString());
- outstring_log("");
+ sLog.outString("TSCR: Database version is: %s", pFields[0].GetString());
+ sLog.outString("");
}
else
{
- error_log("TSCR: Missing `version`.`script_version` information.");
- outstring_log("");
+ sLog.outError("TSCR: Missing `version`.`script_version` information.");
+ sLog.outString("");
}
}
void SystemMgr::LoadScriptTexts()
{
- outstring_log("TSCR: Loading Script Texts...");
+ sLog.outString("TSCR: Loading Script Texts...");
LoadTrinityStrings(WorldDatabase,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2));
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM script_texts");
- outstring_log("TSCR: Loading Script Texts additional data...");
+ sLog.outString("TSCR: Loading Script Texts additional data...");
if (Result)
{
@@ -81,52 +81,52 @@ void SystemMgr::LoadScriptTexts()
if (iId >= 0)
{
- error_db_log("TSCR: Entry %i in table `script_texts` is not a negative value.", iId);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` is not a negative value.", iId);
continue;
}
if (iId > TEXT_SOURCE_RANGE || iId <= TEXT_SOURCE_RANGE*2)
{
- error_db_log("TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId);
continue;
}
if (pTemp.uiSoundId)
{
if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId))
- error_db_log("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
}
if (!GetLanguageDescByID(pTemp.uiLanguage))
- error_db_log("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
if (pTemp.uiType > CHAT_TYPE_ZONE_YELL)
- error_db_log("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
m_mTextDataMap[iId] = pTemp;
++uiCount;
} while (Result->NextRow());
- outstring_log("");
- outstring_log(">> Loaded %u additional Script Texts data.", uiCount);
+ sLog.outString("");
+ sLog.outString(">> Loaded %u additional Script Texts data.", uiCount);
}
else
{
barGoLink bar(1);
bar.step();
- outstring_log("");
- outstring_log(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
+ sLog.outString("");
+ sLog.outString(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
}
}
void SystemMgr::LoadScriptTextsCustom()
{
- outstring_log("TSCR: Loading Custom Texts...");
+ sLog.outString("TSCR: Loading Custom Texts...");
LoadTrinityStrings(WorldDatabase,"custom_texts",TEXT_SOURCE_RANGE*2,1+(TEXT_SOURCE_RANGE*3));
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts");
- outstring_log("TSCR: Loading Custom Texts additional data...");
+ sLog.outString("TSCR: Loading Custom Texts additional data...");
if (Result)
{
@@ -147,41 +147,41 @@ void SystemMgr::LoadScriptTextsCustom()
if (iId >= 0)
{
- error_db_log("TSCR: Entry %i in table `custom_texts` is not a negative value.", iId);
+ sLog.outErrorDb("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)
{
- error_db_log("TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId);
continue;
}
if (pTemp.uiSoundId)
{
if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId))
- error_db_log("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
}
if (!GetLanguageDescByID(pTemp.uiLanguage))
- error_db_log("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
if (pTemp.uiType > CHAT_TYPE_ZONE_YELL)
- error_db_log("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
m_mTextDataMap[iId] = pTemp;
++uiCount;
} while (Result->NextRow());
- outstring_log("");
- outstring_log(">> Loaded %u additional Custom Texts data.", uiCount);
+ sLog.outString("");
+ sLog.outString(">> Loaded %u additional Custom Texts data.", uiCount);
}
else
{
barGoLink bar(1);
bar.step();
- outstring_log("");
- outstring_log(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
+ sLog.outString("");
+ sLog.outString(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
}
}
@@ -197,7 +197,7 @@ void SystemMgr::LoadScriptWaypoints()
if (Result)
uiCreatureCount = Result->GetRowCount();
- outstring_log("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
+ sLog.outString("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
Result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
@@ -224,25 +224,25 @@ void SystemMgr::LoadScriptWaypoints()
if (!pCInfo)
{
- error_db_log("TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", pTemp.uiCreatureEntry);
+ sLog.outErrorDb("TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", pTemp.uiCreatureEntry);
continue;
}
if (!pCInfo->ScriptID)
- error_db_log("TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.uiCreatureEntry);
+ sLog.outErrorDb("TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.uiCreatureEntry);
m_mPointMoveMap[uiEntry].push_back(pTemp);
++uiNodeCount;
} while (Result->NextRow());
- outstring_log("");
- outstring_log(">> Loaded %u Script Waypoint nodes.", uiNodeCount);
+ sLog.outString("");
+ sLog.outString(">> Loaded %u Script Waypoint nodes.", uiNodeCount);
}
else
{
barGoLink bar(1);
bar.step();
- outstring_log("");
- outstring_log(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
+ sLog.outString("");
+ sLog.outString(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index 09ed6a1c4b0..a27f28e8d9c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -214,7 +214,7 @@ struct npc_grimstoneAI : public npc_escortAI
if (pInstance)
{
pInstance->SetData(TYPE_RING_OF_LAW,DONE);
- debug_log("TSCR: npc_grimstone: event reached end and set complete.");
+ sLog.outDebug("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 6c865ee214d..3dd048ce449 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
@@ -207,7 +207,7 @@ struct instance_blackrock_depths : public ScriptedInstance
void SetData64(uint32 type, uint64 data)
{
- debug_log("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
+ sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
switch(type)
{
@@ -223,7 +223,7 @@ struct instance_blackrock_depths : public ScriptedInstance
void SetData(uint32 type, uint32 data)
{
- debug_log("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
+ sLog.outDebug("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 74d118033c6..b079dd94a58 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
@@ -312,7 +312,7 @@ struct boss_victor_nefariusAI : public ScriptedAI
Nefarian->setFaction(103);
NefarianGUID = Nefarian->GetGUID();
}
- else error_log("TSCR: Blackwing Lair: Unable to spawn nefarian properly.");
+ else sLog.outError("TSCR: Blackwing Lair: Unable to spawn nefarian properly.");
}
AddSpawnTimer = 4000;
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 19bf7d235ed..e7c26491cb0 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -534,7 +534,7 @@ CreatureAI* GetAI_water_elemental(Creature* pCreature)
// CONVERT TO ACID
CreatureAI* GetAI_shadow_of_aran(Creature* pCreature)
{
- outstring_log("TSCR: Convert simpleAI script for Creature Entry %u to ACID", pCreature->GetEntry());
+ sLog.outString("TSCR: Convert simpleAI script for Creature Entry %u to ACID", pCreature->GetEntry());
SimpleAI* ai = new SimpleAI (pCreature);
ai->Spell[0].Enabled = true;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 11e87b9e82e..bf4db4d9d01 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1154,7 +1154,7 @@ void boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
if (Phase == PHASE_ROMULO)
{
- error_log("TSCR: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
+ sLog.outError("TSCR: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
damage = 0;
return;
}
@@ -1188,7 +1188,7 @@ void boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
return;
}
}
- error_log("TSCR: boss_julianneAI: DamageTaken reach end of code, that should not happen.");
+ sLog.outError("TSCR: boss_julianneAI: DamageTaken reach end of code, that should not happen.");
}
void boss_romuloAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
@@ -1242,7 +1242,7 @@ void boss_romuloAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
}
}
- error_log("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen.");
+ sLog.outError("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen.");
}
void boss_julianneAI::UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 321a65c2544..a388600b51d 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -220,7 +220,7 @@ struct npc_barnesAI : public npc_escortAI
void PrepareEncounter()
{
- debug_log("TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
+ sLog.outDebug("TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
uint8 index = 0;
uint8 count = 0;
@@ -371,17 +371,17 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 /*uiSe
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_OZ;
- outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
+ sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_HOOD;
- outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
+ sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_RAJ;
- outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
+ sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
break;
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
index 56a6b106332..86562fd06df 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
@@ -48,6 +48,6 @@ enum OperaEvents
EVENT_RAJ = 3
};
-#define ERROR_INST_DATA(a) error_log("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("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 7dc8db7ce15..15be0f2f87a 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -63,7 +63,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
for (uint8 i = 0; i < size; ++i)
{
uint64 guid = pInstance->GetData64(DATA_FEL_CRYSTAL);
- debug_log("TSCR: Selin: Adding Fel Crystal %u to list", guid);
+ sLog.outDebug("TSCR: Selin: Adding Fel Crystal %u to list", guid);
Crystals.push_back(guid);
}
}
@@ -108,7 +108,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
// Small door opened after event are expected to be closed by default
// Set Inst data for encounter
pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
DrainLifeTimer = 3000 + rand()%4000;
DrainManaTimer = DrainLifeTimer + 5000;
@@ -208,7 +208,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
else
{
// Make an error message in case something weird happened here
- error_log("TSCR: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
+ sLog.outError("TSCR: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
DrainingCrystal = false;
}
}
@@ -340,7 +340,7 @@ struct mob_fel_crystalAI : public ScriptedAI
}
}
}
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(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 715261f8239..ff8b0b88786 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -169,7 +169,7 @@ struct instance_magisters_terrace : public ScriptedInstance
{
if (FelCrystals.empty())
{
- error_log("TSCR: Magisters Terrace: No Fel Crystals loaded in Inst Data");
+ sLog.outError("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 f801f7e872e..9dcfc4ad459 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -199,7 +199,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
anchorGUID = anchor->GetGUID();
}
else
- error_log("npc_unworthy_initiateAI: unable to find anchor!");
+ sLog.outError("npc_unworthy_initiateAI: unable to find anchor!");
float dist = 99.0f;
GameObject *prison = NULL;
@@ -219,7 +219,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
if (prison)
prison->ResetDoorOrButton();
else
- error_log("npc_unworthy_initiateAI: unable to find prison!");
+ sLog.outError("npc_unworthy_initiateAI: unable to find prison!");
}
return;
case PHASE_TO_EQUIP:
@@ -230,7 +230,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
else
{
me->GetMotionMaster()->MovePoint(1, anchorX, anchorY, me->GetPositionZ());
- //debug_log("npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
+ //sLog.outDebug("npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
phase = PHASE_EQUIPING;
wait_timer = 0;
}
@@ -989,9 +989,9 @@ bool GOHello_go_inconspicuous_mine_car(Player* pPlayer, GameObject* /*pGO*/)
{
car->AI()->SetGUID(miner->GetGUID());
CAST_AI(npc_scarlet_minerAI, miner->AI())->InitCartQuest(pPlayer);
- } else error_log("TSCR: GOHello_go_inconspicuous_mine_car vehicle entry is not correct.");
- } else error_log("TSCR: GOHello_go_inconspicuous_mine_car player is not on the vehicle.");
- } else error_log("TSCR: GOHello_go_inconspicuous_mine_car Scarlet Miner cant be found by script.");
+ } else sLog.outError("TSCR: GOHello_go_inconspicuous_mine_car vehicle entry is not correct.");
+ } else sLog.outError("TSCR: GOHello_go_inconspicuous_mine_car player is not on the vehicle.");
+ } else sLog.outError("TSCR: GOHello_go_inconspicuous_mine_car 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 191be16cd19..ce5794237f1 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -112,7 +112,7 @@ struct instance_stratholme : public ScriptedInstance
return true;
}
- debug_log("TSCR: Instance Stratholme: Cannot open slaugther square yet.");
+ sLog.outDebug("TSCR: Instance Stratholme: Cannot open slaugther square yet.");
return false;
}
@@ -208,7 +208,7 @@ struct instance_stratholme : public ScriptedInstance
break;
Encounter[0] = data;
BaronRun_Timer = 2700000;
- debug_log("TSCR: Instance Stratholme: Baron run in progress.");
+ sLog.outDebug("TSCR: Instance Stratholme: Baron run in progress.");
break;
case FAIL:
//may add code to remove aura from players, but in theory the time should be up already and removed.
@@ -266,10 +266,10 @@ struct instance_stratholme : public ScriptedInstance
//UpdateGoState(ziggurat4GUID,0,true);
if (Creature* pBaron = instance->GetCreature(baronGUID))
pBaron->SummonCreature(C_RAMSTEIN,4032.84,-3390.24,119.73,4.71,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000);
- debug_log("TSCR: Instance Stratholme: Ramstein spawned.");
+ sLog.outDebug("TSCR: Instance Stratholme: Ramstein spawned.");
}
else
- debug_log("TSCR: Instance Stratholme: %u Abomnation left to kill.",count);
+ sLog.outDebug("TSCR: Instance Stratholme: %u Abomnation left to kill.",count);
}
if (data == NOT_STARTED)
@@ -278,7 +278,7 @@ struct instance_stratholme : public ScriptedInstance
if (data == DONE)
{
SlaugtherSquare_Timer = 300000;
- debug_log("TSCR: Instance Stratholme: Slaugther event will continue in 5 minutes.");
+ sLog.outDebug("TSCR: Instance Stratholme: Slaugther event will continue in 5 minutes.");
}
Encounter[4] = data;
break;
@@ -419,7 +419,7 @@ struct instance_stratholme : public ScriptedInstance
if (GetData(TYPE_BARON_RUN) != DONE)
SetData(TYPE_BARON_RUN, FAIL);
BaronRun_Timer = 0;
- debug_log("TSCR: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN));
+ sLog.outDebug("TSCR: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN));
} else BaronRun_Timer -= diff;
}
@@ -434,7 +434,7 @@ struct instance_stratholme : public ScriptedInstance
HandleGameObject(ziggurat4GUID, true);
HandleGameObject(ziggurat5GUID, true);
- debug_log("TSCR: Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
+ sLog.outDebug("TSCR: Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
}
SlaugtherSquare_Timer = 0;
} else SlaugtherSquare_Timer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
index 52ded56c5ae..2bf2967c914 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
@@ -143,7 +143,7 @@ struct boss_brutallusAI : public ScriptedAI
{
if (!Intro || IsIntro)
return;
- error_log("Start Intro");
+ sLog.outError("Start Intro");
Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
if (Madrigosa)
{
@@ -158,7 +158,7 @@ struct boss_brutallusAI : public ScriptedAI
}else
{
//Madrigosa not found, end intro
- error_log("Madrigosa was not found");
+ sLog.outError("Madrigosa was not found");
EndIntro();
}
}
@@ -168,7 +168,7 @@ struct boss_brutallusAI : public ScriptedAI
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Intro = false;
IsIntro = false;
- error_log("End Intro");
+ sLog.outError("End Intro");
}
void AttackStart(Unit* pWho)
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 3c1ae1a1723..c41b213bd6a 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -260,7 +260,7 @@ struct boss_kalecgosAI : public ScriptedAI
}
else
{
- error_log("TSCR: Didn't find Shathrowar. Kalecgos event reseted.");
+ sLog.outError("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 7bd3273d9f2..d80153c14f5 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -727,7 +727,7 @@ struct boss_kiljaedenAI : public Scripted_NoMovementAI
if (pRandomPlayer)
DoCast(pRandomPlayer, SPELL_LEGION_LIGHTNING, false);
else
- error_log("try to cast SPELL_LEGION_LIGHTNING on invalid target");
+ sLog.outError("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;
@@ -1341,7 +1341,7 @@ struct mob_sinster_reflectionAI : public ScriptedAI
DoMeleeAttackIfReady();
break;
}
- debug_log("Sinister-Timer");
+ sLog.outDebug("Sinister-Timer");
for (uint8 i = 0; i < 3; ++i)
uiTimer[i] -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index 5ad630840ea..12e94c2f33d 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -110,7 +110,7 @@ struct instance_sunwell_plateau : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index 3641f901453..957dbec7ba5 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -436,7 +436,7 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* /*pGo*/)
//if (altarOfTheKeeperCounter < NUMBER_NEEDED_TO_ACTIVATE)
//{
- //error_log("not enough people yet, altarOfTheKeeperCounter = %d", altarOfTheKeeperCounter);
+ //sLog.outError("not enough people yet, altarOfTheKeeperCounter = %d", altarOfTheKeeperCounter);
// return false; // not enough people yet
//}
/*
@@ -446,7 +446,7 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* /*pGo*/)
for (uint8 x = 0; x < 5; ++x)
{
pTarget = Unit::GetUnit(*pPlayer, altarOfTheKeeperCount[x]);
- //error_log("number of people currently activating it: %d", x+1);
+ //sLog.outError("number of people currently activating it: %d", x+1);
if (!pTarget)
continue;
if (pTarget->IsNonMeleeSpellCasted(true))
@@ -457,11 +457,11 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* /*pGo*/)
if (count < NUMBER_NEEDED_TO_ACTIVATE)
{
- //error_log("still not enough people");
+ //sLog.outError("still not enough people");
return true; // not enough people
}
*/
- //error_log ("activating stone keepers");
+ //sLog.outError ("activating stone keepers");
pInstance->SetData(NULL,1); // activate the Stone Keepers
return true;
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index 9720d6caa79..f09f9268395 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -215,7 +215,7 @@ struct instance_uldaman : public ScriptedInstance
void SetData (uint32 /*type*/, uint32 data)
{
- //error_log ("SetData: data = %d", data);
+ //sLog.outError ("SetData: data = %d", data);
if (data == 0) OpenDoor (altarOfTheKeeperTempleDoor);
if (data == 0) OpenDoor (archaedasTempleDoor);
if (data == 3) OpenDoor (ancientVaultDoor);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index 64ad50ea70f..9ab4937163a 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -242,7 +242,7 @@ struct boss_janalaiAI : public ScriptedAI
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
- //error_log("Eggs %d at middle", templist.size());
+ //sLog.outError("Eggs %d at middle", templist.size());
if (!templist.size())
return false;
@@ -508,7 +508,7 @@ struct mob_amanishi_hatcherAI : public ScriptedAI
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
- //error_log("Eggs %d at %d", templist.size(), side);
+ //sLog.outError("Eggs %d at %d", templist.size(), side);
for (std::list<Creature*>::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 4758faf1ddf..1f74fdf4d7f 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -172,7 +172,7 @@ struct instance_zulaman : public ScriptedInstance
ss << "S " << BossKilled << " " << ChestLooted << " " << QuestMinute;
char* data = new char[ss.str().length()+1];
strcpy(data, ss.str().c_str());
- //error_log("TSCR: Zul'aman saved, %s.", data);
+ //sLog.outError("TSCR: Zul'aman saved, %s.", data);
return data;
}
@@ -180,17 +180,17 @@ struct instance_zulaman : public ScriptedInstance
{
if (!load) return;
std::istringstream ss(load);
- //error_log("TSCR: Zul'aman loaded, %s.", ss.str().c_str());
+ //sLog.outError("TSCR: Zul'aman loaded, %s.", ss.str().c_str());
char dataHead; // S
uint16 data1, data2, data3;
ss >> dataHead >> data1 >> data2 >> data3;
- //error_log("TSCR: Zul'aman loaded, %d %d %d.", data1, data2, data3);
+ //sLog.outError("TSCR: Zul'aman loaded, %d %d %d.", data1, data2, data3);
if (dataHead == 'S')
{
BossKilled = data1;
ChestLooted = data2;
QuestMinute = data3;
- } else error_log("TSCR: Zul'aman: corrupted save data.");
+ } else sLog.outError("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 ecc458c19c5..a309028b67d 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -170,7 +170,7 @@ struct boss_arlokkAI : public ScriptedAI
MarkedTargetGUID = pMarkedTarget->GetGUID();
}
else
- error_log("TSCR: boss_arlokk could not accuire pMarkedTarget.");
+ sLog.outError("TSCR: boss_arlokk could not accuire pMarkedTarget.");
m_uiMark_Timer = 15000;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index c2c040dc696..a72598c0e7d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -105,7 +105,7 @@ bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uin
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- debug_log("TSCR: HyjalAI - Debug mode has been toggled");
+ sLog.outDebug("TSCR: HyjalAI - Debug mode has been toggled");
break;
}
return true;
@@ -175,7 +175,7 @@ bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 /*uiSe
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- debug_log("TSCR: HyjalAI - Debug mode has been toggled");
+ sLog.outDebug("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 6f12692d164..c329c659419 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -400,7 +400,7 @@ void hyjalAI::Reset()
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
pInstance->SetData(DATA_RESET_TRASH_COUNT, 0);
}
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
//Visibility
DoHide = true;
@@ -531,7 +531,7 @@ void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
if (!pInstance)
{
- error_log(ERROR_INST_DATA);
+ sLog.outError(ERROR_INST_DATA);
return;
}
InfernalCount = 0;//reset infernal count every new wave
@@ -561,7 +561,7 @@ void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
else
{
NextWaveTimer = 15000;
- debug_log("TSCR: HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
+ sLog.outDebug("TSCR: HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
}
}
else
@@ -605,7 +605,7 @@ uint32 hyjalAI::GetInstanceData(uint32 Event)
{
if (pInstance)
return pInstance->GetData(Event);
- else error_log(ERROR_INST_DATA);
+ else sLog.outError(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 07decc11387..54007a11ecd 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -248,7 +248,7 @@ struct instance_mount_hyjal : public ScriptedInstance
break;
}
- debug_log("TSCR: Instance Hyjal: Instance data updated for event %u (Data=%u)",type,data);
+ sLog.outDebug("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 fdeb56f4c54..b31c265575e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -305,7 +305,7 @@ struct npc_time_riftAI : public ScriptedAI
mRiftWaveCount = 0;
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
- debug_log("TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
+ sLog.outDebug("TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
++mRiftWaveCount;
@@ -330,7 +330,7 @@ struct npc_time_riftAI : public ScriptedAI
if (me->IsNonMeleeSpellCasted(false))
return;
- debug_log("TSCR: npc_time_rift: not casting anylonger, i need to die.");
+ sLog.outDebug("TSCR: npc_time_rift: not casting anylonger, i need to die.");
me->setDeathState(JUST_DIED);
if (pInstance->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 a98d5f80eee..58120d6dc55 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
@@ -178,7 +178,7 @@ struct instance_dark_portal : public ScriptedInstance
{
if (data == IN_PROGRESS)
{
- debug_log("TSCR: Instance Dark Portal: Starting event.");
+ sLog.outDebug("TSCR: Instance Dark Portal: Starting event.");
InitWorldState();
m_auiEncounter[1] = IN_PROGRESS;
NextPortal_Timer = 15000;
@@ -187,7 +187,7 @@ struct instance_dark_portal : public ScriptedInstance
if (data == DONE)
{
//this may be completed further out in the post-event
- debug_log("TSCR: Instance Dark Portal: Event completed.");
+ sLog.outDebug("TSCR: Instance Dark Portal: Event completed.");
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
@@ -252,7 +252,7 @@ struct instance_dark_portal : public ScriptedInstance
if (entry == RIFT_BOSS)
entry = RandRiftBoss();
- debug_log("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry);
+ sLog.outDebug("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry);
Position pos;
me->GetRandomNearPosition(pos, 10.0f);
@@ -263,7 +263,7 @@ struct instance_dark_portal : public ScriptedInstance
if (Creature *summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000))
return summon;
- debug_log("TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
+ sLog.outDebug("TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
return NULL;
}
@@ -276,7 +276,7 @@ struct instance_dark_portal : public ScriptedInstance
if (tmp >= CurrentRiftId)
++tmp;
- debug_log("TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId);
+ sLog.outDebug("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 463461dcc1d..c6511af2a65 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -71,7 +71,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
@@ -111,7 +111,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
if (!pPlayer)
{
- debug_log("TSCR: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
return;
}
@@ -127,7 +127,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
++mBarrelCount;
DoUpdateWorldState(WORLD_STATE_OH, mBarrelCount);
- debug_log("TSCR: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u",mBarrelCount);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u",mBarrelCount);
m_auiEncounter[0] = IN_PROGRESS;
@@ -148,7 +148,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
{
++mThrallEventCount;
m_auiEncounter[1] = NOT_STARTED;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
+ sLog.outDebug("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;
@@ -161,29 +161,29 @@ struct instance_old_hillsbrad : public ScriptedInstance
m_auiEncounter[3] = data;
m_auiEncounter[4] = data;
m_auiEncounter[5] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
}
}
else
m_auiEncounter[1] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.",data);
break;
}
case TYPE_THRALL_PART1:
m_auiEncounter[2] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.",data);
break;
case TYPE_THRALL_PART2:
m_auiEncounter[3] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.",data);
break;
case TYPE_THRALL_PART3:
m_auiEncounter[4] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.",data);
break;
case TYPE_THRALL_PART4:
m_auiEncounter[5] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.",data);
+ sLog.outDebug("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 eddf965a99e..7ba2ebd5bc2 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -53,7 +53,7 @@ struct instance_razorfen_kraul : public ScriptedInstance
return plr;
}
}
- debug_log("TSCR: Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("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 9e53596c9fe..44a6409982a 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -168,7 +168,7 @@ struct eye_of_cthunAI : public Scripted_NoMovementAI
{
pInst = c->GetInstanceData();
if (!pInst)
- error_log("TSCR: No Instance eye_of_cthunAI");
+ sLog.outError("TSCR: No Instance eye_of_cthunAI");
}
ScriptedInstance* pInst;
@@ -460,7 +460,7 @@ struct cthunAI : public Scripted_NoMovementAI
pInst = c->GetInstanceData();
if (!pInst)
- error_log("TSCR: No Instance eye_of_cthunAI");
+ sLog.outError("TSCR: No Instance eye_of_cthunAI");
}
ScriptedInstance* pInst;
diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
index 780f1f41f0c..e1a63062439 100644
--- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
@@ -512,7 +512,7 @@ struct npc_geezleAI : public ScriptedAI
else
(*itr)->Respawn();
}
- } else error_log("SD2 ERROR: FlagList is empty!");
+ } else sLog.outError("SD2 ERROR: FlagList is empty!");
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index b815e0172ec..ac774c6512e 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -182,7 +182,7 @@ struct boss_gothikAI : public BossAI
if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD)
{
- error_log("Script Gothik: cannot summon triggers!");
+ sLog.outError("Script Gothik: cannot summon triggers!");
EnterEvadeMode();
return;
}
diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
index c238e55675b..37dbce59c74 100644
--- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
@@ -633,7 +633,7 @@ struct dummy_dragonAI : public ScriptedAI
if (!pInstance || uiType != POINT_MOTION_TYPE)
return;
- debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId);
+ sLog.outDebug("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId);
//if healers messed up the raid and we was already initialized
if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
@@ -790,7 +790,7 @@ struct dummy_dragonAI : public ScriptedAI
me->GetMotionMaster()->MovePoint(m_uiWaypointId,
m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ);
- debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId);
+ sLog.outDebug("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId);
m_uiMoveNextTimer = 0;
}
else
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 67fb0a09755..3e39de32fba 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
@@ -109,7 +109,7 @@ struct instance_utgarde_keep : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("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 9b4ecca6579..f3f754ec296 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
@@ -96,7 +96,7 @@ struct instance_shadow_labyrinth : public ScriptedInstance
if (pCreature->isAlive())
{
++m_uiFelOverseerCount;
- debug_log("TSCR: Shadow Labyrinth: counting %u Fel Overseers.",m_uiFelOverseerCount);
+ sLog.outDebug("TSCR: Shadow Labyrinth: counting %u Fel Overseers.",m_uiFelOverseerCount);
}
break;
}
@@ -113,7 +113,7 @@ struct instance_shadow_labyrinth : public ScriptedInstance
case TYPE_OVERSEER:
if (uiData != DONE)
{
- error_log("TSCR: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE");
+ sLog.outError("TSCR: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE");
return;
}
if (m_uiFelOverseerCount)
@@ -121,11 +121,11 @@ struct instance_shadow_labyrinth : public ScriptedInstance
--m_uiFelOverseerCount;
if (m_uiFelOverseerCount)
- debug_log("TSCR: Shadow Labyrinth: %u Fel Overseers left to kill.",m_uiFelOverseerCount);
+ sLog.outDebug("TSCR: Shadow Labyrinth: %u Fel Overseers left to kill.",m_uiFelOverseerCount);
else
{
m_auiEncounter[1] = DONE;
- debug_log("TSCR: Shadow Labyrinth: TYPE_OVERSEER == DONE");
+ sLog.outDebug("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 590e51d9eab..64fed0967d9 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -2065,7 +2065,7 @@ void boss_illidan_stormrageAI::SummonMaiev()
{
EnterEvadeMode();
me->MonsterTextEmote(EMOTE_UNABLE_TO_SUMMON, 0);
- error_log("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("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 663faceb672..38ce3f2590d 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -276,7 +276,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
GridSearcherSucceeded = true;
}
}
- } else error_log("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
+ } else sLog.outError("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
}
}
@@ -293,13 +293,13 @@ struct boss_shade_of_akamaAI : public ScriptedAI
if (reseting)
return;
- debug_log("TSCR: Increasing Death Count for Shade of Akama encounter");
+ sLog.outDebug("TSCR: Increasing Death Count for Shade of Akama encounter");
++DeathCount;
me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
if (guid)
{
if (Sorcerers.empty())
- error_log("SD2 ERROR: Shade of Akama - attempt to remove guid %u from Sorcerers list but list is already empty", guid);
+ sLog.outError("SD2 ERROR: Shade of Akama - attempt to remove guid %u from Sorcerers list but list is already empty", guid);
else Sorcerers.remove(guid);
}
}
@@ -351,17 +351,17 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
CAST_AI(mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = me->GetGUID();
Channelers.push_back((*itr)->GetGUID());
- debug_log("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
+ sLog.outDebug("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
}
}
- else error_log("SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy");
+ else sLog.outError("SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy");
}
void SetSelectableChannelers()
{
if (Channelers.empty())
{
- error_log("SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy");
+ sLog.outError("SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy");
return;
}
@@ -485,7 +485,7 @@ void mob_ashtongue_channelerAI::JustDied(Unit* /*killer*/)
Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount();
- else error_log("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
+ else sLog.outError("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
}
void mob_ashtongue_sorcererAI::JustDied(Unit* /*killer*/)
@@ -493,7 +493,7 @@ void mob_ashtongue_sorcererAI::JustDied(Unit* /*killer*/)
Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(me->GetGUID());
- else error_log("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
+ else sLog.outError("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
}
struct npc_akamaAI : public ScriptedAI
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 132da7d7bd1..52ccd1c6434 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -143,7 +143,7 @@ struct mob_blood_elf_council_voice_triggerAI : public ScriptedAI
Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW);
Council[2] = pInstance->GetData64(DATA_LADYMALANDE);
Council[3] = pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR);
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
}
void EnterCombat(Unit* /*who*/) {}
@@ -375,7 +375,7 @@ struct boss_illidari_councilAI : public ScriptedAI
}
else
{
- error_log(ERROR_INST_DATA);
+ sLog.outError(ERROR_INST_DATA);
EnterEvadeMode();
return;
}
@@ -423,7 +423,7 @@ struct boss_illidari_councilAI : public ScriptedAI
{
if (!pInstance)
{
- error_log(ERROR_INST_DATA);
+ sLog.outError(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 5af96257887..384c9b32ff8 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -124,7 +124,7 @@ struct instance_black_temple : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Black Temple: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("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 2669c8ed48d..5d60bc7f3e6 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
@@ -119,7 +119,7 @@ struct instance_steam_vault : public ScriptedInstance
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
HandleGameObject(MainChambersDoor, true);
- debug_log("TSCR: Instance Steamvault: Access panel used.");
+ sLog.outDebug("TSCR: Instance Steamvault: Access panel used.");
}
m_auiEncounter[0] = data;
break;
@@ -131,7 +131,7 @@ struct instance_steam_vault : public ScriptedInstance
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
HandleGameObject(MainChambersDoor, true);
- debug_log("TSCR: Instance Steamvault: Access panel used.");
+ sLog.outDebug("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 76425e351cf..500892129c2 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
@@ -51,7 +51,7 @@ struct instance_ramparts : public ScriptedInstance
void SetData(uint32 uiType, uint32 uiData)
{
- debug_log("TSCR: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData);
+ sLog.outDebug("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 276fe844e32..671821d8924 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -356,7 +356,7 @@ struct boss_kaelthasAI : public ScriptedAI
if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3])
{
- error_log("TSCR: Kael'Thas One or more advisors missing, Skipping Phases 1-3");
+ sLog.outError("TSCR: Kael'Thas One or more advisors missing, Skipping Phases 1-3");
DoScriptText(SAY_PHASE4_INTRO2, me);
@@ -678,7 +678,7 @@ struct boss_kaelthasAI : public ScriptedAI
Advisor = Unit::GetCreature((*me), m_auiAdvisorGuid[i]);
if (!Advisor)
- error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
+ sLog.outError("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
else
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(pTarget);
}
@@ -763,7 +763,7 @@ struct boss_kaelthasAI : public ScriptedAI
if (me->getThreatManager().getThreatList().size() >= 2)
for (uint32 i = 0; i < 3; ++i)
{
- debug_log("SD2: Kael'Thas mind control not supported.");
+ sLog.outDebug("SD2: Kael'Thas mind control not supported.");
//DoCast(pUnit, SPELL_MIND_CONTROL);
}
diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp
index bafca52e463..8c3355d5238 100644
--- a/src/server/scripts/Outland/hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/hellfire_peninsula.cpp
@@ -140,7 +140,7 @@ struct npc_ancestral_wolfAI : public npc_escortAI
if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
Start(false, false, pCreature->GetOwner()->GetGUID());
else
- error_log("TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
+ sLog.outError("TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
pCreature->SetSpeed(MOVE_WALK, 1.5f);
Reset();
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index a44839eba90..7c5254cace6 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -463,7 +463,7 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
return true;
}
- debug_log("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
+ sLog.outDebug("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
return false;
}
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index d8dd8c3d391..65e1fc9fb17 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -259,7 +259,7 @@ bool GOHello_go_ethereum_prison(Player *pPlayer, GameObject *pGO)
if (Spell)
pCreature->CastSpell(pPlayer, Spell, false);
else
- error_log("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
+ sLog.outError("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
}
}
}
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index cae4233775b..ccca8ce70af 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -139,7 +139,7 @@ bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, SpellCastTargets
if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300)
return false;
- debug_log("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
+ sLog.outDebug("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
pPlayer->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL,pItem,NULL);
return true;
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 9d33584847b..5acd8472c44 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -238,7 +238,7 @@ bool EquippedOk(Player* pPlayer, uint32 spellId)
if (pItem->GetProto()->RequiredSpell == reqSpell)
{
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
- debug_log("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
+ sLog.outDebug("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
return false;
}
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 86aaac1413b..625f6485fc6 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -123,7 +123,7 @@ struct npc_air_force_botsAI : public ScriptedAI
}
if (!m_pSpawnAssoc)
- error_db_log("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
+ sLog.outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
else
{
CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
@@ -131,7 +131,7 @@ struct npc_air_force_botsAI : public ScriptedAI
if (!spawnedTemplate)
{
m_pSpawnAssoc = NULL;
- error_db_log("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+ sLog.outErrorDb("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
return;
}
}
@@ -150,7 +150,7 @@ struct npc_air_force_botsAI : public ScriptedAI
m_uiSpawnedGUID = pSummoned->GetGUID();
else
{
- error_db_log("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+ sLog.outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
m_pSpawnAssoc = NULL;
}
@@ -787,7 +787,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[rand()%3]; break;
case DOCTOR_HORDE: patientEntry = HordeSoldierId[rand()%3]; break;
default:
- error_log("TSCR: Invalid entry for Triage doctor. Please check your database");
+ sLog.outError("TSCR: Invalid entry for Triage doctor. Please check your database");
return;
}
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index e701e073d5c..0f27400dce2 100644
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -450,7 +450,7 @@ void Log::outCrash(const char * err, ...)
va_list ap;
va_start(ap, err);
- vutf8printf(stdout, err, &ap);
+ vutf8printf(stderr, err, &ap);
va_end(ap);
if (m_colored)
@@ -530,7 +530,6 @@ void Log::outArena(const char * str, ...)
va_end(ap);
fflush(arenaLogFile);
}
- fflush(stdout);
}
void Log::outErrorDb(const char * err, ...)
@@ -902,7 +901,6 @@ void Log::outRemote(const char * str, ...)
va_end(ap);
fflush(raLogfile);
}
- fflush(stdout);
}
void Log::outChat(const char * str, ...)
@@ -930,76 +928,4 @@ void Log::outChat(const char * str, ...)
fflush(chatLogfile);
va_end(ap);
}
- fflush(stdout);
-}
-
-void outstring_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outString(buf);
}
-
-void detail_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outDetail(buf);
-}
-
-void debug_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outDebug(buf);
-}
-
-void error_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outError(buf);
-}
-
-void error_db_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outErrorDb(buf);
-}
-
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index deb6c55e4e0..53ce4e601b5 100644
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -180,11 +180,5 @@ class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ACE_
#define DEBUG_LOG
#endif
-// primary for script library
-void outstring_log(const char * str, ...) ATTR_PRINTF(1,2);
-void detail_log(const char * str, ...) ATTR_PRINTF(1,2);
-void debug_log(const char * str, ...) ATTR_PRINTF(1,2);
-void error_log(const char * str, ...) ATTR_PRINTF(1,2);
-void error_db_log(const char * str, ...) ATTR_PRINTF(1,2);
#endif