feat(Core/Globals): Dynamically calculate max race and racemasks from DBC data. (#24665)

This commit is contained in:
Benjamin Jackson
2026-02-28 18:12:52 -05:00
committed by GitHub
parent 85b224bcef
commit 515aeca570
15 changed files with 221 additions and 75 deletions

View File

@@ -23,6 +23,7 @@
#include "InstanceScript.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "RaceMgr.h"
#include "ScriptMgr.h"
#include "SharedDefines.h"
#include "Spell.h"
@@ -2779,7 +2780,7 @@ void SpellMgr::LoadSpellAreas()
}
}
if (spellArea.raceMask && (spellArea.raceMask & RACEMASK_ALL_PLAYABLE) == 0)
if (spellArea.raceMask && (spellArea.raceMask & sRaceMgr->GetPlayableRaceMask()) == 0)
{
LOG_ERROR("sql.sql", "Spell {} listed in `spell_area` have wrong race mask ({}) requirement", spell, spellArea.raceMask);
continue;