diff --git a/src/game/DBCEnums.h b/src/game/DBCEnums.h index 0b77ac773..0d1023a59 100644 --- a/src/game/DBCEnums.h +++ b/src/game/DBCEnums.h @@ -422,6 +422,15 @@ enum ItemLimitCategory ITEM_LIMIT_CATEGORY_MANA_GEM = 4, }; +enum TalentTreeRole +{ + TALENT_ROLE_TANK = 0x2, + TALENT_ROLE_HEALER = 0x4, + TALENT_ROLE_DPS = 0x8, +}; + +#define MAX_MASTERY_SPELLS 2 + enum TotemCategoryType { TOTEM_CATEGORY_TYPE_KNIFE = 1, diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index e63fa4edb..cc5f9c34e 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -207,6 +207,8 @@ DBCStorage sTalentTreePrimarySpellsStore(TalentTr typedef std::map > TalentTreeSpellsMap; TalentTreeSpellsMap sTalentTreeMasterySpellsMap; TalentTreeSpellsMap sTalentTreePrimarySpellsMap; +typedef std::map TalentTreeRolesMap; +TalentTreeRolesMap sTalentTreeRolesMap; // store absolute bit position for first rank for talent inspect static uint32 sTalentTabPages[MAX_CLASSES][3]; @@ -688,6 +690,8 @@ void LoadDBCStores(const std::string& dataPath) for (uint32 cls = 1; cls < MAX_CLASSES; ++cls) if (talentTabInfo->ClassMask & (1 << (cls - 1))) sTalentTabPages[cls][talentTabInfo->tabpage] = talentTabId; + + sTalentTreeRolesMap[talentTabId] = talentTabInfo->rolesMask; } } @@ -1085,6 +1089,15 @@ std::vector const* GetTalentTreePrimarySpells(uint32 talentTree) return &itr->second; } +uint32 GetTalentTreeRolesMask(uint32 talentTree) +{ + TalentTreeRolesMap::const_iterator itr = sTalentTreeRolesMap.find(talentTree); + if (itr == sTalentTreeRolesMap.end()) + return NULL; + + return itr->second; +} + bool IsPointInAreaTriggerZone(AreaTriggerEntry const* atEntry, uint32 mapid, float x, float y, float z, float delta) { if (mapid != atEntry->mapid) diff --git a/src/game/DBCStores.h b/src/game/DBCStores.h index f8588b5f4..ea4977a74 100644 --- a/src/game/DBCStores.h +++ b/src/game/DBCStores.h @@ -91,6 +91,7 @@ inline Difficulty GetPrevDifficulty(Difficulty diff, bool isRaid) uint32 const* /*[3]*/ GetTalentTabPages(uint32 cls); std::vector const* GetTalentTreeMasterySpells(uint32 talentTree); std::vector const* GetTalentTreePrimarySpells(uint32 talentTree); +uint32 GetTalentTreeRolesMask(uint32 talentTree); bool IsPointInAreaTriggerZone(AreaTriggerEntry const* atEntry, uint32 mapid, float x, float y, float z, float delta = 0.0f); diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index d54f75045..e06238a30 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -2137,8 +2137,6 @@ struct TalentEntry //uint64 allowForPet; // 17 m_categoryMask its a 64 bit mask for pet 1<