Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool HasSpec(Player* pPlayer, uint32 talentID)
- {
- TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentID);
- if (!talentInfo) // You gave me the wrong ID
- return false;
- uint32 points = 0;
- uint32 tTab = talentInfo->TalentTab;
- uint32 numRows = sTalentStore.GetNumRows();
- for (uint32 i = 0; i < numRows; i++) // Loop through all talents.
- {
- // Someday, someone needs to revamp
- const TalentEntry* tmpTalent = sTalentStore.LookupEntry(i);
- if (tmpTalent) // the way talents are tracked
- {
- if (tmpTalent->TalentTab == tTab)
- {
- for (uint8 rank = 0; rank < MAX_TALENT_RANK; rank++)
- {
- if (tmpTalent->RankID[rank] != 0)
- {
- if (pPlayer->HasSpell(tmpTalent->RankID[rank]))
- {
- points += (rank + 1);
- }
- }
- }
- }
- }
- }
- if (points > 5)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement