Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetBlockedAbilities

From RoR Wiki

UI Lua API · Ability functions
Version: WAR 1.4.8

Returns the abilities that are currently blocked for the player, grouped by kind.

blocked = GetBlockedAbilities()

Arguments

None.

Returns

blocked
table – Table with three fields. Nothing is returned if there is no player object or the client has no blocked-ability data.
Key Type Meaning
standard table Array of ability ids (number), indexed from 1.
tactic table Array of tactic ability ids, indexed from 1.
morale table Array of morale ability ids, indexed from 1.

Details

  • Entries of the client's blocked-ability list that are not active are skipped.
  • A new table is built on every call. The stock Player.IsAbilityBlocked (easystem_utils/source/player.lua) caches it and refreshes it when GameData.Player.blockedAbilitiesDirty is set.

Errors

None.

Example

From easystem_utils/source/player.lua:

local function GetBlockedAbilitiesOfType( abilityType )
    if( GameData.Player.blockedAbilitiesDirty )
    then
        GameData.Player.blockedAbilitiesDirty = false
        m_blockedAbilities = GetBlockedAbilities()
    end

    if( abilityType == GameData.AbilityType.STANDARD )
    then
        return m_blockedAbilities.standard
    elseif( abilityType == GameData.AbilityType.TACTIC )
    then
        return m_blockedAbilities.tactic
    elseif( abilityType == GameData.AbilityType.MORALE )
    then
        return m_blockedAbilities.morale
    end

See also