Refactor calendar event functions to enhance parameter aliasing and improve documentation clarity
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
---@alias eventType
|
---@alias eventType
|
||||||
---| 1 Raid dungeon
|
---| 1 Raid dungeon
|
||||||
---| 2 Five-player dungeon
|
---| 2 Five-player dungeon
|
||||||
|
---| 3 PvP event
|
||||||
|
---| 4 Meeting
|
||||||
|
---| 5 Other event
|
||||||
|
|
||||||
---@param eventType eventType
|
---@param eventType eventType
|
||||||
---@param expansion number Expansion to which the instance belongs; localized names can be found in the constants EXPANSION_NAME0, EXPANSION_NAME1, etc. (number)
|
---@param expansion number Expansion to which the instance belongs; localized names can be found in the constants EXPANSION_NAME0, EXPANSION_NAME1, etc. (number)
|
||||||
|
@@ -1,15 +1,7 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@param index number
|
---@param index number
|
||||||
---@param inviteStatus 8
|
---@param inviteStatus inviteStatus
|
||||||
---@param 1
|
|
||||||
---@param 2
|
|
||||||
---@param 3
|
|
||||||
---@param 4
|
|
||||||
---@param 5
|
|
||||||
---@param 6
|
|
||||||
---@param 7
|
|
||||||
---@param 8
|
|
||||||
---Sets the status of a character on the selected event's invite/signup list
|
---Sets the status of a character on the selected event's invite/signup list
|
||||||
function CalendarEventSetStatus(index, inviteStatus, 1, 2, 3, 4, 5, 6, 7, 8) end
|
function CalendarEventSetStatus(index, inviteStatus) end
|
||||||
|
@@ -1,11 +1,6 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@param eventType 5
|
---@param eventType eventType
|
||||||
---@param 1
|
|
||||||
---@param 2
|
|
||||||
---@param 3
|
|
||||||
---@param 4
|
|
||||||
---@param 5
|
|
||||||
---Changes the display type of the selected event
|
---Changes the display type of the selected event
|
||||||
function CalendarEventSetType(eventType, 1, 2, 3, 4, 5) end
|
function CalendarEventSetType(eventType) end
|
||||||
|
@@ -1,10 +1,7 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@param criterion status
|
---@param criterion criterion
|
||||||
---@param class CLASS_SORT_ORDER
|
|
||||||
---@param name
|
|
||||||
---@param status
|
|
||||||
---@param reverse boolean
|
---@param reverse boolean
|
||||||
---Sorts the event invite/signup list. Does not cause the list to automatically remain sorted; e.g. if sorted by status and a character's status is changed, the list will not be resorted until this function is called again.
|
---Sorts the event invite/signup list. Does not cause the list to automatically remain sorted; e.g. if sorted by status and a character's status is changed, the list will not be resorted until this function is called again.
|
||||||
function CalendarEventSortInvites(criterion, class, name, status, reverse) end
|
function CalendarEventSortInvites(criterion, reverse) end
|
||||||
|
@@ -1,54 +1,30 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@param monthOffset 1
|
---@alias sequenceType
|
||||||
---@param -1
|
---| "END" Last day of the event
|
||||||
---@param 0
|
---| "INFO" An additional specially-labeled day related the event
|
||||||
---@param 1
|
---| "ONGOING" Continuation of the event
|
||||||
---@param day number
|
---| "START" First day of the event
|
||||||
---@param index number
|
|
||||||
---@return string title
|
---@alias difficulty
|
||||||
---@return number hour
|
---| 1 Normal
|
||||||
---@return number minute
|
---| 2 Heroic
|
||||||
---@return SYSTEM calendarType
|
|
||||||
---@return GUILD_ANNOUNCEMENT
|
---@param monthOffset monthOffset
|
||||||
---@return GUILD_EVENT
|
---@param day number
|
||||||
---@return HOLIDAY
|
---@param index number #Index of an event on the given day (from 1 to CalendarGetNumDayEvents()) (number)
|
||||||
---@return PLAYER
|
---@return string title
|
||||||
---@return RAID_LOCKOUT
|
---@return number hour
|
||||||
---@return RAID_RESET
|
---@return number minute
|
||||||
---@return SYSTEM
|
---@return calendarType calendarType
|
||||||
---@return START sequenceType
|
---@return sequenceType sequenceType
|
||||||
---@return END
|
---@return number eventType
|
||||||
---@return INFO
|
---@return number texture
|
||||||
---@return ONGOING
|
---@return modStatus modStatus
|
||||||
---@return START
|
---@return inviteStatus inviteStatus
|
||||||
---@return 5 eventType
|
---@return string invitedBy
|
||||||
---@return 0
|
---@return difficulty difficulty
|
||||||
---@return 1
|
---@return inviteType inviteType
|
||||||
---@return 2
|
|
||||||
---@return 3
|
|
||||||
---@return 4
|
|
||||||
---@return 5
|
|
||||||
---@return string texture
|
|
||||||
---@return MODERATOR modStatus
|
|
||||||
---@return CREATOR
|
|
||||||
---@return MODERATOR
|
|
||||||
---@return 8 inviteStatus
|
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return 3
|
|
||||||
---@return 4
|
|
||||||
---@return 5
|
|
||||||
---@return 6
|
|
||||||
---@return 7
|
|
||||||
---@return 8
|
|
||||||
---@return string invitedBy
|
|
||||||
---@return 2 difficulty
|
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return 2 inviteType
|
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---Returns information about a calendar event on a given day. Information can only be retrieved for events which might be visible in the calendar's current month -- i.e. those in the current month as well as those in (roughly) the last week of the previous month and (roughly) the first two weeks of the following month. To reliably retrieve information for events outside the calendar's current month, first change the calendar's month with CalendarSetMonth.
|
---Returns information about a calendar event on a given day. Information can only be retrieved for events which might be visible in the calendar's current month -- i.e. those in the current month as well as those in (roughly) the last week of the previous month and (roughly) the first two weeks of the following month. To reliably retrieve information for events outside the calendar's current month, first change the calendar's month with CalendarSetMonth.
|
||||||
function CalendarGetDayEvent(monthOffset, -1, 0, 1, day, index) end
|
function CalendarGetDayEvent(monthOffset, day, index) end
|
||||||
|
@@ -1,49 +1,27 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@return string title
|
---@return string title - Title displayed for the event
|
||||||
---@return string description
|
---@return string description - Descriptive text about the event
|
||||||
---@return string creator
|
---@return string creator - Name of the character who created the event
|
||||||
---@return 5 eventType
|
---@return eventType eventType - Display style for the event; used in the default UI to determine which icon to show
|
||||||
---@return 1
|
---@return number repeatOption - Index of an event repetition option; currently unused (always 1)
|
||||||
---@return 2
|
---@return number maxSize - Maximum number of invites/signups; currently unused (always 100)
|
||||||
---@return 3
|
---@return number textureIndex - Index of the dungeon or raid instance
|
||||||
---@return 4
|
---@return number weekday - Index of the day of the week on which the event starts (1 = Sunday)
|
||||||
---@return 5
|
---@return number month - Index of the month in which the event starts (1 = January)
|
||||||
---@return number repeatOption
|
---@return number day - Day of the month on which the event starts
|
||||||
---@return number maxSize
|
---@return number year - Year in which the event starts (full four-digit year)
|
||||||
---@return number textureIndex
|
---@return number hour - Hour part of the event's start time (24-hour clock)
|
||||||
---@return number weekday
|
---@return number minute - Minute part of the event's start time
|
||||||
---@return number month
|
---@return number lockoutWeekday - Currently unused
|
||||||
---@return number day
|
---@return number lockoutMonth - Currently unused
|
||||||
---@return number year
|
---@return number lockoutDay - Currently unused
|
||||||
---@return number hour
|
---@return number lockoutYear - Currently unused
|
||||||
---@return number minute
|
---@return number lockoutHour - Currently unused
|
||||||
---@return number lockoutWeekday
|
---@return number lockoutMinute - Currently unused
|
||||||
---@return number lockoutMonth
|
---@return inviteStatus inviteStatus - The player's status regarding the event
|
||||||
---@return number lockoutDay
|
---@return inviteType inviteType - Invitation/announcement type for the event
|
||||||
---@return number lockoutYear
|
---@return calendarType calendarType - Token identifying the type of event
|
||||||
---@return number lockoutHour
|
|
||||||
---@return number lockoutMinute
|
|
||||||
---@return 1nil locked
|
|
||||||
---@return 1nil autoApprove
|
|
||||||
---@return 1nil pendingInvite
|
|
||||||
---@return 8 inviteStatus
|
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return 3
|
|
||||||
---@return 4
|
|
||||||
---@return 5
|
|
||||||
---@return 6
|
|
||||||
---@return 7
|
|
||||||
---@return 8
|
|
||||||
---@return 2 inviteType
|
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return SYSTEM calendarType
|
|
||||||
---@return GUILD_ANNOUNCEMENT
|
|
||||||
---@return GUILD_EVENT
|
|
||||||
---@return PLAYER
|
|
||||||
---@return SYSTEM
|
|
||||||
---Returns information about the selected calendar event
|
---Returns information about the selected calendar event
|
||||||
function CalendarGetEventInfo() end
|
function CalendarGetEventInfo() end
|
||||||
|
@@ -1,42 +1,38 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
|
---@alias month
|
||||||
|
---| 1 January
|
||||||
|
---| 2 February
|
||||||
|
---| 3 March
|
||||||
|
---| 4 April
|
||||||
|
---| 5 May
|
||||||
|
---| 6 June
|
||||||
|
---| 7 July
|
||||||
|
---| 8 August
|
||||||
|
---| 9 September
|
||||||
|
---| 10 October
|
||||||
|
---| 11 November
|
||||||
|
---| 12 December
|
||||||
|
|
||||||
|
---@alias weekday
|
||||||
|
---| 1 Sunday
|
||||||
|
---| 2 Monday
|
||||||
|
---| 3 Tuesday
|
||||||
|
---| 4 Wednesday
|
||||||
|
---| 5 Thursday
|
||||||
|
---| 6 Friday
|
||||||
|
---| 7 Saturday
|
||||||
|
|
||||||
---@param eventIndex number
|
---@param eventIndex number
|
||||||
---@return 12 month
|
---@return month month
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return 3
|
|
||||||
---@return 4
|
|
||||||
---@return 5
|
|
||||||
---@return 6
|
|
||||||
---@return 7
|
|
||||||
---@return 8
|
|
||||||
---@return 9
|
|
||||||
---@return 10
|
|
||||||
---@return 11
|
|
||||||
---@return 12
|
|
||||||
---@return number day
|
---@return number day
|
||||||
---@return 7 weekday
|
---@return weekday weekday
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return 3
|
|
||||||
---@return 4
|
|
||||||
---@return 5
|
|
||||||
---@return 6
|
|
||||||
---@return 7
|
|
||||||
---@return number hour
|
---@return number hour
|
||||||
---@return number minute
|
---@return number minute
|
||||||
---@return 6 eventType
|
---@return eventType eventType
|
||||||
---@return 1
|
|
||||||
---@return 2
|
|
||||||
---@return 3
|
|
||||||
---@return 4
|
|
||||||
---@return 5
|
|
||||||
---@return 6
|
|
||||||
---@return string title
|
---@return string title
|
||||||
---@return GUILD_EVENT calendarType
|
---@return calendarType calendarType
|
||||||
---@return GUILD_ANNOUNCEMENT
|
|
||||||
---@return GUILD_EVENT
|
|
||||||
---@return string textureName
|
---@return string textureName
|
||||||
---Returns information about a calendar guild-event
|
---Returns information about a calendar guild-event
|
||||||
function CalendarGetGuildEventInfo(eventIndex) end
|
function CalendarGetGuildEventInfo(eventIndex) end
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@param monthOffset number
|
---@param monthOffset monthOffset
|
||||||
---@param day number
|
---@param day number
|
||||||
---@param index number
|
---@param index number
|
||||||
---@return string name
|
---@return string name
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@param monthOffset number
|
---@param monthOffset monthOffset
|
||||||
---@return number month
|
---@return number month
|
||||||
---@return number year
|
---@return number year
|
||||||
---@return number numDays
|
---@return number numDays
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
---@diagnostic disable: missing-return, lowercase-global
|
---@diagnostic disable: missing-return, lowercase-global
|
||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@return list ...
|
---@return string[] monthNames
|
||||||
---Returns a list of localized month names
|
---Returns a list of localized month names
|
||||||
function CalendarGetMonthNames() end
|
function CalendarGetMonthNames() end
|
||||||
|
Reference in New Issue
Block a user