Core/Maps: Replace some Instanceable() checks with IsDungeon()
Port From (https://github.com/TrinityCore/TrinityCore/commit/8466894d816f484f30cdbe47b980a142870c955e)
This commit is contained in:
@@ -454,7 +454,7 @@ namespace Game.Maps
|
||||
{
|
||||
Log.outDebug(LogFilter.Maps, "InstanceSaveMgr._ResetInstance {0}, {1}", mapid, instanceId);
|
||||
Map map = Global.MapMgr.CreateBaseMap(mapid);
|
||||
if (!map.Instanceable())
|
||||
if (!map.IsDungeon())
|
||||
return;
|
||||
|
||||
var pair = m_instanceSaveById.Find(instanceId);
|
||||
@@ -464,12 +464,9 @@ namespace Game.Maps
|
||||
DeleteInstanceFromDB(instanceId); // even if save not loaded
|
||||
|
||||
Map iMap = ((MapInstanced)map).FindInstanceMap(instanceId);
|
||||
|
||||
if (iMap != null && iMap.IsDungeon())
|
||||
((InstanceMap)iMap).Reset(InstanceResetMethod.RespawnDelay);
|
||||
|
||||
if (iMap != null)
|
||||
{
|
||||
((InstanceMap)iMap).Reset(InstanceResetMethod.RespawnDelay);
|
||||
iMap.DeleteRespawnTimes();
|
||||
iMap.DeleteCorpseData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user