summaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorUltraNix <80540499+UltraNix@users.noreply.github.com>2022-10-29 12:12:35 +0200
committerGitHub <noreply@github.com>2022-10-29 07:12:35 -0300
commit41d3df9fcbc862f9bb4cda89e213e75255fe98b6 (patch)
tree9250f6e71dc8dee40b8df566abf723ea7cf6c9d0 /src/server/scripts/Commands
parentbcd9ad5066a86402aa5c917cd6d2ed227a33709e (diff)
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
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_learn.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp
index 6ea772dd49..c997afab6a 100644
--- a/src/server/scripts/Commands/cs_learn.cpp
+++ b/src/server/scripts/Commands/cs_learn.cpp
@@ -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;
}