API:GetBolsterBuddy
From RoR Wiki
UI Lua API · Group functions
Version: WAR 1.4.8
Returns the name of the player's bolster partner, or nothing if there is none.
name = GetBolsterBuddy()
Arguments
None.
Returns
- name
wstring– Character name of the bolster partner. Nothing if the player has no partner or the name cannot be found.
Details
- The client keeps the partner as a world object reference and looks the name up among the group or warband members. If the partner is not found there, the function returns nothing.
- The stock UI uses the result both as a yes/no test (
if GetBolsterBuddy() then) and to compare against a member's name. - Arguments are not read.
Errors
None.
Example
From default/easystem_utils/source/partyutils.lua (PartyUtils.GetBolsterMenuText):
local bolsterBuddy = GetBolsterBuddy()
if( bolsterBuddy ~= nil and bolsterBuddy == name )
then
bolsterText = GetString( StringTables.Default.LABEL_END_APPRENTICESHIP )
bolsterCallback = PartyUtils.BolsterCancel
elseif( bolsterBuddy == nil )
then
bolsterText = GetString( StringTables.Default.LABEL_MAKE_APPRENTICE )
bolsterCallback = PartyUtils.BolsterOffer
end
