Project Coding Practices - Hekili/hekili GitHub Wiki
A List of practices / templates to use when coding for the Hekili Addon
Auras
Aura with multiple IDs to check under the same name
- Register with the "base" ID, or normal ID.
- Apply any necessary changes to
duration
,max_stack
or other fields (exceptid
) using functions. - Add a
copy
field, which is a list of IDs that this aura can possibly use. No logic checks needed, just list them.
Template
my_cool_buff = {
id = 123,
duration = function() return 10 + ( talent.awesome_talent.enabled and 10 or 0 ) end,
max_stack = 1,
copy = { 123, 456 }
-- talent.awesome_talent changes the ID to 456
},
Real example
-- Talent: Dealing $196771s1 Frost damage to enemies within $196771A1 yards each second.
-- https://wowhead.com/beta/spell=196770
remorseless_winter = {
id = 196770,
duration = function() return 8 + ( talent.frozen_dominion.enabled and 2 or 0 ) + ( talent.mawsworn_menace.enabled and 2 or 0 ) end,
tick_time = 1,
max_stack = 1,
copy = { 196770, 1233152 } -- talent.frozen_dominion changes the ID
},