bool PlayerAlreadyHasTwoProfessions(const Player *pPlayer) const
{
uint32 skillCount = 0;
if (pPlayer->HasSkill(SKILL_MINING))
skillCount++;
if (pPlayer->HasSkill(SKILL_SKINNING))
skillCount++;
if (pPlayer->HasSkill(SKILL_HERBALISM))
skillCount++;
if (skillCount >= 2)
return true;
for (uint32 i = 1; i < sSkillLineStore.GetNumRows(); ++i)
{
SkillLineEntry const *SkillInfo = sSkillLineStore.LookupEntry(i);
if (!SkillInfo)
continue;
if (SkillInfo->categoryId == SKILL_CATEGORY_SECONDARY)
continue;
if ((SkillInfo->categoryId != SKILL_CATEGORY_PROFESSION) || !SkillInfo->canLink)
continue;
const uint32 skillID = SkillInfo->id;
if (pPlayer->HasSkill(skillID))
skillCount++;