12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 27 ■ API <strong>Reference</strong> 591CalendarNewGuildEventCreates a new guild event <strong>and</strong> selects it <strong>for</strong> viewing/editing.Guild events are visible to all guild members <strong>and</strong> allow members to sign up (ornon-members to be invited).CalendarOpenEventSelects a calendar event <strong>for</strong> viewing/editing.CalendarOpenEvent(monthOffset, day, index)Arguments:monthOffset—Month to query relative to the calendar’s currently displayedmonth (i.e. 0 <strong>for</strong> current month, 1 <strong>for</strong> next month, -1 <strong>for</strong> previous month)(number)day—Day <strong>of</strong> the month to query (number)index—Index <strong>of</strong> an event on the given day (from 1 to CalendarGetNumDayEvents()) (number)CalendarRemoveEventRemoves the selected event invitation from the player’s calendar or removesthe player from the selected guild event’s signup list.NOTE: May disconnect the player if called when the selected calendar event isnot a received invitation or a guild event.CalendarSetAbsMonthSet’s the calendar’s month to an absolute date.CalendarSetAbsMonth(month [, year])Arguments:month—Index <strong>of</strong> the month (starting at 1 = January) (number)year (optional)—Year (full four-digit year); uses current year if omitted(number)CalendarSetMonthSets the calendar’s month relative to its current month.CalendarSetMonth(monthOffset)Arguments:monthOffset—Month containing an event relative to the calendar’s currentlydisplayed month (number)-1—Month preceding the calendar’s current month0—The calendar’s current month (i.e. same month as CalendarGetMonth())1—Month after the calendar’s current monthCalendarUpdateEventSaves changes made to the selected event.Until this function is called, changes made to an event will not be saved—theywill not propagate to guild members or invitees, <strong>and</strong> the event will revert to itsprevious state if the player closes the calendar, reloads the UI, or goes to viewor edit another event.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!