mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[12140] Added NumTalentsAtLevel and TalentTreePrimarySpells DBCLoad Support. Thanks Trinity
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
fe066cf94a
commit
d8eb7327a1
5 changed files with 43 additions and 5 deletions
|
|
@ -146,6 +146,8 @@ MapDifficultyMap sMapDifficultyMap;
|
|||
|
||||
DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt);
|
||||
|
||||
DBCStorage <NumTalentsAtLevelEntry> sNumTalentsAtLevelStore(NumTalentsAtLevelfmt);
|
||||
|
||||
DBCStorage <OverrideSpellDataEntry> sOverrideSpellDataStore(OverrideSpellDatafmt);
|
||||
DBCStorage <QuestFactionRewardEntry> sQuestFactionRewardStore(QuestFactionRewardfmt);
|
||||
DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
|
||||
|
|
@ -202,6 +204,9 @@ DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
|
|||
DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt);
|
||||
TalentSpellPosMap sTalentSpellPosMap;
|
||||
DBCStorage <TalentTabEntry> sTalentTabStore(TalentTabEntryfmt);
|
||||
DBCStorage <TalentTreePrimarySpellsEntry> sTalentTreePrimarySpellsStore(TalentTreePrimarySpellsfmt);
|
||||
typedef std::map<uint32, std::vector<uint32> > TalentTreePrimarySpellsMap;
|
||||
TalentTreePrimarySpellsMap sTalentTreePrimarySpellsMap;
|
||||
|
||||
// store absolute bit position for first rank for talent inspect
|
||||
static uint32 sTalentTabPages[MAX_CLASSES][3];
|
||||
|
|
@ -538,6 +543,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
sMapDifficultyStore.Clear();
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMovieStore, dbcPath,"Movie.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sNumTalentsAtLevelStore, dbcPath,"NumTalentsAtLevel.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sOverrideSpellDataStore, dbcPath,"OverrideSpellData.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestFactionRewardStore, dbcPath,"QuestFactionReward.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestSortStore, dbcPath,"QuestSort.dbc");
|
||||
|
|
@ -675,12 +681,17 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
continue;
|
||||
|
||||
// store class talent tab pages
|
||||
uint32 cls = 1;
|
||||
for(uint32 m=1;!(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES;m <<=1, ++cls) {}
|
||||
for (uint32 cls = 1; cls < MAX_CLASSES; ++cls)
|
||||
if (talentTabInfo->ClassMask & (1 << (cls - 1)))
|
||||
sTalentTabPages[cls][talentTabInfo->tabpage] = talentTabId;
|
||||
}
|
||||
}
|
||||
|
||||
sTalentTabPages[cls][talentTabInfo->tabpage]=talentTabId;
|
||||
}
|
||||
}
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files, sTalentTreePrimarySpellsStore, dbcPath, "TalentTreePrimarySpells.dbc");
|
||||
for (uint32 i = 0; i < sTalentTreePrimarySpellsStore.GetNumRows(); ++i)
|
||||
if (TalentTreePrimarySpellsEntry const* talentSpell = sTalentTreePrimarySpellsStore.LookupEntry(i))
|
||||
sTalentTreePrimarySpellsMap[talentSpell->TalentTree].push_back(talentSpell->SpellId);
|
||||
sTalentTreePrimarySpellsStore.Clear();
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiNodesStore, dbcPath,"TaxiNodes.dbc");
|
||||
|
||||
|
|
@ -1051,6 +1062,15 @@ uint32 const* GetTalentTabPages(uint32 cls)
|
|||
return sTalentTabPages[cls];
|
||||
}
|
||||
|
||||
std::vector<uint32> const* GetTalentTreePrimarySpells(uint32 talentTree)
|
||||
{
|
||||
TalentTreePrimarySpellsMap::const_iterator itr = sTalentTreePrimarySpellsMap.find(talentTree);
|
||||
if (itr == sTalentTreePrimarySpellsMap.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)
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ inline Difficulty GetPrevDifficulty(Difficulty diff, bool isRaid)
|
|||
}
|
||||
|
||||
uint32 const* /*[3]*/ GetTalentTabPages(uint32 cls);
|
||||
std::vector<uint32> const* GetTalentTreePrimarySpells(uint32 talentTree);
|
||||
|
||||
bool IsPointInAreaTriggerZone(AreaTriggerEntry const* atEntry, uint32 mapid, float x, float y, float z, float delta = 0.0f);
|
||||
|
||||
|
|
@ -172,6 +173,7 @@ extern DBCStorage <MapEntry> sMapStore;
|
|||
//extern DBCStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed
|
||||
extern MapDifficultyMap sMapDifficultyMap;
|
||||
extern DBCStorage <MovieEntry> sMovieStore;
|
||||
extern DBCStorage <NumTalentsAtLevelEntry> sNumTalentsAtLevelStore;
|
||||
extern DBCStorage <OverrideSpellDataEntry> sOverrideSpellDataStore;
|
||||
extern DBCStorage <QuestFactionRewardEntry> sQuestFactionRewardStore;
|
||||
extern DBCStorage <QuestSortEntry> sQuestSortStore;
|
||||
|
|
|
|||
|
|
@ -1339,6 +1339,12 @@ struct MovieEntry
|
|||
//uint32 unk2; // 3 4.0.0
|
||||
};
|
||||
|
||||
struct NumTalentsAtLevelEntry
|
||||
{
|
||||
//uint32 Level; // 0 index
|
||||
float Talents; // 1 talent count
|
||||
};
|
||||
|
||||
#define MAX_OVERRIDE_SPELLS 10
|
||||
|
||||
struct OverrideSpellDataEntry
|
||||
|
|
@ -2146,6 +2152,14 @@ struct TalentTabEntry
|
|||
//uint32 spellIds[2]; // 9-10 passive mastery bonus spells?
|
||||
};
|
||||
|
||||
struct TalentTreePrimarySpellsEntry
|
||||
{
|
||||
//uint32 Id; // 0 index
|
||||
uint32 TalentTree; // 1 entry from TalentTab.dbc
|
||||
uint32 SpellId; // 2 spell id to learn
|
||||
//uint32 Flags; // 3 some kind of flags
|
||||
};
|
||||
|
||||
struct TaxiNodesEntry
|
||||
{
|
||||
uint32 ID; // 0 m_ID
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ const char MailTemplateEntryfmt[]="nxs";
|
|||
const char MapEntryfmt[]="nsiiiisissififfiiiii";
|
||||
const char MapDifficultyEntryfmt[]="niisiis";
|
||||
const char MovieEntryfmt[]="nxxx";
|
||||
const char NumTalentsAtLevelfmt[]="df";
|
||||
const char OverrideSpellDatafmt[]="niiiiiiiiiixx";
|
||||
const char QuestFactionRewardfmt[]="niiiiiiiiii";
|
||||
const char QuestSortEntryfmt[]="nx";
|
||||
|
|
@ -130,6 +131,7 @@ const char SpellShapeshiftFormfmt[]="nxxiixiiixxiiiiiiiixx";
|
|||
const char SummonPropertiesfmt[] = "niiiii";
|
||||
const char TalentEntryfmt[]="niiiiiiixxiiibbbbxx";
|
||||
const char TalentTabEntryfmt[]="nxxiiixxxxx";
|
||||
const char TalentTreePrimarySpellsfmt[]="diix";
|
||||
const char TaxiNodesEntryfmt[]="nifffsiixxx";
|
||||
const char TaxiPathEntryfmt[]="niii";
|
||||
const char TaxiPathNodeEntryfmt[]="diiifffiiii";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12139"
|
||||
#define REVISION_NR "12140"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue