fix: ActionBar packets (sendEquipItem) + Tier in actionbar #1073
+59
−22
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.
Description
The function sendEquipItem (which only affects game_actionbar) was sending 2 packets:
according OTCR
u16 the itemId
u8 or u16 countOrSubType
But this is incorrect.
According to Canary, the 2 packets to send are:
u16 the itemId
u8 tier.
This error manifests when trying to equip an item with a tier through the action bar.
The client sends the itemId and count (1).
For example, attempting to equip an Helmet tier +5.
The server interprets itemId and tier = 1(count), failing to find the item.
As a result, it doesn't work.
Canary 13.40
2 packets:
U16 item ID
u8 Tier
https://github.com/opentibiabr/canary/blob/5781de718e5d22ce9e7f136151d8b4032c85843d/src/server/network/protocol/protocolgame.cpp#L1392-L1400
Tfs 10.98 blacktek
only packet U16 Item ID ( no have this feature GameThingUpgradeClassification)
https://github.com/Black-Tek/BlackTek-Server/blob/7130b41899fcb643b582e78a52ff27e891110d54/src/protocolgame.cpp#L983-L989
tfs forgottenserver-optimized SaiyansKing
only packet U16 Item ID ( no have this feature GameThingUpgradeClassification)
https://github.com/mehah/forgottenserver-optimized/blob/148baaa48c8ca159b16d0b632bd813749399b013/src/protocolgame.cpp#L1256-L1262
tfs 8.6
does not have this function
tfs 13.10
13.10 does not have many features, this is one of them
https://github.com/otland/forgottenserver/blob/b227678ab3584b8349913abfe4529292678a3fdf/src/protocolgame.cpp#L1300-L1308
Behavior
Actual
Expected
Fixes
usser in discord
Type of change
How Has This Been Tested
Test Configuration:
Checklist