Core/Maps: Replace some Instanceable() checks with IsDungeon()
Port From (https://github.com/TrinityCore/TrinityCore/commit/8466894d816f484f30cdbe47b980a142870c955e)
This commit is contained in:
@@ -278,12 +278,11 @@ namespace Game.Entities
|
||||
foreach (var pair in i_maps)
|
||||
{
|
||||
Map map = pair.Value;
|
||||
if (!map.Instanceable())
|
||||
if (!map.IsDungeon())
|
||||
continue;
|
||||
|
||||
var maps = ((MapInstanced)map).GetInstancedMaps();
|
||||
foreach (var imap in maps)
|
||||
if (imap.Value.IsDungeon())
|
||||
ret++;
|
||||
ret += (uint)maps.Count;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -297,12 +296,12 @@ namespace Game.Entities
|
||||
foreach (var pair in i_maps)
|
||||
{
|
||||
Map map = pair.Value;
|
||||
if (!map.Instanceable())
|
||||
if (!map.IsDungeon())
|
||||
continue;
|
||||
|
||||
var maps = ((MapInstanced)map).GetInstancedMaps();
|
||||
foreach (var imap in maps)
|
||||
if (imap.Value.IsDungeon())
|
||||
ret += (uint)imap.Value.GetPlayers().Count;
|
||||
ret += (uint)imap.Value.GetPlayers().Count;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user