WoW:API IsInInstance: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
;:* "party" when in a 5-man instance
;:* "party" when in a 5-man instance
;:* "raid" when in a raid instance
;:* "raid" when in a raid instance
;:* nil when in an unknown kind of instance, eg. in a scenario


== 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 15:51, 31 October 2012

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
  • nil when in an unknown kind of instance, eg. in a scenario

Details

This functon returns correct results immediately upon PLAYER_ENTERING_WORLD.