*Allow talent resets even if your talent map is empty.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-21 04:55:02 -08:00
parent 41ad7346bc
commit 9fc070bb1d

View File

@@ -22016,7 +22016,7 @@ void Player::ActivateSpec(uint8 spec)
continue;
PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->TalentID);
if (plrTalent != m_talents[m_activeSpec]->end())
if (plrTalent != m_talents[m_activeSpec]->end() || m_talents[m_activeSpec]->empty())
{
for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
@@ -22045,7 +22045,8 @@ void Player::ActivateSpec(uint8 spec)
else
++itr;
}
plrTalent->second->state = PLAYERSPELL_REMOVED; // mark the talent in the talent map as removed
if (!m_talents[m_activeSpec]->empty())
plrTalent->second->state = PLAYERSPELL_REMOVED; // mark the talent in the talent map as removed
}
}
}