Skip to content

Commit 9636fb3

Browse files
DDuarteShauren
authored andcommitted
Core/Defines: Format RACEMASK and CLASSMASK defines
(cherry picked from commit 7dc4b7e)
1 parent fa4b904 commit 9636fb3

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

src/server/shared/SharedDefines.h

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,24 @@ enum Races
110110
// max+1 for player race
111111
#define MAX_RACES 12
112112

113-
#define RACEMASK_ALL_PLAYABLE \
114-
((1<<(RACE_HUMAN-1)) |(1<<(RACE_ORC-1)) |(1<<(RACE_DWARF-1)) | \
115-
(1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1)) | \
116-
(1<<(RACE_GNOME-1)) |(1<<(RACE_TROLL-1)) |(1<<(RACE_BLOODELF-1))| \
113+
#define RACEMASK_ALL_PLAYABLE \
114+
((1<<(RACE_HUMAN-1)) | \
115+
(1<<(RACE_ORC-1)) | \
116+
(1<<(RACE_DWARF-1)) | \
117+
(1<<(RACE_NIGHTELF-1)) | \
118+
(1<<(RACE_UNDEAD_PLAYER-1)) | \
119+
(1<<(RACE_TAUREN-1)) | \
120+
(1<<(RACE_GNOME-1)) | \
121+
(1<<(RACE_TROLL-1)) | \
122+
(1<<(RACE_BLOODELF-1)) | \
117123
(1<<(RACE_DRAENEI-1)))
118124

119-
#define RACEMASK_ALLIANCE \
120-
((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) | \
121-
(1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)))
125+
#define RACEMASK_ALLIANCE \
126+
((1<<(RACE_HUMAN-1)) | \
127+
(1<<(RACE_DWARF-1)) | \
128+
(1<<(RACE_NIGHTELF-1)) | \
129+
(1<<(RACE_GNOME-1)) | \
130+
(1<<(RACE_DRAENEI-1)))
122131

123132
#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE
124133

@@ -143,11 +152,17 @@ enum Classes
143152
// max+1 for player class
144153
#define MAX_CLASSES 12
145154

146-
#define CLASSMASK_ALL_PLAYABLE \
147-
((1<<(CLASS_WARRIOR-1))|(1<<(CLASS_PALADIN-1))|(1<<(CLASS_HUNTER-1))| \
148-
(1<<(CLASS_ROGUE-1)) |(1<<(CLASS_PRIEST-1)) |(1<<(CLASS_SHAMAN-1))| \
149-
(1<<(CLASS_MAGE-1)) |(1<<(CLASS_WARLOCK-1))|(1<<(CLASS_DRUID-1)) | \
150-
(1<<(CLASS_DEATH_KNIGHT-1)))
155+
#define CLASSMASK_ALL_PLAYABLE \
156+
((1<<(CLASS_WARRIOR-1)) | \
157+
(1<<(CLASS_PALADIN-1)) | \
158+
(1<<(CLASS_HUNTER-1)) | \
159+
(1<<(CLASS_ROGUE-1)) | \
160+
(1<<(CLASS_PRIEST-1)) | \
161+
(1<<(CLASS_DEATH_KNIGHT-1)) | \
162+
(1<<(CLASS_SHAMAN-1)) | \
163+
(1<<(CLASS_MAGE-1)) | \
164+
(1<<(CLASS_WARLOCK-1)) | \
165+
(1<<(CLASS_DRUID-1)))
151166

152167
#define MAX_TALENT_TREES 3
153168

@@ -196,7 +211,7 @@ enum UnitClass
196211

197212
#define CLASSMASK_ALL_CREATURES ((1<<(UNIT_CLASS_WARRIOR-1)) | (1<<(UNIT_CLASS_PALADIN-1)) | (1<<(UNIT_CLASS_ROGUE-1)) | (1<<(UNIT_CLASS_MAGE-1)))
198213

199-
#define CLASSMASK_WAND_USERS ((1<<(CLASS_PRIEST-1))|(1<<(CLASS_MAGE-1))|(1<<(CLASS_WARLOCK-1)))
214+
#define CLASSMASK_WAND_USERS ((1<<(CLASS_PRIEST-1)) | (1<<(CLASS_MAGE-1)) | (1<<(CLASS_WARLOCK-1)))
200215

201216
#define PLAYER_MAX_BATTLEGROUND_QUEUES 2
202217

0 commit comments

Comments
 (0)