WoW:API InCombatLockdown: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
{{wowapi}}__NOTOC__
{{wowapi}}__NOTOC__
Determinates if in-combat lockdown restrictions are active or not.
Determines whether in-combat lockdown restrictions are active.
These restrictions prevent access to some API functions and frame methods while in combat.
inLockdown = InCombatLockdown()


InCombatLockdown()
==Returns==
 
; inLockdown : Flag - 1 if lockdown restrictions are currently in effect, nil otherwise.
==Parameters==
===Arguments===
:;none
 
===Return===
:;nil or 1


==Notes==
==Notes==
*This function starts to return 1 after event "PLAYER_REGEN_DISABLED" has been fired.
* This function starts to return 1 after event "PLAYER_REGEN_DISABLED" has been fired.
*Returns nil once again once event "PLAYER_REGEN_ENABLED" has been fired.
* Returns nil once again once event "PLAYER_REGEN_ENABLED" has been fired.


==Restrictions==
==Restrictions==
Line 24: Line 18:
**Changing the frame's attributes (custom attributes are used by Blizzard secure templates to set up their behavior).
**Changing the frame's attributes (custom attributes are used by Blizzard secure templates to set up their behavior).
**Moving the frame by resetting frame's points or anchors (movements initiated by user are still allowed while in combat).
**Moving the frame by resetting frame's points or anchors (movements initiated by user are still allowed while in combat).
**[To be continued]

Revision as of 12:26, 8 March 2010

WoW API < InCombatLockdown

Determines whether in-combat lockdown restrictions are active.

inLockdown = InCombatLockdown()

Returns

inLockdown
Flag - 1 if lockdown restrictions are currently in effect, nil otherwise.

Notes

  • This function starts to return 1 after event "PLAYER_REGEN_DISABLED" has been fired.
  • Returns nil once again once event "PLAYER_REGEN_ENABLED" has been fired.

Restrictions

While in combat:

  • Programatic modification of macros or bindings is not allowed.
  • Some things can't be done on "Protected" frames, their parents, or any frame they are anchored to. These include, but are not restricted to:
    • Hiding the frame using Hide widget method.
    • Showing the frame using Show widget method.
    • Changing the frame's attributes (custom attributes are used by Blizzard secure templates to set up their behavior).
    • Moving the frame by resetting frame's points or anchors (movements initiated by user are still allowed while in combat).