diff options
author | Subv <s.v.h21@hotmail.com> | 2012-08-22 17:26:53 -0500 |
---|---|---|
committer | Subv <s.v.h21@hotmail.com> | 2012-08-22 17:26:53 -0500 |
commit | dc95ce61b46ce2d542ee4c4dbdf35a9e854c4316 (patch) | |
tree | e673101dc6554a76dfacb5cf3497dd1d2bde4f41 /src/server/game/Instances/InstanceSaveMgr.cpp | |
parent | cecaab7948d5289439d1334d7bedcaae90e1fe3a (diff) | |
parent | 85ed0e32a9b2b029c1db3cf1a914b3940cf72b9b (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts:
dep/PackageList.txt
src/server/game/Movement/MotionMaster.cpp
src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
src/server/game/Movement/Spline/MoveSplineInit.h
src/server/game/World/World.h
Diffstat (limited to 'src/server/game/Instances/InstanceSaveMgr.cpp')
-rwxr-xr-x | src/server/game/Instances/InstanceSaveMgr.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 8078a91d082..48ed7bdba1f 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -75,19 +75,19 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance const MapEntry* entry = sMapStore.LookupEntry(mapId); if (!entry) { - sLog->outError("InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId); return NULL; } if (instanceId == 0) { - sLog->outError("InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId); return NULL; } if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY)) { - sLog->outError("InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty); return NULL; } @@ -275,8 +275,8 @@ void InstanceSaveManager::LoadInstances() // Load reset times and clean expired instances sInstanceSaveMgr->LoadResetTimes(); - sLog->outString(">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime)); + } void InstanceSaveManager::LoadResetTimes() @@ -364,7 +364,7 @@ void InstanceSaveManager::LoadResetTimes() MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); if (!mapDiff) { - sLog->outError("InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty); CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, difficulty); continue; } @@ -458,7 +458,7 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev } if (itr == m_resetTimeQueue.end()) - sLog->outError("InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId); } } else @@ -543,7 +543,10 @@ void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId) if (iMap && iMap->IsDungeon()) ((InstanceMap*)iMap)->Reset(INSTANCE_RESET_RESPAWN_DELAY); - sObjectMgr->DeleteRespawnTimeForInstance(instanceId); // even if map is not loaded + if (iMap) + iMap->DeleteRespawnTimes(); + else + Map::DeleteRespawnTimesInDB(mapid, instanceId); // Free up the instance id and allow it to be reused sMapMgr->FreeInstanceId(instanceId); @@ -563,7 +566,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty); if (!mapDiff || !mapDiff->resetTime) { - sLog->outError("InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid); + sLog->outError(LOG_FILTER_GENERAL, "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid); return; } |