fix(PlayerMethods): corrected SetSkill argument order#391
Merged
Conversation
AzerothCore core expects: // Player.h void SetSkill(uint16 id, uint16 step, uint16 currVal, uint16 maxVal); // Player.cpp void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) But ALE was doing (incorrect): player->SetSkill(id, currVal, maxVal, step);
📝 WalkthroughWalkthroughThe ChangesSetSkill Argument Order Fix
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
iThorgrim
self-requested a review
July 15, 2026 22:50
iThorgrim
approved these changes
Jul 15, 2026
Aldori15
added a commit
to Aldori15/mod-ale
that referenced
this pull request
Jul 15, 2026
fix(PlayerMethods): corrected SetSkill argument order (azerothcore#391)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
Player:SetSkillargument forwarding in ALE.AzerothCore core expects:
ALE was reading the Lua arguments in that order, but forwarding them incorrectly here:
And according to the documentation, it matches the expectation from the Core. So this caused Lua calls like this to pass the values into the core as the wrong fields:
Fix
Summary by CodeRabbit