azerothcore-wotlk
azerothcore-wotlk copied to clipboard
fix(Core/CharacterHandler): Updated racial skills to be deleted on faction/race change
Racial skills are not being deleted on faction/race changes, resulting in the following server error message when players login after race/faction changes:
Character GUID Full: {} Type: Player Low: {} has skill {} that does not exist.
If a player changes race multiple times, they will accumulate multiple unusable racial skills in the database resulting in multiple error messages as above.
The changes in this commit update the player skills on race/faction change to prevent this behaviour.
Changes Proposed:
This PR proposes changes to:
- [x] Core (units, players, creatures, game systems).
- [ ] Scripts (bosses, spell scripts, creature scripts).
- [ ] Database (SAI, creatures, etc).
Tests Performed:
This PR has been:
- [x] Tested in-game by the author.
- [ ] Tested in-game by other community members/someone else other than the author/has been live on production servers.
- [ ] This pull request requires further testing and may have edge cases to be tested.
How to Test the Changes:
- [ ] This pull request can be tested by following the reproduction steps provided in the linked issue
- [x] This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.
- Create a character of any race, e.g. night elf.
- Trigger a race-change, and select a different race.
- Without this PR, the following warning message will appear in the server console:
Character GUID Full: {} Type: Player Low: {} has skill {} that does not exist.
- With this PR, no error messages are reported because the unusable skills were removed.
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.
@Kitzunu Thanks for approving, please ignore my 2nd review request! Sent it by accident
I approved it because the code looks good. I am however unsure if it is the right approach or if there is something wrong with SkillLineAbility on unlearn
The skills system have bug with mod-racial-trait-swap,after a relogin,old skill will added to player,then player have two trait.....
What status is this pull request in?
Before adding the fix
I made the change again, and the error no longer appears. The error message is before making the faction change. You can see it, because then the command is executed.