aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/DataStores
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-03-30 19:06:11 +0200
committerShauren <shauren.trinity@gmail.com>2020-03-30 19:06:11 +0200
commit3cc50e69f1ece93e8542fb43575453ae4bcc5e61 (patch)
treee771165c1f4dd9c82407207634cb6023f3dd9520 /src/server/game/DataStores
parent642dd62cc7b8bfc4d4d04d2d06462737d73fcfe6 (diff)
Core/Players: Fixed racemasks usage for new races
Diffstat (limited to 'src/server/game/DataStores')
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp2
-rw-r--r--src/server/game/DataStores/DB2Structure.h15
2 files changed, 9 insertions, 8 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index 17f8111abe5..c9defdcc578 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -2564,7 +2564,7 @@ SkillRaceClassInfoEntry const* DB2Manager::GetSkillRaceClassInfo(uint32 skill, u
auto bounds = _skillRaceClassInfoBySkill.equal_range(skill);
for (auto itr = bounds.first; itr != bounds.second; ++itr)
{
- if (itr->second->RaceMask && !(itr->second->RaceMask & (UI64LIT(1) << (race - 1))))
+ if (itr->second->RaceMask && !(itr->second->RaceMask.HasRace(race)))
continue;
if (itr->second->ClassMask && !(itr->second->ClassMask & (1 << (class_ - 1))))
continue;
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index ad80e089dae..2a861ad2d2c 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -20,6 +20,7 @@
#include "Define.h"
#include "DBCEnums.h"
+#include "RaceMask.h"
#include "Util.h"
#pragma pack(push, 1)
@@ -1063,7 +1064,7 @@ struct DurabilityQualityEntry
struct EmotesEntry
{
uint32 ID;
- int64 RaceMask;
+ Trinity::RaceMask<int64> RaceMask;
char const* EmoteSlashCommand;
int32 AnimID;
uint32 EmoteFlags;
@@ -1123,7 +1124,7 @@ struct ExpectedStatModEntry
struct FactionEntry
{
- int64 ReputationRaceMask[4];
+ Trinity::RaceMask<int64> ReputationRaceMask[4];
LocalizedString* Name;
LocalizedString* Description;
uint32 ID;
@@ -1771,7 +1772,7 @@ struct ItemPriceBaseEntry
struct ItemSearchNameEntry
{
- int64 AllowableRace;
+ Trinity::RaceMask<int64> AllowableRace;
LocalizedString* Display;
uint32 ID;
uint8 OverallQualityID;
@@ -1811,7 +1812,7 @@ struct ItemSetSpellEntry
struct ItemSparseEntry
{
uint32 ID;
- int64 AllowableRace;
+ Trinity::RaceMask<int64> AllowableRace;
LocalizedString* Description;
LocalizedString* Display3;
LocalizedString* Display2;
@@ -2215,7 +2216,7 @@ struct PhaseXPhaseGroupEntry
struct PlayerConditionEntry
{
- int64 RaceMask;
+ Trinity::RaceMask<int64> RaceMask;
LocalizedString* FailureDescription;
uint32 ID;
uint16 MinLevel;
@@ -2547,7 +2548,7 @@ struct SkillLineEntry
struct SkillLineAbilityEntry
{
- int64 RaceMask;
+ Trinity::RaceMask<int64> RaceMask;
uint32 ID;
int16 SkillLine;
int32 Spell;
@@ -2567,7 +2568,7 @@ struct SkillLineAbilityEntry
struct SkillRaceClassInfoEntry
{
uint32 ID;
- int64 RaceMask;
+ Trinity::RaceMask<int64> RaceMask;
int16 SkillID;
int32 ClassMask;
uint16 Flags;