Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetChapterShortName

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns the short name of the War Journal chapter that belongs to an influence area.

shortName = GetChapterShortName(influenceId)

Arguments

influenceId
number – Influence id of a chapter.

Returns

shortName
wstring – Short chapter name; empty if the name table is not loaded. Nothing is returned if the id is invalid.

Details

  • GetChapterName returns the full name.
  • The error message for an invalid id names GetChapterName, not GetChapterShortName.
  • Exactly one argument must be passed.

Errors

Written to the UI log, and the function returns nothing.

  • Error in function call 'GetChapterName': %d is not a valid influence id.

Example

From default/ea_objectivetrackers/source/publicquesttrackerwindow.lua:

local influenceID = EA_Window_PublicQuestTracker.GetLocalAreaInfluenceID()
if ((influenceID ~= nil) and (influenceID > 0))
then
    local chapterName = GetChapterShortName( influenceID )
    LabelSetText("EA_Window_PublicQuestTrackerLocationChapterLabel", chapterName)
else
    LabelSetText("EA_Window_PublicQuestTrackerLocationChapterLabel", L"")
end

See also