WoW:API IsInInstance: Difference between revisions

Updated to match the current API boilerplate.
(Added "arena" return)
(Updated to match the current API boilerplate.)
Line 1: Line 1:
{{Stub/API}}
{{wowapi}} __NOTOC__
{{wowapi}}


Returns 1 if the player is in an instance and the type of instance.
Checks whether the player is in an instance and the type of instance.


  inInstance, instanceType = IsInInstance()
  inInstance, instanceType = IsInInstance()


== Parameters ==
== Arguments ==
:none


<big>'''Returns'''</big>
 
== Returns ==
:inInstance, instanceType
:inInstance, instanceType


:;inInstance : Boolean - nil or 1
:;inInstance : [[Boolean]] - Whether the player is in an instance
:;instanceType : String - see below
:;instanceType : String - The instance type
 
:;:* "none" when outside an instance
 
:;:* "pvp" when in a battleground
==Details==
:;:* "arena" when in an arena
 
:;:* "party" when in a 5-man instance
:; instanceType
:;:* "raid" when in a raid instance
:: "none" when outside an instance
:: "pvp" when in a battleground
:: "arena" when in an arena
:: "party" when in a 5-man instance
:: "raid" when in a raid instance
 
: Needs more testing and documentation.
Anonymous user