Core/Instances: Reimplement resetting instances from UI

Port From (https://github.com/TrinityCore/TrinityCore/commit/ddd0c7b152d65b980db0cc2d00f15ae62a602936)
This commit is contained in:
hondacrx
2022-10-04 14:31:07 -04:00
parent 67d6fa48eb
commit 807caef08c
7 changed files with 147 additions and 140 deletions
+2 -2
View File
@@ -326,8 +326,8 @@ namespace Game.Entities
map.UnloadAll();
// Free up the instance id and allow it to be reused for bgs and arenas (other instances are handled in the InstanceSaveMgr)
if (map.IsBattlegroundOrArena())
// Free up the instance id and allow it to be reused for normal dungeons, bgs and arenas
if (map.IsBattlegroundOrArena() || (map.IsDungeon() && !map.GetMapDifficulty().HasResetSchedule()))
FreeInstanceId(map.GetInstanceId());
// erase map