diff options
author | Azazel <azazel.kon@gmail.com> | 2011-02-17 19:47:08 +0600 |
---|---|---|
committer | Azazel <azazel.kon@gmail.com> | 2011-02-17 19:47:08 +0600 |
commit | 4dc1eaa47cdeb992aa51db8ad019cff9ff595fe8 (patch) | |
tree | 44f7cbcd60bf558d4c290dcaf759edd511af29df /src/server/game/Maps/Map.cpp | |
parent | aaa9b069d9982355d8371fdaad45fd7fd560a192 (diff) |
Core/Misc: improve error log messages by adding more info. Specially for Aokromes.
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rwxr-xr-x | src/server/game/Maps/Map.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 1e2e55a7cde..1a158833072 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2368,7 +2368,7 @@ bool InstanceMap::Add(Player *player) // for normal instances cancel the reset schedule when the // first player enters (no players yet) - SetResetSchedule(false); + SetResetSchedule(false, player); sLog->outDetail("MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName()); // initialize unload state @@ -2402,7 +2402,7 @@ void InstanceMap::Remove(Player *player, bool remove) m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); Map::Remove(player, remove); // for normal instances schedule the reset after all players have left - SetResetSchedule(true); + SetResetSchedule(true, player); } void InstanceMap::CreateInstanceData(bool load) @@ -2529,18 +2529,19 @@ void InstanceMap::SendResetWarnings(uint32 timeLeft) const itr->getSource()->SendInstanceResetWarning(GetId(), itr->getSource()->GetDifficulty(IsRaid()), timeLeft); } -void InstanceMap::SetResetSchedule(bool on) +void InstanceMap::SetResetSchedule(bool on, Player* player) { // only for normal instances // the reset time is only scheduled when there are no payers inside // it is assumed that the reset time will rarely (if ever) change while the reset is scheduled if (IsDungeon() && !HavePlayers() && !IsRaidOrHeroicDungeon()) { - InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); - if (!save) - sLog->outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, no save available for instance %d of %d", on ? "on" : "off", GetInstanceId(), GetId()); - else + if (InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId())) sInstanceSaveMgr->ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId())); + else + sLog->outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u) due to player (GUID: %u, name: %s) %s", + on ? "on" : "off", GetId(), GetMapName(), GetInstanceId(), + player->GetGUIDLow(), player->GetName(), on ? "leave" : "entrance"); } } |