diff options
Diffstat (limited to 'src/shared/Database')
-rw-r--r-- | src/shared/Database/DBCStores.cpp | 4 | ||||
-rw-r--r-- | src/shared/Database/DBCStructure.h | 5 | ||||
-rw-r--r-- | src/shared/Database/DBCfmt.cpp | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp index b15bb456945..9589865b9ac 100644 --- a/src/shared/Database/DBCStores.cpp +++ b/src/shared/Database/DBCStores.cpp @@ -345,7 +345,7 @@ void LoadDBCStores(const std::string& dataPath) { TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; - for (int j = 0; j < 5; j++) + for (int j = 0; j < MAX_TALENT_RANK; j++) if(talentInfo->RankID[j]) sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i,j); } @@ -369,7 +369,7 @@ void LoadDBCStores(const std::string& dataPath) // find talent rank uint32 curtalent_maxrank = 0; - for(uint32 k = 5; k > 0; --k) + for(uint32 k = MAX_TALENT_RANK; k > 0; --k) { if(talentInfo->RankID[k-1]) { diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h index 6fb43567a3a..ec60105a230 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/shared/Database/DBCStructure.h @@ -1408,13 +1408,16 @@ struct SummonPropertiesEntry uint32 Flags; // 5 }; +#define MAX_TALENT_RANK 5 +#define MAX_PET_TALENT_RANK 3 // use in calculations, expected <= MAX_TALENT_RANK + struct TalentEntry { uint32 TalentID; // 0 uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry) uint32 Row; // 2 uint32 Col; // 3 - uint32 RankID[5]; // 4-8 + uint32 RankID[MAX_TALENT_RANK]; // 4-8 // 9-12 not used, always 0, maybe not used high ranks uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry) // 14-15 not used diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp index dc6fec3b7b3..b958742ffc7 100644 --- a/src/shared/Database/DBCfmt.cpp +++ b/src/shared/Database/DBCfmt.cpp @@ -97,4 +97,3 @@ const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii const char WorldMapAreaEntryfmt[]="xinxffffix"; const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx"; const char WorldMapOverlayEntryfmt[]="nxixxxxxxxxxxxxxx"; - |