mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-09 02:30:29 +00:00
feat(Core/Globals): Dynamically calculate max race and racemasks from DBC data. (#24665)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user