Skip to content

Commit

Permalink
feat(ProfessionNPC): correct get skill_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Winfidonarleyan committed Oct 22, 2021
1 parent 2898ce9 commit 7487995
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/mod-pvp-mode/src/scripts/ProfessionNpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,14 @@ class Professions_NPC : public CreatureScript
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()];
auto skill_name = SkillInfo->name[handler.GetSessionDbcLocale()];

if (!SkillInfo)
{
sLog->outError("Profession NPC: received non-valid skill ID (LearnAllRecipesInProfession)");
return false;
sLog->outError("Profession NPC: received non-valid skill ID (LearnAllRecipesInProfession)");
return false;
}

LearnSkillRecipesHelper(pPlayer, SkillInfo->id);
Expand Down

0 comments on commit 7487995

Please sign in to comment.