API:GetBattlegroupMemberData
From RoR Wiki
UI Lua API · Group functions
Version: WAR 1.4.8
Returns the members of all four parties of the player's warband.
parties = GetBattlegroupMemberData()
Arguments
None.
Returns
- parties
table– Array of exactly four party tables,parties[1]toparties[4].
Each party table has one field:
| Key | Type | Meaning |
|---|---|---|
players |
table |
Array of member tables, indexed from 1. Empty for a party that does not exist. |
Each member table has the same fields as the member tables of GetGroupData: name, careerName, careerLine, level, battleLevel, worldObjNum, healthPercent, actionPointPercent, moraleLevel, isGroupLeader, isRVRFlagged, isInSameRegion, isMainAssist, isMasterLooter, isAssistant, zoneNum, online, isDistant and Pet (a table with healthPercent). Both functions fill the member tables with the same code.
Details
- The four party tables are always present; a party the client has no data for gets an empty
playerstable. isAssistantistruewhen the member is in the warband's assistant list.- A new table is built on every call. The stock UI caches it in
PartyUtils.GetWarbandData()(refreshed whenGameData.Party.warbandDirtyis set) and refreshes single members with GetWarbandMemberStatus. Its comments ask addons to prefer thePartyUtilsfunctions.
Errors
None.
Example
From default/easystem_utils/source/partyutils.lua:
function PartyUtils.GetWarbandData()
if( GameData.Party.warbandDirty )
then
warbandParties = GetBattlegroupMemberData()
GameData.Party.warbandDirty = false
end
return warbandParties
end
Reading one member (same file):
local party = PartyUtils.GetWarbandParty( partyIndex ) local member = party.players[memberIndex]
