API:GetBannerConfigurationData
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Returns the configuration of the guild's standards (banners).
banners = GetBannerConfigurationData()
Arguments
None.
Returns
- banners
table– Array of banner tables, indexed from 1.
Each banner table has these fields:
| Key | Type | Meaning |
|---|---|---|
bannerID |
number |
Standard number. |
postID |
number |
Banner post. |
lastEdited |
number |
– |
isCaptured |
number |
– |
numberUnlockedAbilitySlots |
number |
Number of tactic slots unlocked on the standard. |
numberUnlockedTrophySlots |
number |
Number of trophy slots unlocked on the standard. |
abilitySlot1, abilitySlot2, … |
number |
Ability id in each tactic slot. Only as many fields as the standard has slot entries are set. |
Details
isCapturedis a number, not a boolean.- The
abilitySlotNfields can be missing; the stock UI uses 0 when one isnil. - If there is no player object, or the Lua state is not available, the function returns nothing.
Errors
None.
Example
From default/ea_guildwindow/source/guildwindowtabbanner.lua:
local bannerConfigurationData = GetBannerConfigurationData()
if ( bannerConfigurationData ~= nil) then
for key, value in ipairs( bannerConfigurationData ) do
GuildWindowTabBanner.Banners[key] = {}
GuildWindowTabBanner.Banners[key].bannerID = value.bannerID
GuildWindowTabBanner.Banners[key].lastEdited = value.lastEdited
GuildWindowTabBanner.Banners[key].postID = value.postID
GuildWindowTabBanner.Banners[key].isCaptured = value.isCaptured
...
if (value.abilitySlot1 == nil)
then
GuildWindowTabBanner.Banners[key].AbilityID[1] = 0
else
GuildWindowTabBanner.Banners[key].AbilityID[1] = value.abilitySlot1
end
