API:GetGuildAppointmentData
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Returns the events (appointments) in the guild calendar.
appointments = GetGuildAppointmentData()
Arguments
None.
Returns
- appointments
table– Array of appointment tables, indexed from 1. Empty if there are none.
Each appointment table has these fields:
| Key | Type | Meaning |
|---|---|---|
appointmentID |
number |
Appointment id, 0–255. |
guildID |
number |
Id of the guild that owns the appointment. |
creatorID |
number |
Character id of the member who created it. |
bIsPlayersEvent |
boolean |
true if creatorID is the player's own character.
|
startTime |
number |
Start as a raw time value. |
startMonth |
number |
Start month, 1–12. |
startDay |
number |
Start day of the month. |
startYear |
number |
Start year. |
startHour |
number |
Start hour, 0–23. |
startMinute |
number |
Start minute. |
endTime, endMonth, endDay, endYear, endHour, endMinute |
number |
The same for the end of the appointment. |
summary |
wstring |
Event name. The stock UI stores it as subject.
|
details |
wstring |
Event description. |
locked |
boolean |
true if sign-ups are locked.
|
shared |
boolean |
true if the event is shared with the alliance.
|
localPlayerSignedUp |
number |
Only present when the player is on the sign-up list; holds the player's sign-up status value. |
Details
- The calendar fields are computed from the raw times in the computer's local time zone.
summaryanddetailsare passed through the profanity filter when it is enabled.- If there is no player object, or the Lua state is not available, the function returns nothing.
- Use GetGuildSignupData for the members signed up to one appointment.
Errors
None.
Example
From default/ea_guildwindow/source/guildwindowtabcalendar.lua:
local guildAppointmentData = GetGuildAppointmentData()
if( guildAppointmentData == nil ) then
DEBUG(L"guildAppointmentData == nil")
return
end
for key, value in ipairs( guildAppointmentData ) do
...
GuildWindowTabCalendar.appointmentListData[key].appointmentID = value.appointmentID
GuildWindowTabCalendar.appointmentListData[key].guildID = value.guildID
...
GuildWindowTabCalendar.appointmentListData[key].subject = value.summary
GuildWindowTabCalendar.appointmentListData[key].details = value.details
