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

@@ -25,6 +25,7 @@
#include "ObjectMgr.h"
#include "Player.h"
#include "QuestDef.h"
#include "RaceMgr.h"
#include "SharedDefines.h"
#include "Timer.h"
@@ -247,7 +248,7 @@ void ServerMailMgr::LoadMailServerTemplatesConditions()
}
break;
case ServerMailConditionType::Race:
if (conditionValue & ~RACEMASK_ALL_PLAYABLE)
if (conditionValue & ~sRaceMgr->GetPlayableRaceMask())
{
LOG_ERROR("sql.sql", "Table `mail_server_template_conditions` has conditionType 'Race' with invalid conditionValue ({}) for templateID {}, skipped.", conditionValue, templateID);
continue;