mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/DataStores: Defined ChrSpecialization flag values
This commit is contained in:
@@ -137,6 +137,17 @@ enum AreaFlags
|
||||
AREA_FLAG_UNK9 = 0x40000000
|
||||
};
|
||||
|
||||
enum ChrSpecializationFlag
|
||||
{
|
||||
CHR_SPECIALIZATION_FLAG_CASTER = 0x01,
|
||||
CHR_SPECIALIZATION_FLAG_RANGED = 0x02,
|
||||
CHR_SPECIALIZATION_FLAG_MELEE = 0x04,
|
||||
CHR_SPECIALIZATION_FLAG_UNKNOWN = 0x08,
|
||||
CHR_SPECIALIZATION_FLAG_DUAL_WIELD_TWO_HANDED = 0x10, // used for CUnitDisplay::SetSheatheInvertedForDualWield
|
||||
CHR_SPECIALIZATION_FLAG_PET_OVERRIDE_SPEC = 0x20,
|
||||
CHR_SPECIALIZATION_FLAG_RECOMMENDED = 0x40,
|
||||
};
|
||||
|
||||
enum CriteriaCondition
|
||||
{
|
||||
CRITERIA_CONDITION_NONE = 0,
|
||||
|
||||
@@ -389,9 +389,20 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale)
|
||||
sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry });
|
||||
|
||||
memset(sChrSpecializationByIndexStore, 0, sizeof(sChrSpecializationByIndexStore));
|
||||
for (uint32 i = 0; i < sChrSpecializationStore.GetNumRows(); ++i)
|
||||
if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(i))
|
||||
sChrSpecializationByIndexStore[chrSpec->ClassID][chrSpec->OrderIndex] = chrSpec;
|
||||
for (ChrSpecializationEntry const* chrSpec : sChrSpecializationStore)
|
||||
{
|
||||
ASSERT(chrSpec->ClassID < MAX_CLASSES);
|
||||
ASSERT(chrSpec->OrderIndex < MAX_SPECIALIZATIONS);
|
||||
|
||||
uint32 storageIndex = chrSpec->ClassID;
|
||||
if (chrSpec->Flags & CHR_SPECIALIZATION_FLAG_PET_OVERRIDE_SPEC)
|
||||
{
|
||||
ASSERT(!chrSpec->ClassID);
|
||||
storageIndex = PET_SPEC_OVERRIDE_CLASS_INDEX;
|
||||
}
|
||||
|
||||
sChrSpecializationByIndexStore[storageIndex][chrSpec->OrderIndex] = chrSpec;
|
||||
}
|
||||
|
||||
ASSERT(MAX_DIFFICULTY >= sDifficultyStore.GetNumRows(),
|
||||
"MAX_DIFFICULTY is not large enough to contain all difficulties! (current value %d, required %d)",
|
||||
|
||||
@@ -34,7 +34,8 @@ TC_GAME_API char const* GetClassName(uint8 class_, uint8 locale);
|
||||
TC_GAME_API char const* GetRaceName(uint8 race, uint8 locale);
|
||||
|
||||
// ChrSpecialization
|
||||
typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES][MAX_SPECIALIZATIONS];
|
||||
#define PET_SPEC_OVERRIDE_CLASS_INDEX MAX_CLASSES
|
||||
typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES + 1][MAX_SPECIALIZATIONS];
|
||||
|
||||
// CreatureFamilty
|
||||
TC_GAME_API char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale);
|
||||
|
||||
Reference in New Issue
Block a user