Commit bc6ae253 authored by Blazeflack's avatar Blazeflack

Merge branch 'development'

parents 75699fad 124f1568
**Description**
<!--- Please give a short description of the issue here -->
**Version Number**
<!--- Provide the version number here (the actual number, do not say "latest") -->
**Steps to Reproduce**
<!--- Provide all the steps necessary to reproduce the problem -->
1. Step 1
2. Step 2
3. Step 3
4. Step 4
**Expected Behavior**
<!--- Tell us what should happen -->
**Actual Behavior**
<!--- Tell us what happens instead -->
**Only ElvUI Enabled**
<!--- Please provide information about whether or not you can reproduce it -->
<!--- when ElvUI is the only addon enabled -->
**Blizzard Issue?**
<!--- Please test if you can reproduce the issue with 0 addons enabled -->
<!--- Include screenshot of how it looks if possible -->
**Additional Information**
<!--- Please provide any additional information here -->
**Error Log**
<!--- If you received an error then please post it in the empty space below, -->
<!--- so that the error is wrapped in the 3 backquotes (before and after) -->
```
```
\ No newline at end of file
**Description**
<!--- Please describe the request here. What part of the UI do you want changed? -->
<!--- How do you want it to look/work in comparison to how it is now? -->
\ No newline at end of file
This diff is collapsed.
## Interface: 80100
## Author: Elv
## Version: 10.87
## Version: 10.88
## Title: |cfffe7b2cElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -2,7 +2,6 @@ local MAJOR, MINOR = 'LibElvUIPlugin-1.0', 22
local lib, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end
--Cache global variables
--Lua functions
local pairs, tonumber, strmatch, strsub = pairs, tonumber, strmatch, strsub
local format, strsplit, strlen, gsub, ceil = format, strsplit, strlen, gsub, ceil
......
This diff is collapsed.
--------------------------------- -- LibItemLevel Author: M --------------------------------- local MAJOR, MINOR = "LibItemLevel-ElvUI", 1 local lib = LibStub:NewLibrary(MAJOR, MINOR) if not lib then return end local ItemLevelPattern = gsub(ITEM_LEVEL, "%%d", "(%%d+)") --Toolip local tooltip = CreateFrame("GameTooltip", "LibItemLevelTooltip1", UIParent, "GameTooltipTemplate") local unittip = CreateFrame("GameTooltip", "LibItemLevelTooltip2", UIParent, "GameTooltipTemplate") function lib:hasLocally(ItemID) if (not ItemID or ItemID == "" or ItemID == "0") then return true end return select(10, GetItemInfo(tonumber(ItemID))) end function lib:itemLocally(ItemLink) local id, gem1, gem2, gem3 = string.match(ItemLink, "item:(%d+):[^:]*:(%d-):(%d-):(%d-):") return (self:hasLocally(id) and self:hasLocally(gem1) and self:hasLocally(gem2) and self:hasLocally(gem3)) end function lib:GetStatsViaTooltip(tip, stats) if (type(stats) == "table") then local line, text, r, g, b, statValue, statName for i = 2, tip:NumLines() do line = _G[tip:GetName().."TextLeft" .. i] text = line:GetText() or "" r, g, b = line:GetTextColor() for statValue, statName in string.gmatch(text, "%+([0-9,]+)([^%+%|]+)") do statName = strtrim(statName) statName = statName:gsub("與$", "") --zhTW statName = statName:gsub(",", "") --zhCN statName = statName:gsub("%s*&$", "") --enUS statValue = statValue:gsub(",","") statValue = tonumber(statValue) or 0 if (not stats[statName]) then stats[statName] = { value = statValue, r = r, g = g, b = b } else stats[statName].value = stats[statName].value + statValue if (g > stats[statName].g) then stats[statName].r = r stats[statName].g = g stats[statName].b = b end end end end end return stats end function lib:GetItemInfo(ItemLink, stats) if (not ItemLink or ItemLink == "") then return 0, 0 end if (not string.match(ItemLink, "item:%d+:")) then return -1, 0 end if (not self:itemLocally(ItemLink)) then return 1, 0 end tooltip:SetOwner(UIParent, "ANCHOR_NONE") tooltip:SetHyperlink(ItemLink) local text, level for i = 2, 5 do text = _G[tooltip:GetName().."TextLeft" .. i]:GetText() or "" level = string.match(text, ItemLevelPattern) if (level) then break end end self:GetStatsViaTooltip(tooltip, stats) return 0, tonumber(level) or 0, GetItemInfo(ItemLink) end function lib:GetUnitItemInfo(unit, index, stats) if (not UnitExists(unit)) then return 1, 0 end unittip:SetOwner(UIParent, "ANCHOR_NONE") unittip:SetInventoryItem(unit, index) local ItemLink = GetInventoryItemLink(unit, index) or select(2, unittip:GetItem()) if (not ItemLink or ItemLink == "") then return 0, 0 end if (not self:itemLocally(ItemLink)) then return 1, 0 end local text, level for i = 2, 5 do text = _G[unittip:GetName().."TextLeft" .. i]:GetText() or "" level = string.match(text, ItemLevelPattern) if (level) then break end end self:GetStatsViaTooltip(unittip, stats) if (string.match(ItemLink, "item:(%d+):")) then return 0, tonumber(level) or 0, GetItemInfo(ItemLink) else local line = _G[unittip:GetName().."TextLeft1"] local r, g, b = line:GetTextColor() local name = WrapTextInColorCode(line:GetText() or "", ("ff%.2x%.2x%.2x"):format((r or 1)*255, (g or 1)*255, (b or 1)*255)) return 0, tonumber(level) or 0, name end end function lib:GetUnitItemLevel(unit, stats) local total, counts = 0, 0 local _, count, level for i = 1, 15 do if (i ~= 4) then count, level = self:GetUnitItemInfo(unit, i, stats) total = total + level counts = counts + count end end local mcount, mlevel, mquality, mslot, ocount, olevel, oquality, oslot mcount, mlevel, _, _, mquality, _, _, _, _, _, mslot = self:GetUnitItemInfo(unit, 16, stats) ocount, olevel, _, _, oquality, _, _, _, _, _, oslot = self:GetUnitItemInfo(unit, 17, stats) counts = counts + mcount + ocount if (mquality == 6 or oquality == 6) then total = total + max(mlevel, olevel) * 2 else total = total + mlevel + olevel end return counts, total/max(16-counts,1), total end
\ No newline at end of file
......@@ -26,6 +26,4 @@
<Include file="LibCompress\lib.xml"/>
<Include file="LibBase64-1.0\lib.xml"/>
<Script file="LibAnim\LibAnim.lua"/>
<Script file="LibItemLevel\LibItemLevel.lua"/>
<Script file="LibInspect\LibInspect.lua"/>
</Ui>
This diff is collapsed.
......@@ -188,9 +188,11 @@ local function SetFrequentUpdates(element, state)
if(element.frequentUpdates ~= state) then
element.frequentUpdates = state
if(element.frequentUpdates) then
element.__owner:UnregisterEvent('UNIT_HEALTH', Path)
element.__owner:RegisterEvent('UNIT_HEALTH_FREQUENT', Path)
else
element.__owner:UnregisterEvent('UNIT_HEALTH_FREQUENT', Path)
element.__owner:RegisterEvent('UNIT_HEALTH', Path)
end
end
end
......@@ -204,13 +206,13 @@ local function Enable(self, unit)
if(element.frequentUpdates) then
self:RegisterEvent('UNIT_HEALTH_FREQUENT', Path)
else
self:RegisterEvent('UNIT_HEALTH', Path)
end
self:RegisterEvent('UNIT_HEALTH', Path)
self:RegisterEvent('UNIT_MAXHEALTH', Path)
self:RegisterEvent('UNIT_CONNECTION', Path)
self:RegisterEvent('UNIT_FACTION', Path) -- For tapping
self:RegisterEvent('UNIT_AURA', Path) -- This is the bullshit fix.. Still Blizzard's Fault
if(element:IsObjectType('StatusBar') and not element:GetStatusBarTexture()) then
element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
......@@ -236,7 +238,6 @@ local function Disable(self)
self:UnregisterEvent('UNIT_MAXHEALTH', Path)
self:UnregisterEvent('UNIT_CONNECTION', Path)
self:UnregisterEvent('UNIT_FACTION', Path)
self:UnregisterEvent('UNIT_AURA', Path) -- This is the bullshit fix.. Still Blizzard's Fault
end
end
......
......@@ -13,30 +13,58 @@ local registerUnitEvent = frame_metatable.__index.RegisterUnitEvent
local unregisterEvent = frame_metatable.__index.UnregisterEvent
local isEventRegistered = frame_metatable.__index.IsEventRegistered
-- to update unit frames correctly, some events need to be registered for
-- a specific combination of primary and secondary units
local secondaryUnits = {
UNIT_ENTERED_VEHICLE = {
pet = 'player',
},
UNIT_EXITED_VEHICLE = {
pet = 'player',
},
UNIT_PET = {
pet = 'player',
},
}
function Private.UpdateUnits(frame, unit, realUnit)
if(unit == realUnit) then
realUnit = nil
end
if(frame.unit ~= unit or frame.realUnit ~= realUnit) then
if(frame.unitEvents) then
-- don't let invalid units in, otherwise unit events will end up being
-- registered as unitless
if(frame.unitEvents and validateUnit(unit)) then
local resetRealUnit = false
for event in next, frame.unitEvents do
local registered, unit1 = isEventRegistered(frame, event)
-- unit event registration for header units is postponed until
-- the frame units are known
if(not realUnit and secondaryUnits[event]) then
realUnit = secondaryUnits[event][unit]
resetRealUnit = true
end
local registered, unit1, unit2 = isEventRegistered(frame, event)
-- we don't want to re-register unitless/shared events in case
-- someone added them by hand to the unitEvents table
if(registered and unit1 and unit1 ~= unit or not registered) then
if(not registered or unit1 and (unit1 ~= unit or unit2 ~= realUnit)) then
-- BUG: passing explicit nil units to RegisterUnitEvent
-- makes it silently fall back to RegisterEvent
-- makes it silently fall back to RegisterEvent, using ''
-- instead of explicit nils doesn't cause this behaviour
registerUnitEvent(frame, event, unit, realUnit or '')
end
if(resetRealUnit) then
realUnit = nil
resetRealUnit = false
end
end
end
frame.unit = unit
frame.realUnit = realUnit
frame.id = unit:match('^.-(%d+)')
return true
end
end
......@@ -109,9 +137,13 @@ function frame_metatable.__index:RegisterEvent(event, func, unitless)
self.unitEvents[event] = true
-- UpdateUnits will take care of unit event registration for header
-- units in case we don't have a valid unit yet
local unit = self.unit
if(unit and validateUnit(unit)) then
registerUnitEvent(self, event, unit)
local unit1, unit2 = self.unit
if(unit1 and validateUnit(unit1)) then
if(secondaryUnits[event]) then
unit2 = secondaryUnits[event][unit1]
end
registerUnitEvent(self, event, unit1, unit2 or '')
end
end
end
......@@ -134,6 +166,7 @@ function frame_metatable.__index:UnregisterEvent(event, func)
for k, infunc in next, curev do
if(infunc == func) then
curev[k] = nil
break
end
end
......@@ -148,6 +181,7 @@ function frame_metatable.__index:UnregisterEvent(event, func)
if(self.unitEvents) then
self.unitEvents[event] = nil
end
unregisterEvent(self, event)
end
end
......@@ -61,7 +61,7 @@ local function updateActiveUnit(self, event, unit)
if(not UnitExists(modUnit)) then return end
-- Change the active unit and run a full update.
if Private.UpdateUnits(self, modUnit, realUnit) then
if(Private.UpdateUnits(self, modUnit, realUnit)) then
self:UpdateAllElements('RefreshUnit')
return true
......@@ -248,6 +248,15 @@ local function updatePet(self, event, unit)
end
end
local function updateRaid(self, event)
local unitGUID = UnitGUID(self.unit)
if unitGUID and unitGUID ~= self.unitGUID then
self.unitGUID = unitGUID
self:UpdateAllElements(event)
end
end
local function initObject(unit, style, styleFunc, header, ...)
local num = select('#', ...)
for i = 1, num do
......@@ -274,7 +283,6 @@ local function initObject(unit, style, styleFunc, header, ...)
if(not (suffix == 'target' or objectUnit and objectUnit:match('target'))) then
object:RegisterEvent('UNIT_ENTERED_VEHICLE', updateActiveUnit)
object:RegisterEvent('UNIT_EXITED_VEHICLE', updateActiveUnit)
object:RegisterEvent('UNIT_EXITING_VEHICLE', updateActiveUnit)
-- We don't need to register UNIT_PET for the player unit. We register it
-- mainly because UNIT_EXITED_VEHICLE and UNIT_ENTERED_VEHICLE doesn't always
......@@ -301,8 +309,9 @@ local function initObject(unit, style, styleFunc, header, ...)
oUF:HandleUnit(object)
end
else
-- Used to update frames when they change position in a group.
object:RegisterEvent('GROUP_ROSTER_UPDATE', object.UpdateAllElements, true)
-- update the frame when its prev unit is replaced with a new one
-- updateRaid relies on UnitGUID to detect the unit change
object:RegisterEvent('GROUP_ROSTER_UPDATE', updateRaid, true)
if(num > 1) then
if(object:GetParent() == header) then
......
This diff is collapsed.
......@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local mod = E:GetModule('DataBars');
local LSM = E.Libs.LSM
--Cache global variables
--Lua functions
local floor = floor
local format = string.format
......
......@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local mod = E:NewModule("DataBars", 'AceEvent-3.0')
E.DataBars = mod
--Cache global variables
--WoW API / Variables
local CreateFrame = CreateFrame
local GetExpansionLevel = GetExpansionLevel
......
......@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local mod = E:GetModule('DataBars');
local LSM = E.Libs.LSM
--Cache global variables
--Lua functions
local format = format
local min = min
......
......@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local mod = E:GetModule('DataBars');
local LSM = E.Libs.LSM
--Cache global variables
--Lua functions
local format = format
--WoW API / Variables
......
......@@ -2,7 +2,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local mod = E:GetModule('DataBars');
local LSM = E.Libs.LSM
--Cache global variables
--Lua functions
local _G = _G
local format = format
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars');
--Cache global variables
--Lua functions
local _G = _G
local select, tonumber, pairs = select, tonumber, pairs
......
This diff is collapsed.
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars');
--Cache global variables
--Lua functions
local _G = _G
local unpack = unpack
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars');
--Cache global variables
--Lua functions
local _G = _G
local pairs = pairs
......@@ -14,10 +13,11 @@ local UpdateMicroButtonsParent = UpdateMicroButtonsParent
local GetCurrentRegionName = GetCurrentRegionName
local RegisterStateDriver = RegisterStateDriver
local InCombatLockdown = InCombatLockdown
-- GLOBALS: ElvUI_MicroBar
local function onLeaveBar()
if AB.db.microbar.mouseover then
E:UIFrameFadeOut(_G.ElvUI_MicroBar, 0.2, _G.ElvUI_MicroBar:GetAlpha(), 0)
E:UIFrameFadeOut(ElvUI_MicroBar, 0.2, ElvUI_MicroBar:GetAlpha(), 0)
end
end
......@@ -36,10 +36,10 @@ local function onUpdate(self, elapsed)
end
local function onEnter(button)
if AB.db.microbar.mouseover and not _G.ElvUI_MicroBar.IsMouseOvered then
_G.ElvUI_MicroBar.IsMouseOvered = true
_G.ElvUI_MicroBar:SetScript("OnUpdate", onUpdate)
E:UIFrameFadeIn(_G.ElvUI_MicroBar, 0.2, _G.ElvUI_MicroBar:GetAlpha(), AB.db.microbar.alpha)
if AB.db.microbar.mouseover and not ElvUI_MicroBar.IsMouseOvered then
ElvUI_MicroBar.IsMouseOvered = true
ElvUI_MicroBar:SetScript("OnUpdate", onUpdate)
E:UIFrameFadeIn(ElvUI_MicroBar, 0.2, ElvUI_MicroBar:GetAlpha(), AB.db.microbar.alpha)
end
if button.backdrop then
......@@ -67,7 +67,7 @@ function AB:HandleMicroButton(button)
f:SetOutside(button)
button.backdrop = f
button:SetParent(_G.ElvUI_MicroBar)
button:SetParent(ElvUI_MicroBar)
button:GetHighlightTexture():Kill()
button:HookScript('OnEnter', onEnter)
button:HookScript('OnLeave', onLeave)
......@@ -75,7 +75,7 @@ function AB:HandleMicroButton(button)
if button.Flash then
button.Flash:SetInside()
button.Flash:SetTexture(nil)
button.Flash:SetTexture()
end
pushed:SetTexCoord(0.22, 0.81, 0.26, 0.82)
......@@ -100,7 +100,7 @@ end
function AB:UpdateMicroButtonsParent()
for _, x in pairs(_G.MICRO_BUTTONS) do
_G[x]:SetParent(_G.ElvUI_MicroBar)
_G[x]:SetParent(ElvUI_MicroBar)
end
end
......@@ -124,14 +124,14 @@ function AB:UpdateMicroBarVisibility()
visibility = visibility:gsub('[\n\r]','')
end
RegisterStateDriver(_G.ElvUI_MicroBar.visibility, "visibility", (self.db.microbar.enabled and visibility) or "hide");
RegisterStateDriver(ElvUI_MicroBar.visibility, "visibility", (self.db.microbar.enabled and visibility) or "hide");
end
function AB:UpdateMicroPositionDimensions()
if not _G.ElvUI_MicroBar then return end
if not ElvUI_MicroBar then return end
local numRows = 1
local prevButton = _G.ElvUI_MicroBar
local prevButton = ElvUI_MicroBar
local offset = E:Scale(E.PixelMode and 1 or 3)
local spacing = E:Scale(offset + self.db.microbar.buttonSpacing)
......@@ -143,7 +143,7 @@ function AB:UpdateMicroPositionDimensions()
button:Size(self.db.microbar.buttonSize, self.db.microbar.buttonSize * 1.4);
button:ClearAllPoints();
if prevButton == _G.ElvUI_MicroBar then
if prevButton == ElvUI_MicroBar then
button:Point('TOPLEFT', prevButton, 'TOPLEFT', offset, -offset)
elseif (i - 1) % self.db.microbar.buttonsPerRow == 0 then
button:Point('TOP', lastColumnButton, 'BOTTOM', 0, -spacing);
......@@ -155,21 +155,21 @@ function AB:UpdateMicroPositionDimensions()
prevButton = button
end
if AB.db.microbar.mouseover and not _G.ElvUI_MicroBar:IsMouseOver() then
_G.ElvUI_MicroBar:SetAlpha(0)
if AB.db.microbar.mouseover and not ElvUI_MicroBar:IsMouseOver() then
ElvUI_MicroBar:SetAlpha(0)
else
_G.ElvUI_MicroBar:SetAlpha(self.db.microbar.alpha)
ElvUI_MicroBar:SetAlpha(self.db.microbar.alpha)
end
AB.MicroWidth = (((_G["CharacterMicroButton"]:GetWidth() + spacing) * self.db.microbar.buttonsPerRow) - spacing) + (offset * 2)
AB.MicroHeight = (((_G["CharacterMicroButton"]:GetHeight() + spacing) * numRows) - spacing) + (offset * 2)
_G.ElvUI_MicroBar:Size(AB.MicroWidth, AB.MicroHeight)
ElvUI_MicroBar:Size(AB.MicroWidth, AB.MicroHeight)
if _G.ElvUI_MicroBar.mover then
if ElvUI_MicroBar.mover then
if self.db.microbar.enabled then
E:EnableMover(_G.ElvUI_MicroBar.mover:GetName())
E:EnableMover(ElvUI_MicroBar.mover:GetName())
else
E:DisableMover(_G.ElvUI_MicroBar.mover:GetName())
E:DisableMover(ElvUI_MicroBar.mover:GetName())
end
end
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars');
--Cache global variables
--Lua functions
local _G = _G
local ceil = math.ceil
......@@ -20,9 +19,7 @@ local SetDesaturation = SetDesaturation
local PetActionBar_ShowGrid = PetActionBar_ShowGrid
local PetActionBar_UpdateCooldowns = PetActionBar_UpdateCooldowns
local NUM_PET_ACTION_SLOTS = NUM_PET_ACTION_SLOTS
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS: ElvUI_Bar4, PetActionBarFrame, Spell
-- GLOBALS: ElvUI_Bar4
local Masque = E.Masque
local MasqueGroup = Masque and Masque:Group("ElvUI", "Pet Bar")
......@@ -51,7 +48,7 @@ function AB:UpdatePet(event, unit)
button.isToken = isToken;
if spellID then
local spell = Spell:CreateFromSpellID(spellID);
local spell = _G.Spell:CreateFromSpellID(spellID);
button.spellDataLoadedCancelFunc = spell:ContinueWithCancelOnSpellLoad(function()
button.tooltipSubtext = spell:GetSpellSubtext();
end);
......@@ -276,7 +273,7 @@ function AB:UpdatePetBindings()
end
function AB:CreateBarPet()
bar:CreateBackdrop('Default');
bar:CreateBackdrop();
bar.backdrop:SetAllPoints();
if self.db.bar4.enabled then
bar:Point('RIGHT', ElvUI_Bar4, 'LEFT', -4, 0);
......@@ -302,7 +299,7 @@ function AB:CreateBarPet()
end
end);
PetActionBarFrame.showgrid = 1;
_G.PetActionBarFrame.showgrid = 1;
PetActionBar_ShowGrid();
self:HookScript(bar, 'OnEnter', 'Bar_OnEnter');
self:HookScript(bar, 'OnLeave', 'Bar_OnLeave');
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars');
--Cache global variables
--Lua functions
local _G = _G
local ceil = math.ceil;
local format, find = format, string.find
local ceil = math.ceil
local format, strfind = format, strfind
--WoW API / Variables
local CooldownFrame_Set = CooldownFrame_Set
local CreateFrame = CreateFrame
local GetSpellInfo = GetSpellInfo
local GetShapeshiftForm = GetShapeshiftForm
local GetBindingKey = GetBindingKey
local GetNumShapeshiftForms = GetNumShapeshiftForms
local GetShapeshiftForm = GetShapeshiftForm
local GetShapeshiftFormCooldown = GetShapeshiftFormCooldown
local GetShapeshiftFormInfo = GetShapeshiftFormInfo
local CooldownFrame_Set = CooldownFrame_Set
local GetSpellInfo = GetSpellInfo
local InCombatLockdown = InCombatLockdown
local RegisterStateDriver = RegisterStateDriver
local GetBindingKey = GetBindingKey
local NUM_STANCE_SLOTS = NUM_STANCE_SLOTS
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS: StanceBarFrame
local Masque = E.Masque
local MasqueGroup = Masque and Masque:Group("ElvUI", "Stance Bar")
......@@ -73,7 +69,7 @@ function AB:StyleShapeShift()
end
if isActive then
StanceBarFrame.lastSelected = button:GetID();
_G.StanceBarFrame.lastSelected = button:GetID();
if numForms == 1 then
button.checked:SetColorTexture(1, 1, 1, 0.5)
button:SetChecked(true);
......@@ -133,7 +129,7 @@ function AB:PositionAndSizeBarShapeShift()
--Now that we have set positionOverride for mover, convert "TOP" or "BOTTOM" to anchor points we can use
local position = E:GetScreenQuadrant(bar)
if find(position, "LEFT") or position == "TOP" or position == "BOTTOM" then
if strfind(position, "LEFT") or position == "TOP" or position == "BOTTOM" then
if point == "TOP" then
point = "TOPLEFT"
elseif point == "BOTTOM" then
......@@ -338,7 +334,7 @@ function AB:UpdateStanceBindings()
end
function AB:CreateBarShapeShift()
bar:CreateBackdrop('Default');
bar:CreateBackdrop();
bar.backdrop:SetAllPoints();
bar:Point('TOPLEFT', E.UIParent, 'TOPLEFT', 4, -4);
bar.buttons = {};
......
......@@ -2,26 +2,22 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local A = E:NewModule('Auras', 'AceHook-3.0', 'AceEvent-3.0');
local LSM = E.Libs.LSM
--Cache global variables
--Lua functions
local GetTime = GetTime
local _G = _G
local floor = floor
local format = format
local select, unpack = select, unpack
local tinsert = table.insert
local floor = math.floor
local format = string.format
local tinsert = tinsert
--WoW API / Variables
local CreateFrame = CreateFrame
local RegisterStateDriver = RegisterStateDriver
local RegisterAttributeDriver = RegisterAttributeDriver
local GetWeaponEnchantInfo = GetWeaponEnchantInfo
local UnitAura = UnitAura
local GetItemQualityColor = GetItemQualityColor
local GetInventoryItemQuality = GetInventoryItemQuality
local GetInventoryItemTexture = GetInventoryItemTexture
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS: BuffFrame, TemporaryEnchantFrame, DebuffTypeColor, Minimap, MMHolder
-- GLOBALS: LeftMiniPanel, InterfaceOptionsFrameCategoriesButton12
local GetItemQualityColor = GetItemQualityColor
local GetTime = GetTime
local GetWeaponEnchantInfo = GetWeaponEnchantInfo
local RegisterAttributeDriver = RegisterAttributeDriver
local RegisterStateDriver = RegisterStateDriver
local UnitAura = UnitAura
local Masque = E.Masque
local MasqueGroupBuffs = Masque and Masque:Group("ElvUI", "Buffs")
......@@ -188,7 +184,7 @@ function A:CreateIcon(button)
end
MasqueGroupBuffs:ReSkin()
else
button:SetTemplate('Default')
button:SetTemplate()
end
elseif auraType == "HARMFUL" then
if MasqueGroupDebuffs and E.private.auras.masque.debuffs then
......@@ -198,7 +194,7 @@ function A:CreateIcon(button)