mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[12200] Implement storing talent tree roles
Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
parent
f552049968
commit
56e59031b2
6 changed files with 26 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -207,6 +207,8 @@ DBCStorage <TalentTreePrimarySpellsEntry> sTalentTreePrimarySpellsStore(TalentTr
|
|||
typedef std::map<uint32, std::vector<uint32> > TalentTreeSpellsMap;
|
||||
TalentTreeSpellsMap sTalentTreeMasterySpellsMap;
|
||||
TalentTreeSpellsMap sTalentTreePrimarySpellsMap;
|
||||
typedef std::map<uint32, uint32> 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<uint32> 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)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ inline Difficulty GetPrevDifficulty(Difficulty diff, bool isRaid)
|
|||
uint32 const* /*[3]*/ GetTalentTabPages(uint32 cls);
|
||||
std::vector<uint32> const* GetTalentTreeMasterySpells(uint32 talentTree);
|
||||
std::vector<uint32> 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);
|
||||
|
||||
|
|
|
|||
|
|
@ -2137,8 +2137,6 @@ struct TalentEntry
|
|||
//uint64 allowForPet; // 17 m_categoryMask its a 64 bit mask for pet 1<<m_categoryEnumID in CreatureFamily.dbc
|
||||
};
|
||||
|
||||
#define MAX_MASTERY_SPELLS 2
|
||||
|
||||
struct TalentTabEntry
|
||||
{
|
||||
uint32 TalentTabID; // 0 m_ID
|
||||
|
|
@ -2149,7 +2147,7 @@ struct TalentTabEntry
|
|||
uint32 tabpage; // 5 m_orderIndex
|
||||
//char* internalname; // 6 m_backgroundFile
|
||||
//char* description; // 7
|
||||
//uint32 rolesMask; // 8 4.0.0
|
||||
uint32 rolesMask; // 8 4.0.0
|
||||
uint32 masterySpells[MAX_MASTERY_SPELLS]; // 9-10 passive mastery bonus spells
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ const char SpellShapeshiftFormfmt[]="nxxiixiiixxiiiiiiiixx";
|
|||
//const char StableSlotPricesfmt[] = "ni"; // removed
|
||||
const char SummonPropertiesfmt[] = "niiiii";
|
||||
const char TalentEntryfmt[]="niiiiiiiiixxixxxxxx";
|
||||
const char TalentTabEntryfmt[]="nxxiiixxxii";
|
||||
const char TalentTabEntryfmt[]="nxxiiixxiii";
|
||||
const char TalentTreePrimarySpellsfmt[]="diix";
|
||||
const char TaxiNodesEntryfmt[]="nifffsiixxx";
|
||||
const char TaxiPathEntryfmt[]="niii";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12199"
|
||||
#define REVISION_NR "12200"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue