Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetGroupData

From RoR Wiki

UI Lua API · Game functions
Version: WAR 1.4.8

Returns a table describing the other members of the player's group.

members = GetGroupData()

Arguments

None.

Returns

members
table – Array of member tables, indexed from 1. One entry per groupmate slot; the player is not included.

Each member table has these fields:

Key Type Meaning
name wstring Character name. L"" for an empty slot.
careerName wstring Career name.
careerLine number Career line id.
level number Character level.
battleLevel number Battle (bolstered) level. Equal to level when the client has no separate battle level.
worldObjNum number World object number of the member.
healthPercent number Health, 0–100.
actionPointPercent number Action points, 0–100.
moraleLevel number Morale rank, 0–4, derived from the member's morale percentage.
isGroupLeader boolean —
isRVRFlagged boolean —
isInSameRegion boolean —
isMainAssist boolean —
isMasterLooter boolean —
isAssistant boolean true if the member is in the warband's assistant list.
zoneNum number Zone id.
online boolean —
isDistant boolean —
Pet table Table with one field, healthPercent (number), the health of the member's pet.

Details

  • battleLevel falls back to level when the stored battle level is 0.
  • moraleLevel is converted from a percentage to a rank (0–4) with the client's fixed morale thresholds.
  • If there is no player object, or the Lua state is not available, the function returns nothing.
  • A new table is built on every call. The stock UI caches it in PartyUtils.GetPartyData() (easystem_utils/source/partyutils.lua) and refreshes single members with GetGroupMemberStatusData. Its comments ask addons to prefer the PartyUtils functions.

Errors

None.

Example

From easystem_utils/source/partyutils.lua:

function PartyUtils.GetPartyData()
    if( GameData.Party.partyDirty )
    then
        partyData = GetGroupData()
        GameData.Party.partyDirty = false
    end
    return partyData
end

Testing for an empty slot, from the same file:

if( member ~= nil and member.name ~= nil and member.name ~= L"" )

See also