{{wowapitype}}
mNo edit summary |
({{wowapitype}}) |
||
| Line 1: | Line 1: | ||
{{wowapitype}} | |||
Handling player buffs and debuffs are a tad different than unit buffs/debuffs. [[API GetPlayerBuff|GetPlayerBuff(buffId, buffFilter)]] will return a value for buffIndex, which is used for all the player buff functions and GameTooltip:SetPlayerBuff(buffIndex). It is easy to get the two values confused because often they are the same. | Handling player buffs and debuffs are a tad different than unit buffs/debuffs. [[API GetPlayerBuff|GetPlayerBuff(buffId, buffFilter)]] will return a value for buffIndex, which is used for all the player buff functions and GameTooltip:SetPlayerBuff(buffIndex). It is easy to get the two values confused because often they are the same. | ||
| Line 12: | Line 14: | ||
Remember that both buffId and buffIndex can change when auras change. Both values are indexed sequentially starting at 0 at all times, you won't encounter a "gap" if a buff has worn off in the middle of the list. | Remember that both buffId and buffIndex can change when auras change. Both values are indexed sequentially starting at 0 at all times, you won't encounter a "gap" if a buff has worn off in the middle of the list. | ||