Core/Instances: Delete InstanceSaveMgr and replace most of its uses with new InstanceLockMgr

This commit is contained in:
Shauren
2020-01-02 14:19:35 +01:00
parent a131542855
commit 9b924522d0
35 changed files with 268 additions and 2000 deletions

View File

@@ -37,7 +37,6 @@ EndScriptData */
#include "DB2Stores.h"
#include "GameTime.h"
#include "GridNotifiersImpl.h"
#include "InstanceSaveMgr.h"
#include "InstanceScript.h"
#include "Language.h"
#include "Log.h"
@@ -1347,27 +1346,6 @@ public:
return true;
}
if (!difficulty)
{
handler->PSendSysMessage("Resetting all difficulties for '%s'.", mEntry->MapName[handler->GetSessionDbcLocale()]);
for (DifficultyEntry const* diff : sDifficultyStore)
{
if (sDB2Manager.GetMapDifficultyData(mapId, Difficulty(diff->ID)))
{
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff->ID, mEntry->MapName[handler->GetSessionDbcLocale()]);
sInstanceSaveMgr->ForceGlobalReset(mapId, Difficulty(diff->ID));
}
}
}
else if (mEntry->IsNonRaidDungeon() && *difficulty == DIFFICULTY_NORMAL)
{
handler->PSendSysMessage("'%s' does not have any permanent saves for difficulty %d.", mEntry->MapName[handler->GetSessionDbcLocale()], *difficulty);
}
else
{
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", *difficulty, mEntry->MapName[handler->GetSessionDbcLocale()]);
sInstanceSaveMgr->ForceGlobalReset(mapId, Difficulty(*difficulty));
}
return true;
}