API:GetRRQData
From RoR Wiki
UI Lua API · RvR functions
Version: WAR 1.4.8
Returns the progress of all realm resource quests (RRQs) the client knows about.
rrqData = GetRRQData()
Arguments
None.
Returns
- rrqData
table– Table keyed by RRQ id (not an array), or nothing if the client has no RRQ data object.
Each entry rrqData[rrquestID]:
| Key | Type | Meaning |
|---|---|---|
rrquestID |
number |
The RRQ id (same as the key). |
displayType |
number |
Display style. The stock UI compares it with GameData.RRQDisplayType values (for example ERRQDISPLAY_LIVE_EVENT, ERRQDISPLAY_TOMB_KINGS).
|
paused |
boolean |
true when minutesUntilUnpause is greater than 0.
|
minutesUntilUnpause |
number |
– |
realmWithAccess |
number |
Realm that has access. Read as a signed byte; the stock UI's test data uses -1 for "none".
|
realmProgress |
table |
Progress per realm, keyed by realm number. Each value is a table with curVal (number) and maxVal (number).
|
Details
pausedis not stored separately; it is derived fromminutesUntilUnpause.realmProgressis keyed by realm value, so usepairsor index it withGameData.Realm.ORDER/GameData.Realm.DESTRUCTION, as the stock UI does.- A new table is built on every call. The stock UI calls this function from its
SystemData.Events.RRQ_LIST_UPDATEDhandler.
Errors
None.
Example
From default/easystem_rrq/source/rrqprogressbar.lua:
function RRQProgressBar.OnRRQsUpdated()
RRQProgressBar.RealmResourceQuestData = GetRRQData()
for windowID, windowData in pairs( RRQProgressBarTracker )
do
RRQProgressBar.UpdateStatusWindow( windowID )
end
end
Reading one realm's progress, from the same file:
local rrqData = RRQProgressBar.RealmResourceQuestData[self.rrquestID] ... StatusBarSetMaximumValue(self.windowName.."Bar"..iRealm.."Bar", rrqData.realmProgress[iRealm].maxVal) StatusBarSetCurrentValue(self.windowName.."Bar"..iRealm.."Bar", rrqData.realmProgress[iRealm].curVal)
