mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 19:37:07 +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
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue