Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:RemoveEffect

From RoR Wiki

UI Lua API · Effect functions
Version: WAR 1.4.8

Asks the server to remove (click off) one of the player's own effects.

RemoveEffect(effectIndex)

Arguments

effectIndex
number – Index of the effect, as given in the player's buff data (effectIndex).

Returns

Nothing.

Details

  • Sends a "remove effect" request with effectIndex to the server. Only the low 8 bits of the value are sent (0–255).
  • The client does not check that the effect exists or can be removed. The server decides.
  • Exactly one argument must be passed.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

Right-clicking a buff icon, from default/eatemplate_unitframes/source/bufftracker.lua:

local buffData = buffFrame.m_buffData
if ( IsValidBuff( buffData ) )
then
    RemoveEffect( buffData.effectIndex )
end

See also