diff --git a/!!!RemoveHonorless/!!!RemoveHonorless.toc b/!!!RemoveHonorless/!!!RemoveHonorless.toc new file mode 100755 index 0000000..13d5b1a --- /dev/null +++ b/!!!RemoveHonorless/!!!RemoveHonorless.toc @@ -0,0 +1,10 @@ +## Interface: 11305 + +## Title: !!!RemoveHonorless +## Notes: Automatically remove the Honorless Target buff upon logging in. +## Author: Caspervk +## Version: 0.0.1 + +## X-License: GNU General Public License v3 or later (GPLv3+) + +RemoveHonorless.lua diff --git a/!!!RemoveHonorless/README.md b/!!!RemoveHonorless/README.md new file mode 100755 index 0000000..1fcbb3b --- /dev/null +++ b/!!!RemoveHonorless/README.md @@ -0,0 +1,2 @@ +# RemoveHonorless +World of Warcraft Classic AddOn that automatically removes the Honorless Target buff as soon as you log in. \ No newline at end of file diff --git a/!!!RemoveHonorless/RemoveHonorless.lua b/!!!RemoveHonorless/RemoveHonorless.lua new file mode 100755 index 0000000..8ae2dc3 --- /dev/null +++ b/!!!RemoveHonorless/RemoveHonorless.lua @@ -0,0 +1,11 @@ +local frame = CreateFrame("FRAME") +frame:SetScript("OnUpdate", function(self, elapsed) + for i = 1, 255 do + _, _, _, _, _, _, _, _, _, spellId = UnitBuff("player", i) + if spellId == 2479 then + CancelUnitBuff("player", i) + frame:SetScript("OnUpdate", nil) + break + end + end +end)