IsInInstance

From Wowpedia
Revision as of 16:36, 9 November 2013 by @DeletedUser40309385 (talk | contribs) (Add scenario instanceType)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

inInstance, instanceType = IsInInstance()

Returns

inInstance 
Flag - 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
  • "scenario" when in a scenario

Details

This functon returns correct results immediately upon PLAYER_ENTERING_WORLD.