I'm going to assume that the second code snippet you added is actually the bottom two thirds of an if-elseif-else block, and you didn't cut out the combo points part....
The author is referring to registering events. I don't know the NTK code base well, so I'll just give you a first attempt and you can see how it turns out.
inside function NeedToKnow.SetScripts(bar): find
Code:
elseif ( "POWER" == bar.settings.BuffOrDebuff ) then
if bar.settings.AuraName == "-1" then
bar:RegisterEvent("UNIT_COMBO_POINTS")
else
bar:RegisterEvent("UNIT_POWER")
bar:RegisterEvent("UNIT_DISPLAYPOWER")
end
replace with:
Code:
elseif ( "POWER" == bar.settings.BuffOrDebuff ) then
if bar.settings.AuraName == "-2" then
bar:RegisterEvent("UNIT_HEALTH")
elseif bar.settings.AuraName == "-1" then
bar:RegisterEvent("UNIT_COMBO_POINTS")
else
bar:RegisterEvent("UNIT_POWER")
bar:RegisterEvent("UNIT_DISPLAYPOWER")
end
inside function NeedToKnow.ClearScripts(bar): find
Code:
bar:UnregisterEvent("UNIT_POWER")
add:
Code:
bar:UnregisterEvent("UNIT_HEALTH")
toward bottom of file: find
Code:
EDT["UNIT_POWER"] = fnAuraCheckIfUnitMatches
add:
Code:
EDT["UNIT_HEALTH"] = fnAuraCheckIfUnitMatches