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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

884 Part IV ■ <strong>Reference</strong>May cause one or more CALENDAR_UPDATE_* events to fire depending on thecontents <strong>of</strong> the player’s calendar. In the default UI, called when the calendar isshown.OpeningCinematicDisplays the introductory cinematic <strong>for</strong> the player’s race.Only has effect if the player has never gained any experience.PartialPlayTimeReturns whether the player is near the allowed play time limit.partialPlayTime = PartialPlayTime()ConfirmationProtectedProtectedWhen in this state, the player receives half the normal amount <strong>of</strong> money <strong>and</strong>XP from kills <strong>and</strong> quests <strong>and</strong> cannot use trade skills; returning to normalrequires logging out <strong>of</strong> the game <strong>for</strong> a period <strong>of</strong> time (see GetBillingTimeRested).Only used in locales where the length <strong>of</strong> play sessions is restricted (e.g.mainl<strong>and</strong> China).Returns:partialPlayTime—1 if the character gains only partial xp, nil if not. (1nil)PetAb<strong>and</strong>onReleases the player’s pet.For Hunter pets, this function sends the pet away, never to return (in thedefault UI, it’s called when accepting the ‘‘Are you sure you want topermanently ab<strong>and</strong>on your pet?’’ dialog). For other pets, this function isequivalent to PetDismiss().PetAggressiveModeEnables aggressive mode <strong>for</strong> the player’s pet.In this mode, the pet automatically attacks any nearby hostile targets.PetAttackInstructs the pet to attack.PetAttack([“unit“]) or PetAttack([“name“])The pet will attack the player’s current target if no unit is specified.Arguments:unit (optional)—A unit to attack (string, unitID)name (optional)—The name <strong>of</strong> a unit to attack (string)PetCanBeAb<strong>and</strong>onedReturns whether the player’s pet can be ab<strong>and</strong>oned.canAb<strong>and</strong>on = PetCanBeAb<strong>and</strong>oned()Only Hunter pets can be permanently ab<strong>and</strong>oned.Returns:canAb<strong>and</strong>on—1 if the player’s pet can be ab<strong>and</strong>oned, otherwise nil (1nil)

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

Saved successfully!

Ooh no, something went wrong!