Core/Instances: Use level requirements from MapDifficultyXCondition.db2 instead of access_requirement db table

Port From (https://github.com/TrinityCore/TrinityCore/commit/3afed1788a81fe65ee414c590936be65d69f9314)
This commit is contained in:
hondacrx
2021-01-03 15:35:13 -05:00
parent bcd18b8f26
commit 9e8b56d16e
7 changed files with 83 additions and 23 deletions
+5 -1
View File
@@ -2763,6 +2763,10 @@ namespace Game.Maps
{
Cypher.Assert(mode == 1);
Cypher.Assert(obj.GetMap() == this);
if (IsBattlegroundOrArena())
return;
SpawnObjectType type;
switch (obj.GetTypeId())
{
@@ -2777,7 +2781,7 @@ namespace Game.Maps
}
SpawnData data = Global.ObjectMgr.GetSpawnData(type, spawnId);
if (data == null || !data.spawnGroupData.flags.HasAnyFlag(SpawnGroupFlags.DynamicSpawnRate))
if (data == null || data.spawnGroupData == null || !!data.spawnGroupData.flags.HasAnyFlag(SpawnGroupFlags.DynamicSpawnRate))
return;
if (!_zonePlayerCountMap.ContainsKey(obj.GetZoneId()))