API:FuseItemEnhancements
From RoR Wiki
UI Lua API · ItemEnhancement functions
Version: WAR 1.4.8
Asks the server to fuse the slotted enhancements into the item, and closes the client's enhancement session.
FuseItemEnhancements()
Arguments
None.
Returns
Nothing.
Details
- Sends a "fuse" request to the server every time it is called. The client does not check that a session is open or that anything is slotted.
- Afterwards the client's "session open" mark is cleared, so a following EndItemEnhancement sends nothing.
- 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 mark is still cleared.
- Arguments are not checked; anything passed is ignored.
Errors
None.
Example
The stock UI only fuses when at least one slot holds an enhancement, from default/ea_itemenhancementwindow/source/itemenhancementwindow.lua:
function ItemEnhancementWindow.FuseEnhancements ()
for i = 1, GameDefs.MAX_ITEM_ENHANCEMENT_SLOTS do
if (g_enhInvSlots[i] > 0) then
FuseItemEnhancements ()
return
end
end
end
