Very simple poison reminder, complete? - WoWInterface
Thread Tools Display Modes
01-23-11, 01:15 PM   #1
This Space For Rent
Haleth's Avatar
Join Date: Sep 2008
Posts: 1,173
Very simple poison reminder, complete?

I got tired of always forgetting to poison my weapons on my rogue so I wrote this.

local f = CreateFrame("Frame")
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)
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.
  Reply With Quote
01-23-11, 07:05 PM   #2
A Molten Giant
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Since when do all classes use poisons? I would put the block of code in an if checking for the players class.

Also no need for FreeUI.class.r, FreeUI.class.g, FreeUI.class.b, since the player will always be a rogue (just hardcode them color values).
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Very simple poison reminder, complete?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off