WoW:API GrantLevel: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (New page: {{wowapi}} __NOTOC__ <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> One line summary description of function. <!-- List return values an...)
 
m (Move page script moved page API GrantLevel to API GrantLevel without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
 
Grant a custom amount of levels to a RaF-linked player.
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
  GrantLevel("unit", levels)
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
  GrantLevel("unit",level)


== Arguments ==
== Arguments ==
<!-- List each argument, together with its type -->
;unit : String ([[UnitId]]) - player to grant levels to.
:("unit",level)
;levels : Number - amount of levels you wish to grant to the unit.
 
:;unit : [[UnitId]], also accepts names but you need to be in line of sight to each other in order to grant levels
:;level : integer, the amount of levels you want to give away
 
 
== Returns ==
<!-- List each return value, together with its type -->
 
Nothing
 
 
== Example ==
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
GrantLevel("target",1)
or
GrantLevel("Zuotheshaman",1)
 
 
<big>'''Result'''</big>
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->


Grants your target one level, or grant Zuotheshaman one level (if unit is in line of sight otherwise you get a error)
== Notes ==
* You must be in visibility range of the unit; the unit must also fulfil RaF requirements for level granting — check with {{api|CanGrantLevel}}.
* Regardless of the value of the levels argument, the function only grants a single level to the unit.

Latest revision as of 04:46, 15 August 2023

WoW API < GrantLevel

Grant a custom amount of levels to a RaF-linked player.

GrantLevel("unit", levels)

Arguments[edit]

unit
String (UnitId) - player to grant levels to.
levels
Number - amount of levels you wish to grant to the unit.

Notes[edit]

  • You must be in visibility range of the unit; the unit must also fulfil RaF requirements for level granting — check with CanGrantLevel.
  • Regardless of the value of the levels argument, the function only grants a single level to the unit.