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.

822 Part IV ■ <strong>Reference</strong>Returns:regen—Increase in inactive (non-casting) mana regeneration per second providedby Spirit (number)GetUnitMaxHealthModifierReturns the maximum health modifier <strong>for</strong> the player’s pet.Blizzard UImodifier = GetUnitMaxHealthModifier(“unit“)Arguments:unit—A unit to query; only valid <strong>for</strong> pet (string, unitID)Returns:modifier—Factor modifying the unit’s maximum health value (number)GetUnitNameReturns a string summarizing a unit’s name <strong>and</strong> server.nameString = GetUnitName(“unit“, showServerName)Arguments:unit—Unit to query (string, unitID)showServerName—True to include the server name in the returnvalue if the unit is not from the same server as the player; falseto only include a short label in such circumstances (boolean)Returns:nameString—The unit’s name, possibly followed by the name <strong>of</strong> the unit’shome server or a label indicating the unit is not from the player’s server (string)GetUnitPitchReturns the player’s current pitch (slope or angle <strong>of</strong> movement).pitch = GetUnitPitch(“unit“)Only valid <strong>for</strong> the unitID ‘‘player’’. The slope returned here reflects only thedirection <strong>of</strong> movement <strong>for</strong> swimming or flying, not the current orientation <strong>of</strong>the player model or camera. (When on solid ground, GetUnitPitch indicateswhat the angle <strong>of</strong> flight would be were the player to start flying.)The returned value is in radians, with positive values indicating upward slope,negative values indicating downward slope, <strong>and</strong> 0 indicating perfectly levelflight (or swimming).Arguments:unit—Unit to query; only valid <strong>for</strong> player (string, unitID)Returns:pitch—Unit’s slope <strong>of</strong> movement in radians (number)GetUnitPowerModifierReturns the mana modifier <strong>for</strong> the player’s pet.modifier = GetUnitPowerModifier(“unit“)Arguments:unit—A unit to query; only valid <strong>for</strong> pet (string, unitID)

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

Saved successfully!

Ooh no, something went wrong!