fix(Scripts/Commands): Fixed command learn all my talents for chars… (#13529)

fix(Scripts/Commands): Fixed command `learn all my talents` for chars with 255 level.

Fixes #4788
This commit is contained in:
UltraNix
2022-10-29 12:12:35 +02:00
committed by GitHub
parent bcd9ad5066
commit 41d3df9fcb
3 changed files with 49 additions and 27 deletions

View File

@@ -195,9 +195,12 @@ public:
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo))
continue;
player->LearnTalent(talentInfo->TalentID, rankId);
player->LearnTalent(talentInfo->TalentID, rankId, true);
}
player->SetFreeTalentPoints(0);
player->SendTalentsInfoData(false);
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_TALENTS);
return true;
}