WoW:API GetFactionInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Reformatted, moved StandingId to its own page.)
Line 1: Line 1:
<center>'''GetFactionInfo''' ''-Documentation by [[user:Ulic|Ulic]]-''</center>
<center>'''GetFactionInfo''' - ''Documentation by [[User:Ulic|Ulic]]''</center>


<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Get's details for a specific faction/faction header.
Get's information for Factions, also known as Reputation.
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
name, description, standingID, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed = GetFactionInfo(factionIndex);
 
*this info is current as of the 1.4 patch, thanks goes to Saien of Hyjal on the official forums for discovering the new values and order.


name, description, standingId, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed = GetFactionInfo(factionIndex)
== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
<!-- List each argument, together with its type -->
:(factionIndex)
:(factionIndex)


:;factionIndex : Integer - the row which you wish to request info
:;factionIndex : Integer - The row of the faction display to request information from.
 
=== Returns ===
=== Returns ===
;''Returns''
:name, description, standingId, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed
<!-- List each return value, together with its type -->
:name, description, standingID, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed
 
:;name : String - Name of the Faction or Grouping
:;description : String?? - I have a decent number of factions on my main, this always returns nil
:;standingID : Number - A numeric value that can be associated to a string for displaying the Standing text
:::''0 = "Unknown"''
:::''1 = "Hated"''
:::''2 = "Hostile"''
:::''3 = "Unfriendly"''
:::''4 = "Neutral"''
:::''5 = "Friendly"''
:::''6 = "Honored"''
:::''7 = "Revered"''
:::''8 = "Exalted"''
:;barValue : Number - the fractional number representing the how long to draw the bar
:;atWarWith : Boolean - true, is at war
:;canToggleAtWar : Boolean - true, can toggle at war status
:;isHeader : Boolean - true, is a header entry
:;isCollapsed : Boolean - true, is collapsed


:;name : String - The display name/label for this row.
:;description : String - Not currently used (always returns "")
:;standingId : Integer [[API TYPE StandingId|StandingId]] - Numeric representation of standing with faction (present for header rows, though its significance is unknown)
:;barValue : Number - Floating point value between 0 and 1 representing how much of the standing bar should be filled in (Present for header rows, but significance of value is unknown).
:;atWarWith : Flag - 1 if player is at war with the faction, nil otherwise.
:;canToggleAtWar : Flag - 1 if player can toggle the 'At War' flag for this faction, nil otherwise.
:;isHeader : Flag - 1 if this row is a header row, nil otherwise.
:;isCollapsed : Flag - 1 if this row is a collapsed header row, nil otherwise.
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}
{{Template:WoW API}}
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. -->
[[Category:API Functions|GetFactionInfo]]
[[Category:API Faction Functions|GetFactionInfo]]
[[Category:API Faction Functions|GetFactionInfo]]

Revision as of 20:28, 11 September 2005

GetFactionInfo - Documentation by Ulic

Get's details for a specific faction/faction header.

name, description, standingId, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed = GetFactionInfo(factionIndex)

Parameters

Arguments

(factionIndex)
factionIndex
Integer - The row of the faction display to request information from.

Returns

name, description, standingId, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed
name
String - The display name/label for this row.
description
String - Not currently used (always returns "")
standingId
Integer StandingId - Numeric representation of standing with faction (present for header rows, though its significance is unknown)
barValue
Number - Floating point value between 0 and 1 representing how much of the standing bar should be filled in (Present for header rows, but significance of value is unknown).
atWarWith
Flag - 1 if player is at war with the faction, nil otherwise.
canToggleAtWar
Flag - 1 if player can toggle the 'At War' flag for this faction, nil otherwise.
isHeader
Flag - 1 if this row is a header row, nil otherwise.
isCollapsed
Flag - 1 if this row is a collapsed header row, nil otherwise.

Template:WoW API