mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
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.
15 lines
339 B
Lua
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
|