WoW:API GameTooltip SetPlayerBuff: Difference between revisions
Jump to navigation
Jump to search
({{widgetmethod}}) |
m (Move page script moved page API GameTooltip SetPlayerBuff to API GameTooltip SetPlayerBuff without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{widgetmethod}} | {{widgetmethod}} __NOTOC__ | ||
{{ | {{removedapi|3.0.2|It was replaced with [[API GameTooltip SetUnitBuff|GameTooltip:SetUnitBuff]].}} | ||
Sets a GameTooltip to a player buff of the type last used in [[API GetPlayerBuff|GetPlayerBuff]]. | |||
GameTooltip:SetPlayerBuff(buffIndex) | |||
== Arguments == | |||
:; buffIndex : Number - The index of the buff to set in the game tooltip (affected by the filter used in [[API GetPlayerBuff|GetPlayerBuff]]) | |||
== Returns == | |||
:nil | |||
== Example == | |||
local buffIndex, untilCancelled = GetPlayerBuff(1, "HARMFUL"); | |||
GameTooltip:SetPlayerBuff(buffIndex); | |||
<big>'''Result'''</big> | |||
The GameTooltip is set to the first harmful buff. | |||
Options for GetPlayerBuff are : HELPFUL|HARMFUL|PASSIVE | |||
== Details == | |||
: It will use whatever the last type of buff you specified in GetPlayerBuff was, hence the reason you should specify GetPlayerBuff right before you call SetPlayerBuff. | |||
: Options for the GetPlayerBuff filter are : HELPFUL|HARMFUL|PASSIVE |
Latest revision as of 04:45, 15 August 2023
← Widget API ← GameTooltip < SetPlayerBuff
This is no longer a part of the World of Warcraft API.
|
Sets a GameTooltip to a player buff of the type last used in GetPlayerBuff.
GameTooltip:SetPlayerBuff(buffIndex)
Arguments[edit]
- buffIndex
- Number - The index of the buff to set in the game tooltip (affected by the filter used in GetPlayerBuff)
Returns[edit]
- nil
Example[edit]
local buffIndex, untilCancelled = GetPlayerBuff(1, "HARMFUL"); GameTooltip:SetPlayerBuff(buffIndex);
Result
The GameTooltip is set to the first harmful buff.
Details[edit]
- It will use whatever the last type of buff you specified in GetPlayerBuff was, hence the reason you should specify GetPlayerBuff right before you call SetPlayerBuff.
- Options for the GetPlayerBuff filter are : HELPFUL|HARMFUL|PASSIVE