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

@@ -24,6 +24,7 @@
#include "ObjectMgr.h"
#include "Pet.h"
#include "Player.h"
#include "RaceMgr.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
@@ -2082,9 +2083,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_RACE:
{
if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE))
if (!(cond->ConditionValue1 & sRaceMgr->GetPlayableRaceMask()))
{
LOG_ERROR("sql.sql", "Race condition has non existing racemask ({}), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
LOG_ERROR("sql.sql", "Race condition has non existing racemask ({}), skipped", cond->ConditionValue1 & ~sRaceMgr->GetPlayableRaceMask());
return false;
}