From bde1c9908558ec2143bef346718acf6892c5d680 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Thu, 28 Feb 2013 17:08:27 +0400 Subject: [PATCH] Apparently i broke autotargetting --- ElvUI_SLE/modules/farm/farm.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/modules/farm/farm.lua b/ElvUI_SLE/modules/farm/farm.lua index d31aa84..d3166d1 100644 --- a/ElvUI_SLE/modules/farm/farm.lua +++ b/ElvUI_SLE/modules/farm/farm.lua @@ -315,8 +315,8 @@ local function onClick(self, mousebutton) if mousebutton == "LeftButton" then self:SetAttribute("type", self.buttonType) self:SetAttribute(self.buttonType, self.sortname) - if id and id ~= 2 and id ~= 4 and E.db.sle.farm.autotarget and UnitName("target") ~= L["Tilled Soil"] then - F:AutoTarget(button) + if self.id and self.id ~= 2 and self.id ~= 4 and E.db.sle.farm.autotarget and UnitName("target") ~= L["Tilled Soil"] then + F:AutoTarget(self) end if self.cooldown then self.cooldown:SetCooldown(GetItemCooldown(self.itemId)) @@ -364,6 +364,7 @@ function F:CreateFarmButton(index, owner, buttonType, name, texture, allowDrop, button.itemId = index button.allowDrop = allowDrop button.buttonType = buttonType + button.id = index button.icon = button:CreateTexture(nil, "OVERLAY") button.icon:SetTexture(texture) -- 1.7.9.5