API:BeginItemEnhancement
From RoR Wiki
UI Lua API · ItemEnhancement functions
Version: WAR 1.4.8
Asks the server to start an item enhancement session for an item in the backpack.
BeginItemEnhancement(inventorySlot)
Arguments
- inventorySlot
number– Slot of the item to enhance in the main inventory backpack, starting at 1.
Returns
Nothing.
Details
- If
inventorySlotis less than 1 or above the inventory slot limit the client stores for the player, nothing happens. - Otherwise a "begin enhancement" request for that item is sent to the server, and the client marks an enhancement session as open. EndItemEnhancement only sends its request while this mark is set.
- The client function does not open any window itself.
- If one of the player's state flags blocks item enhancement, no request is sent and a built-in error message is printed to the Chat log instead. The session is still marked as open in this case.
- Exactly one argument must be passed.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a number.
Example
Shift-right-clicking an enhanceable item in the backpack, from default/ea_backpackwindow/source/backpackutils.lua:
elseif (isEnhanceable and shiftPressed) then
BeginItemEnhancement (slot)
