Wikia

WoWWiki

API GetInstanceInfo

Talk0
100,577pages on
this wiki
Revision as of 23:24, October 9, 2012 by Celess22 (Talk | contribs)

WoW API < GetInstanceInfo

Returns information about the current instances the player is in.

name, type, difficultyIndex, difficultyName, maxPlayers, dynamicDifficulty,
    isDynamic, mapID = GetInstanceInfo()

Returns

name 
String - the name of the instance (localized), otherwise the continent name (eg: Eastern Kingdoms, Kalimdor, Northrend, Outland)
type 
String - "none" if the player is not in an instance, "party" if in party, "raid" if in a raid, "pvp" for battleground. Many of the following result values will be nil or otherwise useless in the case of "none".
difficultyIndex 
Number - the difficulty of the instance (see Details)
difficultyName 
String - the difficulty of the instance ("10 Player", "25 Player (Heroic)", etc)
maxPlayers 
Number - maximum number of players permitted inside
dynamicDifficulty 
Number - For dynamic instances: 0=Normal 1=Heroic
isDynamic 
boolean - If the instance difficulty can be changed while zoned in
mapID 
Number - the instance mapID. with 5.0.4 continents are considered 'instances'. not the same as mapID.

Details

Notes

  • difficultyIndex "difficulty level" is the difficulty mode like 10 / 25 player and described in GetInstanceDifficulty()
  • Is isDynamic is only useful in places like Icecrown Citadel where the difficulty mode can be changed on the fly.
  • mapID allows absolute identification of current instance without using localized names or other more complex means.

Patches

  • Added in 3.2, additional return values added in 3.3
  • In dynamic instances, difficultyIndex will only be 1 for 10man, or 2 25man.
  • In 5.0.4 dynamicDifficulty and difficultyIndex have changed. difficultyIndex is now used to determine a dynamic instance like heroic as well as 10 / 25 modes. dynamicDifficulty returns 0.
  • mapID added in Patch 5.0.4

Around Wikia's network

Random Wiki