mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 07:53:44 +00:00
feat(Core/Disables): Implement DISABLE_TYPE_LOOT (#15136)
This commit is contained in:
@@ -44,7 +44,7 @@ namespace DisableMgr
|
||||
|
||||
DisableMap m_DisableMap;
|
||||
|
||||
uint8 MAX_DISABLE_TYPES = 10;
|
||||
uint8 MAX_DISABLE_TYPES = 11;
|
||||
}
|
||||
|
||||
void LoadDisables()
|
||||
@@ -258,6 +258,8 @@ namespace DisableMgr
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DISABLE_TYPE_LOOT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -303,7 +305,12 @@ namespace DisableMgr
|
||||
|
||||
bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags)
|
||||
{
|
||||
ASSERT(type < MAX_DISABLE_TYPES);
|
||||
if (type > MAX_DISABLE_TYPES)
|
||||
{
|
||||
LOG_ERROR("server", "Disables::IsDisabledFor() called with unknown disable type {}! (entry {}, flags {}).", type, entry, flags);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_DisableMap[type].empty())
|
||||
return false;
|
||||
|
||||
@@ -389,6 +396,8 @@ namespace DisableMgr
|
||||
return true;
|
||||
case DISABLE_TYPE_GAME_EVENT:
|
||||
return true;
|
||||
case DISABLE_TYPE_LOOT:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user