[9731] Cleanup in skil steps code.

* Move step arg in SetSkill to end for make possible for it default value.
* Merge GetSkillStep function to SetSkill, base at fact that old GetSkillStep
  code can be != 0 only for already known spell, so at update
This commit is contained in:
VladimirMangos 2010-04-12 08:33:26 +04:00
parent c64a2e8c84
commit c7095fb3ed
7 changed files with 25 additions and 38 deletions

View file

@ -4087,7 +4087,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
HandleLearnSkillRecipesHelper(target,targetSkillInfo->id);
uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->id);
target->SetSkill(targetSkillInfo->id, target->GetSkillStep(targetSkillInfo->id), maxLevel, maxLevel);
target->SetSkill(targetSkillInfo->id, maxLevel, maxLevel);
PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str());
return true;
}