I got tired of always forgetting to poison my weapons on my rogue so I wrote this.
Code:
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function()
local hasMainHandEnchant, _, _, hasOffHandEnchant = GetWeaponEnchantInfo()
if not hasMainHandEnchant or not hasOffHandEnchant then
DEFAULT_CHAT_FRAME:AddMessage("FreeUI: |cffffffffReapply poisons.|r", FreeUI.class.r, FreeUI.class.g, FreeUI.class.b)
end
end)
It's working just fine, but I'm wondering if it's missing anything obvious before I upload it. I know it's not checking for fishing poles but hey, who fights with their fishing pole equipped.