mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
feat(Core/Globals): Dynamically calculate max race and racemasks from DBC data. (#24665)
This commit is contained in:
@@ -687,8 +687,8 @@ struct ChrRacesEntry
|
||||
uint32 TeamID; // 7 (7-Alliance 1-Horde)
|
||||
// 8-11 unused
|
||||
uint32 CinematicSequence; // 12 id from CinematicSequences.dbc
|
||||
//uint32 alliance; // 13 faction (0 alliance, 1 horde, 2 not available?)
|
||||
char const* name[16]; // 14-29 used for DBC language detection/selection
|
||||
uint32 alliance; // 13 faction (0 alliance, 1 horde, 2 not available?)
|
||||
char const* name[16]; // 14-29 used for DBC language detection/selection
|
||||
// 30 string flags, unused
|
||||
//char const* nameFemale[16]; // 31-46, if different from base (male) case
|
||||
// 47 string flags, unused
|
||||
|
||||
@@ -32,7 +32,7 @@ char constexpr CharStartOutfitEntryfmt[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiixxxxxxx
|
||||
char constexpr CharTitlesEntryfmt[] = "nxssssssssssssssssxssssssssssssssssxi";
|
||||
char constexpr ChatChannelsEntryfmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; // ChatChannelsEntryfmt, index not used (more compact store)
|
||||
char constexpr ChrClassesEntryfmt[] = "nxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii";
|
||||
char constexpr ChrRacesEntryfmt[] = "niixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
|
||||
char constexpr ChrRacesEntryfmt[] = "niixiixixxxxiissssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
|
||||
char constexpr CinematicCameraEntryfmt[] = "nsiffff";
|
||||
char constexpr CinematicSequencesEntryfmt[] = "nxixxxxxxx";
|
||||
char constexpr CreatureDisplayInfofmt[] = "nixifxxxxxxxxxxx";
|
||||
|
||||
@@ -91,21 +91,6 @@ enum Races
|
||||
//RACE_ICE_TROLL = 21
|
||||
};
|
||||
|
||||
// max+1 for player race
|
||||
#define MAX_RACES 12
|
||||
|
||||
#define RACEMASK_ALL_PLAYABLE \
|
||||
((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | \
|
||||
(1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1)) | \
|
||||
(1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| \
|
||||
(1<<(RACE_DRAENEI-1)))
|
||||
|
||||
#define RACEMASK_ALLIANCE \
|
||||
((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) | \
|
||||
(1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)))
|
||||
|
||||
#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE
|
||||
|
||||
// DisplayRace values from CreatureDisplayInfoExtra.dbc
|
||||
enum class DisplayRace : uint8
|
||||
{
|
||||
@@ -3698,6 +3683,13 @@ enum PvPTeamId
|
||||
PVP_TEAM_NEUTRAL = 2 // Battleground: Neutral, Arena: None
|
||||
};
|
||||
|
||||
enum AllianceId
|
||||
{
|
||||
ALLIANCE_ALLIANCE = 0,
|
||||
ALLIANCE_HORDE = 1,
|
||||
ALLIANCE_NEUTRAL = 2
|
||||
};
|
||||
|
||||
uint8 constexpr PVP_TEAMS_COUNT = 2;
|
||||
|
||||
inline PvPTeamId GetPvPTeamId(TeamId teamId)
|
||||
|
||||
Reference in New Issue
Block a user