aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Events/GameEventMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Events/GameEventMgr.cpp')
-rwxr-xr-xsrc/server/game/Events/GameEventMgr.cpp244
1 files changed, 122 insertions, 122 deletions
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index d5e85d2cf2f..0936275e90c 100755
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -210,8 +210,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
mGameEvent.clear();
- sLog->outErrorDb(">> Loaded 0 game events. DB table `game_event` is empty.");
- sLog->outString();
+ sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 game events. DB table `game_event` is empty.");
+
return;
}
@@ -223,7 +223,7 @@ void GameEventMgr::LoadFromDB()
uint8 event_id = fields[0].GetUInt8();
if (event_id == 0)
{
- sLog->outErrorDb("`game_event` game event entry 0 is reserved and can't be used.");
+ sLog->outError(LOG_FILTER_SQL, "`game_event` game event entry 0 is reserved and can't be used.");
continue;
}
@@ -241,7 +241,7 @@ void GameEventMgr::LoadFromDB()
if (pGameEvent.length == 0 && pGameEvent.state == GAMEEVENT_NORMAL) // length>0 is validity check
{
- sLog->outErrorDb("`game_event` game event id (%i) isn't a world event and has length = 0, thus it can't be used.", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event` game event id (%i) isn't a world event and has length = 0, thus it can't be used.", event_id);
continue;
}
@@ -249,7 +249,7 @@ void GameEventMgr::LoadFromDB()
{
if (!sHolidaysStore.LookupEntry(pGameEvent.holiday_id))
{
- sLog->outErrorDb("`game_event` game event id (%i) have not existed holiday id %u.", event_id, pGameEvent.holiday_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event` game event id (%i) have not existed holiday id %u.", event_id, pGameEvent.holiday_id);
pGameEvent.holiday_id = HOLIDAY_NONE;
}
}
@@ -260,11 +260,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
- sLog->outString("Loading Game Event Saves Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Saves Data...");
{
uint32 oldMSTime = getMSTime();
@@ -273,8 +273,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
+
}
else
{
@@ -287,7 +287,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_save` game event entry (%i) is out of range compared to max event entry in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_save` game event entry (%i) is out of range compared to max event entry in `game_event`", event_id);
continue;
}
@@ -298,7 +298,7 @@ void GameEventMgr::LoadFromDB()
}
else
{
- sLog->outErrorDb("game_event_save includes event save for non-worldevent id %u", event_id);
+ sLog->outError(LOG_FILTER_SQL, "game_event_save includes event save for non-worldevent id %u", event_id);
continue;
}
@@ -306,12 +306,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Prerequisite Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Prerequisite Data...");
{
uint32 oldMSTime = getMSTime();
@@ -319,8 +319,8 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite");
if (!result)
{
- sLog->outString(">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
+
}
else
{
@@ -333,7 +333,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_prerequisite` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_prerequisite` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -342,14 +342,14 @@ void GameEventMgr::LoadFromDB()
uint16 prerequisite_event = fields[1].GetUInt32();
if (prerequisite_event >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_prerequisite` game event prerequisite id (%i) is out of range compared to max event id in `game_event`", prerequisite_event);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_prerequisite` game event prerequisite id (%i) is out of range compared to max event id in `game_event`", prerequisite_event);
continue;
}
mGameEvent[event_id].prerequisite_events.insert(prerequisite_event);
}
else
{
- sLog->outErrorDb("game_event_prerequisiste includes event entry for non-worldevent id %u", event_id);
+ sLog->outError(LOG_FILTER_SQL, "game_event_prerequisiste includes event entry for non-worldevent id %u", event_id);
continue;
}
@@ -357,12 +357,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Creature Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Creature Data...");
{
uint32 oldMSTime = getMSTime();
@@ -372,8 +372,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
+
}
else
{
@@ -389,7 +389,7 @@ void GameEventMgr::LoadFromDB()
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- sLog->outErrorDb("`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -400,12 +400,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event GO Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event GO Data...");
{
uint32 oldMSTime = getMSTime();
@@ -415,8 +415,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
+
}
else
{
@@ -432,7 +432,7 @@ void GameEventMgr::LoadFromDB()
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- sLog->outErrorDb("`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -443,12 +443,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Model/Equipment Change Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Model/Equipment Change Data...");
{
uint32 oldMSTime = getMSTime();
@@ -458,8 +458,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
+
}
else
{
@@ -473,7 +473,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventModelEquip.size())
{
- sLog->outErrorDb("`game_event_model_equip` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_model_equip` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -488,7 +488,7 @@ void GameEventMgr::LoadFromDB()
{
if (!sObjectMgr->GetEquipmentInfo(newModelEquipSet.equipment_id))
{
- sLog->outErrorDb("Table `game_event_model_equip` have creature (Guid: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.",
+ sLog->outError(LOG_FILTER_SQL, "Table `game_event_model_equip` have creature (Guid: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.",
guid, newModelEquipSet.equipment_id);
continue;
}
@@ -500,12 +500,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Quest Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Quest Data...");
{
uint32 oldMSTime = getMSTime();
@@ -514,8 +514,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
+
}
else
{
@@ -530,7 +530,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventCreatureQuests.size())
{
- sLog->outErrorDb("`game_event_creature_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_creature_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -541,12 +541,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event GO Quest Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event GO Quest Data...");
{
uint32 oldMSTime = getMSTime();
@@ -555,8 +555,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
+
}
else
{
@@ -571,7 +571,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventGameObjectQuests.size())
{
- sLog->outErrorDb("`game_event_gameobject_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_gameobject_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -582,12 +582,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Quest Condition Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Quest Condition Data...");
{
uint32 oldMSTime = getMSTime();
@@ -596,8 +596,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
+
}
else
{
@@ -613,7 +613,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_quest_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_quest_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -625,12 +625,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Condition Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Condition Data...");
{
uint32 oldMSTime = getMSTime();
@@ -639,8 +639,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
+
}
else
{
@@ -654,7 +654,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -667,12 +667,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Condition Save Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Condition Save Data...");
{
uint32 oldMSTime = getMSTime();
@@ -681,8 +681,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
+
}
else
{
@@ -696,7 +696,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_condition_save` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_condition_save` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -707,7 +707,7 @@ void GameEventMgr::LoadFromDB()
}
else
{
- sLog->outErrorDb("game_event_condition_save contains not present condition evt id %u cond id %u", event_id, condition);
+ sLog->outError(LOG_FILTER_SQL, "game_event_condition_save contains not present condition evt id %u cond id %u", event_id, condition);
continue;
}
@@ -715,12 +715,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event NPCflag Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event NPCflag Data...");
{
uint32 oldMSTime = getMSTime();
@@ -729,8 +729,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
+
}
else
{
@@ -745,7 +745,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_npcflag` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_npcflag` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -755,12 +755,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Seasonal Quest Relations...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Seasonal Quest Relations...");
{
uint32 oldMSTime = getMSTime();
@@ -769,8 +769,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
+
}
else
{
@@ -784,13 +784,13 @@ void GameEventMgr::LoadFromDB()
if (!sObjectMgr->GetQuestTemplate(questId))
{
- sLog->outErrorDb("`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId);
continue;
}
if (eventEntry >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry);
continue;
}
@@ -799,12 +799,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Vendor Additions Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Vendor Additions Data...");
{
uint32 oldMSTime = getMSTime();
@@ -813,8 +813,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
+
}
else
{
@@ -827,7 +827,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventVendors.size())
{
- sLog->outErrorDb("`game_event_npc_vendor` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_npc_vendor` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -865,12 +865,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Battleground Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Battleground Data...");
{
uint32 oldMSTime = getMSTime();
@@ -879,8 +879,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty.");
+
}
else
{
@@ -893,7 +893,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- sLog->outErrorDb("`game_event_battleground_holiday` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_battleground_holiday` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -903,12 +903,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
- sLog->outString("Loading Game Event Pool Data...");
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Loading Game Event Pool Data...");
{
uint32 oldMSTime = getMSTime();
@@ -918,8 +918,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- sLog->outString(">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
+
}
else
{
@@ -935,13 +935,13 @@ void GameEventMgr::LoadFromDB()
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
{
- sLog->outErrorDb("`game_event_pool` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ sLog->outError(LOG_FILTER_SQL, "`game_event_pool` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
if (!sPoolMgr->CheckPool(entry))
{
- sLog->outErrorDb("Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", entry);
+ sLog->outError(LOG_FILTER_SQL, "Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", entry);
continue;
}
@@ -952,8 +952,8 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- sLog->outString(">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+
}
}
}
@@ -1015,7 +1015,7 @@ void GameEventMgr::StartArenaSeason()
if (!result)
{
- sLog->outError("ArenaSeason (%u) must be an existant Arena Season", season);
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "ArenaSeason (%u) must be an existant Arena Season", season);
return;
}
@@ -1024,13 +1024,13 @@ void GameEventMgr::StartArenaSeason()
if (eventId >= mGameEvent.size())
{
- sLog->outError("EventEntry %u for ArenaSeason (%u) does not exists", eventId, season);
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "EventEntry %u for ArenaSeason (%u) does not exists", eventId, season);
return;
}
StartEvent(eventId, true);
- sLog->outString("Arena Season %u started...", season);
- sLog->outString();
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Arena Season %u started...", season);
+
}
uint32 GameEventMgr::Update() // return the next event delay in ms
@@ -1043,7 +1043,7 @@ uint32 GameEventMgr::Update() // return the next e
{
// must do the activating first, and after that the deactivating
// so first queue it
- //sLog->outErrorDb("Checking event %u", itr);
+ //sLog->outError(LOG_FILTER_SQL, "Checking event %u", itr);
if (CheckOneGameEvent(itr))
{
// if the world event is in NEXTPHASE state, and the time has passed to finish this event, then do so
@@ -1064,14 +1064,14 @@ uint32 GameEventMgr::Update() // return the next e
// changed, save to DB the gameevent state, will be updated in next update cycle
SaveWorldEventStateToDB(itr);
- //sLog->outDebug("GameEvent %u is active", itr->first);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "GameEvent %u is active", itr->first);
// queue for activation
if (!IsActiveEvent(itr))
activate.insert(itr);
}
else
{
- //sLog->outDebug("GameEvent %u is not active", itr->first);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "GameEvent %u is not active", itr->first);
if (IsActiveEvent(itr))
deactivate.insert(itr);
else
@@ -1099,13 +1099,13 @@ uint32 GameEventMgr::Update() // return the next e
nextEventDelay = 0;
for (std::set<uint16>::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr)
StopEvent(*itr);
- sLog->outDetail("Next game event check in %u seconds.", nextEventDelay + 1);
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "Next game event check in %u seconds.", nextEventDelay + 1);
return (nextEventDelay + 1) * IN_MILLISECONDS; // Add 1 second to be sure event has started/stopped at next call
}
void GameEventMgr::UnApplyEvent(uint16 event_id)
{
- sLog->outDetail("GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str());
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str());
//! Run SAI scripts with SMART_EVENT_GAME_EVENT_END
RunSmartAIScripts(event_id, false);
// un-spawn positive event tagged objects
@@ -1137,7 +1137,7 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
break;
}
- sLog->outDetail("GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str());
+ sLog->outInfo(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str());
//! Run SAI scripts with SMART_EVENT_GAME_EVENT_END
RunSmartAIScripts(event_id, true);
@@ -1211,7 +1211,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventCreatureGuids.size());
return;
}
@@ -1229,7 +1229,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* creature = new Creature;
- //sLog->outDebug("Spawning creature %u", *itr);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "Spawning creature %u", *itr);
if (!creature->LoadCreatureFromDB(*itr, map))
delete creature;
}
@@ -1238,7 +1238,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventGameobjectGuids.size());
return;
}
@@ -1256,7 +1256,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
- //sLog->outDebug("Spawning gameobject %u", *itr);
+ //sLog->outDebug(LOG_FILTER_GENERAL, "Spawning gameobject %u", *itr);
//TODO: find out when it is add to map
if (!pGameobject->LoadGameObjectFromDB(*itr, map, false))
delete pGameobject;
@@ -1271,7 +1271,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
{
- sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")",
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")",
internal_event_id, mGameEventPoolIds.size());
return;
}
@@ -1286,7 +1286,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventCreatureGuids.size());
return;
}
@@ -1308,7 +1308,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventGameobjectGuids.size());
return;
}
@@ -1329,7 +1329,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
}
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
{
- sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size());
+ sLog->outError(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size());
return;
}