WoW:API GetInstanceInfo: Difference between revisions
Jump to navigation
Jump to search
(updated for 3.3, removed silly "patch changes" section (why would those not be the normal description now?)) |
|||
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, | name, type, difficultyIndex, difficultyName, maxPlayers, playerDifficulty, isDynamic = 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 | :;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 | :;difficultyName : String - the difficulty of the instance | ||
:;maxPlayers : Number - maximum number of players permitted inside | |||
:;playerDifficulty : ? - ? | |||
:;isDynamic : ? - ? | |||
==Details== | ==Details== | ||
* Added in 3.2 | * Added in 3.2, additional return values added in 3.3 | ||
* "difficulty of the instance" is described in [[API_GetInstanceDifficulty|GetInstanceDifficulty()]] | * "difficulty of the instance" is described in [[API_GetInstanceDifficulty|GetInstanceDifficulty()]] | ||
* isDynamic (presumably a boolean value) is only useful in places like Icecrown Citadel where the difficulty mode can be changed on the fly. As of this writing, none of those modes are unlocked yet. | |||
Revision as of 22:02, 26 December 2009
Returns information about the current instances the player is in.
name, type, difficultyIndex, difficultyName, maxPlayers, playerDifficulty, isDynamic = 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
- maxPlayers
- Number - maximum number of players permitted inside
- playerDifficulty
- ? - ?
- isDynamic
- ? - ?
Details
- Added in 3.2, additional return values added in 3.3
- "difficulty of the instance" is described in GetInstanceDifficulty()
- isDynamic (presumably a boolean value) is only useful in places like Icecrown Citadel where the difficulty mode can be changed on the fly. As of this writing, none of those modes are unlocked yet.