mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-21 12:37:05 +00:00
tab spec for duel talents
This commit is contained in:
@@ -55,8 +55,6 @@ uint8 AiFactory::GetPlayerSpecTab(Player* bot)
|
|||||||
|
|
||||||
if (bot->getLevel() >= 10 && ((tabs[0] + tabs[1] + tabs[2]) > 0))
|
if (bot->getLevel() >= 10 && ((tabs[0] + tabs[1] + tabs[2]) > 0))
|
||||||
{
|
{
|
||||||
std::map<uint8, uint32> tabs = GetPlayerSpecTabs(bot);
|
|
||||||
|
|
||||||
int8 tab = -1;
|
int8 tab = -1;
|
||||||
uint32 max = 0;
|
uint32 max = 0;
|
||||||
for (uint32 i = 0; i < uint32(3); i++)
|
for (uint32 i = 0; i < uint32(3); i++)
|
||||||
@@ -98,10 +96,12 @@ std::map<uint8, uint32> AiFactory::GetPlayerSpecTabs(Player* bot)
|
|||||||
for (PlayerTalentMap::const_iterator i = talentMap.begin(); i != talentMap.end(); ++i)
|
for (PlayerTalentMap::const_iterator i = talentMap.begin(); i != talentMap.end(); ++i)
|
||||||
{
|
{
|
||||||
uint32 spellId = i->first;
|
uint32 spellId = i->first;
|
||||||
|
if ((bot->GetActiveSpecMask() & i->second->specMask) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TalentSpellPos const* talentPos = GetTalentSpellPos(spellId);
|
TalentSpellPos const* talentPos = GetTalentSpellPos(spellId);
|
||||||
if(!talentPos)
|
if(!talentPos)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentPos->talent_id);
|
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentPos->talent_id);
|
||||||
if (!talentInfo)
|
if (!talentInfo)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user