WoW:API GetInstanceInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GetInstanceInfo to API GetInstanceInfo without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
Returns information about the current instances the player is in.
Returns information about the current instances the player is in.


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


=== Returns ===
== Returns ==
:;name : String - the name of the instance (localized), otherwise the continent name (eg: Eastern Kingdoms, Kalimdor, Northrend, Outland)
# 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".
# type (string) - "none" if the player is not in an instance, "party" if in party, "raid" if in a raid, "pvp" for battlegrounds, "arena" for arenas. Many of following result values will be nil or otherwise useless in the case of "none".
:;difficultyIndex : Number - the difficulty of the instance (see Details)
# difficultyIndex (number) - the difficulty of the instance (see Details)
:;difficultyName : String - the difficulty of the instance ("10 Player", "25 Player (Heroic)", etc)
# difficultyName (string) - the difficulty of the instance ("10 Player", "25 Player (Heroic)", etc)
:;maxPlayers : Number - maximum number of players permitted inside
# maxPlayers (number) - maximum number of players permitted inside
:;dynamicDifficulty : Number - For dynamic instances: 0=Normal 1=Heroic
# dynamicDifficulty (number) - For dynamic instances: 0=Normal 1=Heroic
:;isDynamic : boolean - If the instance difficulty can be changed while zoned in
# isDynamic (Boolean) - If the instance difficulty can be changed while zoned in
# instanceMapID (number) - [[InstanceMapID]] for the instance. not the same as [[MapID]].
# lfgID (number)


==Details==
== Details ==


== Notes ==
* difficultyIndex "difficulty level" is the difficulty mode like 10 / 25 player and described in [[API_GetInstanceDifficulty|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
* Added in 3.2, additional return values added in 3.3
* "difficulty of the instance" is described in [[API_GetInstanceDifficulty|GetInstanceDifficulty()]]
* isDynamic is only useful in places like Icecrown Citadel where the difficulty mode can be changed on the fly.
* In dynamic instances, difficultyIndex will only be 1 for 10man, or 2 25man.
* 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.
* With 5.0.4 continents are considered 'instances', so when not inside an instance you are in a continent 'instance'.
* mapID added in [[Patch 5.0.4]]

Latest revision as of 04:46, 15 August 2023

WoW API < GetInstanceInfo

Returns information about the current instances the player is in.

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

Returns[edit]

  1. name (string) - the name of the instance (localized), otherwise the continent name (eg: Eastern Kingdoms, Kalimdor, Northrend, Outland)
  2. type (string) - "none" if the player is not in an instance, "party" if in party, "raid" if in a raid, "pvp" for battlegrounds, "arena" for arenas. Many of following result values will be nil or otherwise useless in the case of "none".
  3. difficultyIndex (number) - the difficulty of the instance (see Details)
  4. difficultyName (string) - the difficulty of the instance ("10 Player", "25 Player (Heroic)", etc)
  5. maxPlayers (number) - maximum number of players permitted inside
  6. dynamicDifficulty (number) - For dynamic instances: 0=Normal 1=Heroic
  7. isDynamic (Boolean) - If the instance difficulty can be changed while zoned in
  8. instanceMapID (number) - InstanceMapID for the instance. not the same as MapID.
  9. lfgID (number)

Details[edit]

Notes[edit]

  • 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[edit]

  • 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.
  • With 5.0.4 continents are considered 'instances', so when not inside an instance you are in a continent 'instance'.
  • mapID added in Patch 5.0.4