Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetWarbandMemberStatus

From RoR Wiki

UI Lua API · Group functions
Version: WAR 1.4.8

Returns the frequently changing status values of one warband member.

status = GetWarbandMemberStatus(partyIndex, memberIndex)

Arguments

partyIndex
number – Warband party, 1 to 4. Only the low 8 bits are used.
memberIndex
number – Member within that party, starting at 1. Only the low 8 bits are used.

Returns

status
table – Status table (see below), or nothing if an index is out of range or there is no player object.
Key Type Meaning
healthPercent number Health, 0–100.
actionPointPercent number Action points, 0–100.
moraleLevel number Morale rank, 0–4, derived from the member's morale percentage.
level number Character level.
battleLevel number Battle (bolstered) level. Equal to level when the stored battle level is 0.
isRVRFlagged boolean –
zoneNum number Zone id.
online boolean –
isDistant boolean –
worldObjNum number World object number of the member.

Details

  • The fields match those of GetGroupMemberStatusData, without the pet's health.
  • memberIndex must be lower than or equal to the number of members the client has for that party.
  • The stock UI calls this function only after GetAndClearWarbandMemberDirtyFlag returned true for the same member, and copies the values into its cached GetBattlegroupMemberData table.
  • The function needs at least two arguments and only reads the last two.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

From default/easystem_utils/source/partyutils.lua (PartyUtils.GetWarbandMember, shortened):

local member = party.players[memberIndex]

if( GetAndClearWarbandMemberDirtyFlag( partyIndex, memberIndex ) )
then
    local memberData = GetWarbandMemberStatus( partyIndex, memberIndex )
    member.healthPercent = memberData.healthPercent
    member.actionPointPercent = memberData.actionPointPercent
    member.moraleLevel = memberData.moraleLevel
    ...
end

See also