WoW API: CalendarEventInvite

From AddOn Studio
Revision as of 13:21, 12 December 2008 by WoWWiki>MHoekstra
Jump to navigation Jump to search

WoW API < CalendarEventInvite

Add's a player to the currently opened event.
CalendarEventInvite("player")

Parameters

Arguments

("player")
player
String - The name of the player to be invited to the event

Returns

nil

Details

This call can NOT be made within an Event editing session (ie between the New() and Add() calls or between Open() and Update() calls)
This way the AddEvent will not happen

function MyCreateEvent()
 CalendarNewEvent() -- Create a new Event
 CalendarEventSetDescription( "description" )
 CalendarEventSetTitle ("title")
 CalendarEventSetDate( 1,11,2008)
 CalendarEventSetTime( 20,00)
 CalendarEventInvite( player )
 CalendarAddEvent() -- This will not happen
end

This call can also NOT be made after an Event creation
This way the Event is created, but no other player is invited

function MyCreateEvent()
 CalendarNewEvent() -- Create a new Event
 CalendarEventSetDescription( "description" )
 CalendarEventSetTitle ("title")
 CalendarEventSetDate( 1,11,2008)
 CalendarEventSetTime( 20,00)
 CalendarAddEvent() -- Saves the event
 CalendarEventInvite( player ) -- No player is invited
end

How and when this call is to be used remains a question.

Inviting a player who is already on the invitation list will result in a "<Player> has already been invited." dialog box appearing.