Mercurial > wow > kbf
diff KBF.lua @ 22:940628cd5bfc
use entering/exiting events for vehicles instead of entered/exited (drycode). Fix a typo causing a global to be used
author | Chris Mellon <arkanes@gmai.com> |
---|---|
date | Tue, 19 Oct 2010 14:05:46 -0500 |
parents | c2ff66c87521 |
children | b284fd451972 |
line wrap: on
line diff
--- a/KBF.lua Sun Oct 17 17:21:12 2010 -0500 +++ b/KBF.lua Tue Oct 19 14:05:46 2010 -0500 @@ -9,8 +9,8 @@ self.debuffFrames = {} self.anchor = self:CreateAnchorFrame() self:RegisterEvent("UNIT_AURA") - self:RegisterEvent("UNIT_ENTERED_VEHICLE") - self:RegisterEvent("UNIT_EXITED_VEHICLE") + self:RegisterEvent("UNIT_ENTERING_VEHICLE") + self:RegisterEvent("UNIT_EXITING_VEHICLE") -- set up the countdown timer -- TODO: Fancy enable/disable based on whether you have any timed buffs. -- Not a big deal, how often do you care about that @@ -31,7 +31,7 @@ -- Secure aura header doesn't self-bind to vehicle, -- so this probably only works out of combat. But thats better than nothing... -function kbf:UNIT_ENTERED_VEHICLE(event, unit) +function kbf:UNIT_ENTERING_VEHICLE(event, unit) if unit ~= "player" then return end self.dirty = true -- hax until SAH supports vehicles - do the swap after we come out of combat @@ -42,7 +42,7 @@ end end -function kbf:UNIT_EXITED_VEHICLE(event, unit) +function kbf:UNIT_EXITING_VEHICLE(event, unit) if unit ~= "player" then return end self.dirty = true -- hax until SAH supports vehicles - do the swap after we come out of combat @@ -273,7 +273,7 @@ -- have to be consistent with the stuff in KBF.xml local height = 16 local width = 200 -- this is the width *without* the icon - local font, _ style = GameFontHighlight:GetFont() + local font, _, style = GameFontHighlight:GetFont() local r = r or 0 local g = g or 1 local b = b or 0 @@ -367,7 +367,7 @@ anchor:SetScript("OnDragStart", anchor.StartMoving) anchor:SetScript("OnDragStop", anchor.StopMovingOrSizing) anchor:ClearAllPoints() - anchor:SetPoint("CENTER", UIParent, "CENTER", 0, 0) + anchor:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", 0, 0) anchor:Hide() local frame = CreateFrame("FRAME", "KBFBuffFrame", UIParent, "SecureAuraHeaderTemplate")