otclient-redemption/modules/corelib/ui/uiactionslot.lua
kokekanon 90b4062457
fix: ActionBar packets (sendEquipItem) + Tier in actionbar
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.
2025-01-28 16:46:08 -03:00

15 lines
339 B
Lua

-- @docclass
UIActionSlot = extends(UIItem, 'UIActionSlot')
function UIActionSlot.create()
local slot = UIActionSlot.internalCreate()
slot.itemId = nil
slot.words = nil
slot.text = nil
slot.hotkey = nil
slot.useType = nil
slot.autoSend = nil
slot.parameter = nil
slot.getTier = nil
return slot
end