bool LearnAllRecipesInProfession(Player* pPlayer, SkillType skill) { const char* skill_name; SkillLineEntry const *SkillInfo = sSkillLineStore.LookupEntry(skill); skill_name = SkillInfo->name[ChatHandler(pPlayer).GetSessionDbcLocale()]; if (!SkillInfo) { sLog->outError("Profession NPC: received non-valid skill ID (LearnAllRecipesInProfession)"); return false; } LearnSkillRecipesHelper(pPlayer, SkillInfo->id); pPlayer->SetSkill(SkillInfo->id, pPlayer->GetSkillStep(SkillInfo->id), 450, 450); ChatHandler(pPlayer).PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, skill_name); return true; }
bool LearnAllRecipesInProfession(Player *pPlayer, SkillType skill) { ChatHandler handler(pPlayer->GetSession()); char* skill_name; SkillLineEntry const *SkillInfo = sSkillLineStore.LookupEntry(skill); skill_name = SkillInfo->name[handler.GetSessionDbcLocale()]; if (!SkillInfo) { TC_LOG_ERROR("server.loading", "Profession NPC: received non-valid skill ID (LearnAllRecipesInProfession)"); } LearnSkillRecipesHelper(pPlayer, SkillInfo->id); pPlayer->SetSkill(SkillInfo->id, pPlayer->GetSkillStep(SkillInfo->id), 450, 450); handler.PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, skill_name); return true; }
bool LearnAllRecipesInProfession(Player* player, SkillType skill) { ChatHandler handler(player); char* skill_name; SkillLineEntry const *SkillInfo = sSkillLineStore.LookupEntry(skill); skill_name = SkillInfo->name[handler.GetSessionDbcLocale()]; if (!SkillInfo) { sLog->OutErrorConsole("Profession Master: received non-valid skill ID (LearnAllRecipesInProfession)"); return false; } LearnSkillRecipesHelper(player, SkillInfo->id); uint16 maxLevel = player->GetPureMaxSkillValue(SkillInfo->id); player->SetSkill(SkillInfo->id, player->GetSkillStep(SkillInfo->id), maxLevel, maxLevel); handler.PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, skill_name); return true; }
bool LearnAllRecipesInProfession(Player *pPlayer, SkillType skill) { ChatHandler handler(pPlayer->GetSession()); std::string skill_name; SkillLineEntry const *SkillInfo = sSkillLineStore.LookupEntry(skill); skill_name, SkillInfo->name[handler.GetSessionDbcLocale()]; if (!SkillInfo) { sLog->outError(LOG_FILTER_GENERAL, "Profession NPC: received non-valid skill ID (LearnAllRecipesInProfession)"); return false; } LearnSkillRecipesHelper(pPlayer, SkillInfo->id); uint16 maxLevel = pPlayer->GetPureMaxSkillValue(SkillInfo->id); pPlayer->SetSkill(SkillInfo->id, pPlayer->GetSkillStep(SkillInfo->id), maxLevel, maxLevel); handler.PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, skill_name.c_str()); return true; }