Fixed bug with professions in trainer list not being marked as known until trainer list re-opened.

This commit is contained in:
tomrus88 2010-03-27 19:41:15 +03:00
parent 112046718a
commit b99f51a984
13 changed files with 108 additions and 91 deletions

View file

@ -3989,7 +3989,7 @@ void ChatHandler::HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id)
if(!spellInfo || !SpellMgr::IsSpellValid(spellInfo,player,false))
continue;
player->learnSpell(skillLine->spellId, 0, false);
player->learnSpell(skillLine->spellId, false);
}
}
@ -4084,7 +4084,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
HandleLearnSkillRecipesHelper(target,targetSkillInfo->id);
uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->id);
target->SetSkill(targetSkillInfo->id, maxLevel, maxLevel);
target->SetSkill(targetSkillInfo->id, target->GetSkillStep(targetSkillInfo->id), maxLevel, maxLevel);
PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str());
return true;
}