# HG changeset patch # User Chris Mellon # Date 1297608958 21600 # Node ID 81cade22f2f99e1cf3108c44523b1587ca6dcb19 # Parent a5d47fbede837155eef0e50a5bf964574713b826 add instant/wound/deadly poison support diff -r a5d47fbede83 -r 81cade22f2f9 KBF.lua --- a/KBF.lua Tue Jan 18 22:38:13 2011 -0600 +++ b/KBF.lua Sun Feb 13 08:55:58 2011 -0600 @@ -136,7 +136,6 @@ end -- make a fake third buff bar. It can't be used to cancel the buff, but -- at least you can see it. - local thirdWeaponInfo = select(7, GetWeaponEnchantInfo()) if thirdWeaponInfo then if not self.tempEnchant3 then @@ -145,7 +144,21 @@ self.tempEnchant3:SetWidth(200+16) self.tempEnchant3:SetHeight(16) self.tempEnchant3:Show() + self.tempEnchant3:SetScript("OnEnter", function() kbf:OnEnter(self.tempEnchant3) end) + self.tempEnchant3:SetScript("OnLeave", function() GameTooltip:Hide() end) + self.tempEnchant3:EnableMouse(true) + --TODO: queue up for setting when leaving combat + self.tempEnchant3:SetAttribute('target-slot', 18) + -- set up the tooltip end + -- TODO: If we're out of combat and theres an OH enchant, + -- create a secure action button & position it relative + -- to that. What happens when the OH weapon enchant frame + -- is hidden by SAH? + -- most likely: it stays visible but stops moving. + -- in this case, maybe parent it to the OH enchant also + -- so it vanishes and gets out of the way. + self.tempEnchant3:Show() end if self.tempEnchant3 and not thirdWeaponInfo then @@ -250,6 +263,9 @@ local knownEnchants = { ["Flametongue"] = {8024, 30*60}, ["Frostbrand"] = {8033, 30*60}, + ["Instant Poison"] = {8680, 60*60}, + ["Wound Poison"] = {13218, 60*60}, + ["Deadly Poison"] = {2823, 60*60}, } local spellId = nil