mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
Enable SourceType of 8 for Disables table to disable LFG/LFD maps (#1076)
This commit is contained in:
@@ -30,7 +30,7 @@ namespace
|
||||
|
||||
DisableMap m_DisableMap;
|
||||
|
||||
uint8 MAX_DISABLE_TYPES = 8;
|
||||
uint8 MAX_DISABLE_TYPES = 9;
|
||||
}
|
||||
|
||||
void LoadDisables()
|
||||
@@ -123,6 +123,7 @@ void LoadDisables()
|
||||
case DISABLE_TYPE_QUEST:
|
||||
break;
|
||||
case DISABLE_TYPE_MAP:
|
||||
case DISABLE_TYPE_LFG_MAP:
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
|
||||
if (!mapEntry)
|
||||
@@ -320,6 +321,7 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags
|
||||
break;
|
||||
}
|
||||
case DISABLE_TYPE_MAP:
|
||||
case DISABLE_TYPE_LFG_MAP:
|
||||
if (Player const* player = unit->ToPlayer())
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
|
||||
|
||||
@@ -21,6 +21,7 @@ enum DisableType
|
||||
DISABLE_TYPE_OUTDOORPVP = 5,
|
||||
DISABLE_TYPE_VMAP = 6,
|
||||
DISABLE_TYPE_GO_LOS = 7,
|
||||
DISABLE_TYPE_LFG_MAP = 8,
|
||||
};
|
||||
|
||||
enum SpellDisableTypes
|
||||
|
||||
@@ -391,6 +391,8 @@ void LFGMgr::InitializeLockedDungeons(Player* player, uint8 level /* = 0 */)
|
||||
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
|
||||
else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
|
||||
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
|
||||
else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_LFG_MAP, dungeon->map, player))
|
||||
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
|
||||
else if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL && (!mapEntry || !mapEntry->IsRaid()) && sInstanceSaveMgr->PlayerIsPermBoundToInstance(player->GetGUIDLow(), dungeon->map, Difficulty(dungeon->difficulty)))
|
||||
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
|
||||
else if (dungeon->minlevel > level)
|
||||
|
||||
Reference in New Issue
Block a user