azerothcore / mod-npc-free-professions

Gives free professions to the player with all recipes
http://www.azerothcore.org/
12 stars 20 forks source link

[Herbalism] don't remove Lifeblood #17

Open r0m1ntik opened 3 years ago

r0m1ntik commented 3 years ago

On remove profession Herbalism , Lifeblood not removed.

in

void Player::SetSkill(uint32 id, uint16 step, uint16 newVal, uint16 maxVal)

Remove if have first rank, but have just (rank 6)

// remove all spells that related to this skill
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
    if (SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j))
        if (pAbility->SkillLine == id)
            RemoveSpell(sSpellMgr->GetFirstSpellInChain(pAbility->Spell));
r0m1ntik commented 3 years ago

@Helias

Helias commented 3 years ago

You're right. We should make a PR for it

IntelligentQuantum commented 2 years ago

In fact, we have to fix the unlearn profession in the source, The learning and unlearning system in AC does not work properly. And that this problem occurred in the new update.