WoW:API IsInInstance: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Added a remark.)
No edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
Checks whether 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()
== Arguments ==
:none


== Returns ==
== Returns ==
:inInstance, instanceType
;inInstance : Boolean - Whether the player is in an instance; nil otherwise.
 
;instanceType : String - The instance type:
:;inInstance : [[Boolean]] - Whether the player is in an instance
;:* "none" when outside an instance
:;instanceType : String - The instance type
;:* "pvp" when in a battleground
:;:* "none" when outside an instance
;:* "arena" when in an arena
:;:* "pvp" when in a battleground
;:* "party" when in a 5-man instance
:;:* "arena" when in an arena
;:* "raid" when in a raid instance
:;:* "party" when in a 5-man instance
:;:* "raid" when in a raid instance


== Details ==
== Details ==
This functon returns correct results immediately upon PLAYER_ENTERING_WORLD.
This functon returns correct results immediately upon PLAYER_ENTERING_WORLD.

Revision as of 22:22, 30 July 2009

WoW API < IsInInstance

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

inInstance, instanceType = IsInInstance()

Returns

inInstance
Boolean - Whether the player is in an instance; nil otherwise.
instanceType
String - The instance type:
  • "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

Details

This functon returns correct results immediately upon PLAYER_ENTERING_WORLD.