API:GetHotbarGlowLevels
From RoR Wiki
UI Lua API · Hotbar functions
Version: WAR 1.4.8
Returns the improvement threshold and cap of the ability in a hotbar slot.
glowAt, glowCap = GetHotbarGlowLevels(slot)
Arguments
- slot
number– Hotbar slot, 1 to 132 (GameData.HOTBAR_TOTAL_SLOT_COUNT).
Returns
- glowAt
number– The ability'sabilityImprovementThreshold(see GetAbilityData).- glowCap
number– The ability'sabilityImprovementCap.
Details
- Only slots holding an ability with action type 1 are looked at. For other slots, empty slots, unknown abilities and slots outside 1 to 132 the result is 0, 0.
- The stock action buttons store the values as
m_GlowAtXPointsandm_GlowCap. - If there is no player object, or the Lua state is not available, the function returns nothing.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a number.
Example
From ea_actionbars/source/actionbutton.lua:
self.m_GlowAtXPoints, self.m_GlowCap = GetHotbarGlowLevels (slot)
