Repository navigation
fix: show an inspected player's talents on a 2.4.3 server - #589
Merged
Merged
Conversation
A 2.4.3 server answers an inspect with a talent bit array, which the proxy has left unread since #580, so the 2.5 client's inspect talent tree stayed empty: no points in any tab, every rank 0. cMaNGOS TBC packs seven positions to a byte and leaves the high bit clear. The 2.5.2 and 2.5.3 clients read the array eight positions to a byte, and their Talent and TalentTab tables give every talent the position 2.4.3's give it (all 579 talents, every class). So the bits are repacked as they are, and the proxy needs no talent tables. Verified with two 2.5.3 clients on cMaNGOS TBC: a 46/6/0 rogue's 19 talents show in the inspect with the ranks of its own talent frame, and the inspected gear is unchanged. Fixes #588 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #588.
What was wrong
On a 2.4.3 server,
SMSG_INSPECT_TALENTcarries a uint32 length (0x3D) and a talent bit array. Since #580 the proxy no longer misreads those bytes as 3.3.5a talent groups, but it did not read them at all, so a 2.5 client's inspect talent tree stayed empty: no points in any tab, every rank 0.The fix
cMaNGOS TBC (
HandleInspectOpcode) sets one bit per learned talent, for the rank the player has. A class's three tabs follow one another, and inside a tab the talents go by row, column and id, each taking as many positions as it has ranks. It packs seven positions to a byte and leaves the high bit clear.The 2.5.2 (40892) and 2.5.3 (42328) clients' Talent and TalentTab tables match the 2.4.3 Talent.dbc and TalentTab.dbc the server loads: all 579 talents have the same tab, row, column and max rank, and every tab has the same class and order. So every talent sits at the same position on both sides, for every class, and the proxy only changes the packing to eight positions per byte (
InspectTalentBits). It needs no talent tables and allocates nothing per inspect beyond the packet's own list. The client gets 25 bytes, which covers 200 positions; the class with the most, warrior, uses 199.@celguar's decoder (celguar/HermesProxy@e3f3973) was the starting point for this. Thank you!
Verified
tab1=0, tab2=0, tab3=0. With the fix, the inspect shows all 19 talents with the same ranks and tab points as the rogue's own talent frame.SMSG_INSPECT_RESULT(845 bytes against 820 on master).dotnet test: 4736 passed, 0 failed.InspectTalentBitsTestsmaps every position from 0 to 199 and the rogue's captured array.TBCInspectGearTests.ATalentedPlayer_KeepsTheirTalents(2.4.3-pinned run) fails with the fix taken out.Also regenerates docs/wotlk-progress.md and docs/cata-progress.md.
🤖 Generated with Claude Code