Cleanup of logging - removed a few duplicit functions from olden times, fixed a typo.

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-06-22 02:53:04 +02:00
parent 06ef6e2553
commit c9b20170a3
55 changed files with 216 additions and 296 deletions
@@ -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;
@@ -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;
}
@@ -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)
{
@@ -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)
@@ -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;
@@ -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;
}
}
@@ -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;
}
@@ -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;
@@ -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)