diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua index 62b179d..d074b6a 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua @@ -102,7 +102,7 @@ local Update = function(self, event, unit) health:SetOrientation("VERTICAL") end - if(health.percent < 10 and health.LowAlertFunc and not health.lowAlerted) then + if(health.percent < 10 and health.LowAlertFunc and UnitIsEnemy("target", "player") and not health.lowAlerted) then health.lowAlerted = true health.LowAlertFunc(self) end @@ -185,7 +185,7 @@ local CustomUpdate = function(self, event, unit) health:SetValue(-current) end - if(health.percent < 10 and health.LowAlertFunc and not health.lowAlerted) then + if(health.percent < 10 and health.LowAlertFunc and UnitIsEnemy("target", "player") and not health.lowAlerted) then health.lowAlerted = true health.LowAlertFunc(self) end diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 9cccd56..46888cf 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -994,7 +994,7 @@ local GroupLootDropDown_GiveLoot = function(self) end local BailOut_OnEvent = function(self, event, ...) - if (event == "UNIT_ENTERED_VEHICLE" and CanExitVehicle()) then + if((event == "UNIT_ENTERED_VEHICLE" and CanExitVehicle()) or UnitControllingVehicle("player") or UnitInVehicle("player")) then self:Show() else self:Hide() diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua index 067dd6c..3698311 100644 --- a/Interface/AddOns/SVUI/system/load.lua +++ b/Interface/AddOns/SVUI/system/load.lua @@ -209,6 +209,7 @@ function SV:Launch() self.UIParent:RegisterEvent("ADDON_ACTION_BLOCKED"); self.UIParent:RegisterEvent("ADDON_ACTION_FORBIDDEN"); self.UIParent:RegisterEvent("SPELLS_CHANGED"); + self.UIParent:RegisterEvent("ZONE_CHANGED"); Registry:Update("SVMap"); Registry:Update("SVUnit", true); @@ -309,6 +310,8 @@ local SVUISystem_OnEvent = function(self, event, arg, ...) elseif(event == "PLAYER_REGEN_ENABLED") then SV:ToggleConfig() self:UnregisterEvent('PLAYER_REGEN_ENABLED') + elseif(event == "ZONE_CHANGED") then + collectgarbage("collect") end end diff --git a/Interface/AddOns/SVUI/system/registry.lua b/Interface/AddOns/SVUI/system/registry.lua index 2de4168..d0a3ca4 100644 --- a/Interface/AddOns/SVUI/system/registry.lua +++ b/Interface/AddOns/SVUI/system/registry.lua @@ -382,6 +382,7 @@ local Registry_NewPlugin = function(self, obj) if(core.AddonLaunched and core[schema].Load) then core[schema]:Load() + --print(schema) end end end @@ -503,10 +504,6 @@ local Registry_Load = function(self) obj.db = core.db[name] end - -- if obj.___lod then - -- print(table.dump(core.db[name])) - -- end - if obj.Load then local halt = false if(obj.db.incompatible) then @@ -517,6 +514,7 @@ local Registry_Load = function(self) if(not halt) then obj:Load() obj.Load = nil + --print(name) end end obj.initialized = true; diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index d57817f..f1968fe 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -843,23 +843,52 @@ MUNGLUNCH's FAVORITE EMOTE GENERATOR ]]-- local SpecialEmotes = { "ROFL", - "SPIT", - "SHOO", - "MOCK", - "TAUNT", - "CRACK", - "FLEX", + "CACKLE", + "GIGGLE", "GRIN", - "THREATEN", + "SMIRK", + "MOON", + "LICK", + "YAWN", + "FLEX", + "TICKLE", + "TAUNT", + "SHOO", "PRAY", + "SPIT", + "MOCK", + "GLOAT", + "PITY", + "VIOLIN", + "BYE", +} + +local LowHealthPlayerEmotes = { + "ROFL", "CACKLE", - "GIGGLE" + "GIGGLE", + "GRIN", + "SMIRK", + "MOON", + "LICK", + "YAWN", + "BITE" } -local LowHealthEmotes = { +local LowHealthTargetEmotes = { "ROFL", "CACKLE", - "GIGGLE" + "FLEX", + "TICKLE", + "TAUNT", + "SHOO", + "PRAY", + "SPIT", + "MOCK", + "GLOAT", + "PITY", + "VIOLIN", + "BYE", } function SVUIEmote() @@ -867,9 +896,14 @@ function SVUIEmote() DoEmote(SpecialEmotes[index]) end -local function LowHealth_Emote() - local index = random(1,#LowHealthEmotes) - DoEmote(LowHealthEmotes[index]) +local function LowHealth_PlayerEmote() + local index = random(1,#LowHealthPlayerEmotes) + DoEmote(LowHealthPlayerEmotes[index]) +end + +local function LowHealth_TargetEmote() + local index = random(1,#LowHealthTargetEmotes) + DoEmote(LowHealthTargetEmotes[index]) end --[[ ########################################################## @@ -1046,7 +1080,8 @@ function PLUGIN:Load() self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateCommunicator") self:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", "UpdateCommunicator") - SVUI_Player.Health.LowAlertFunc = LowHealth_Emote + SVUI_Player.Health.LowAlertFunc = LowHealth_PlayerEmote + SVUI_Target.Health.LowAlertFunc = LowHealth_TargetEmote end -- /tar Sinnisterr diff --git a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml b/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml deleted file mode 100644 index 0aece78..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<Bindings> - <Binding name="Frame Debugger" description="Frame Stack Analyzer" header="SVUIDEBUG" runOnUp="false"> - DebugThisFrame() - </Binding> -</Bindings> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc deleted file mode 100644 index 47da00f..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 50400 -## Author: Munglunch, Azilroka, Sortokk -## Version: 1.6 -## Title: |cffFF9900SVUI |r|cffFFEF00Debug O Matic|r -## Notes: Supervillain UI Debugging. -## RequiredDeps: SVUI -## OptionalDeps: Blizzard_DebugTools - -SVUI_DebugOMatic.xml diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml deleted file mode 100644 index a3f97ba..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml +++ /dev/null @@ -1,116 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='debug.lua'/> - - <Frame name="SVUI_ScriptError" movable="true" hidden="true" frameStrata="DIALOG"> - <Size x="384" y="260"/> - <Anchors> - <Anchor point="TOPLEFT"/> - </Anchors> - <Layers> - <Layer level="BACKGROUND"> - <Texture name="$parentBG" setAllPoints="true"/> - </Layer> - <Layer level="OVERLAY"> - <Texture name="$parentTitleBG"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-8"/> - </Anchor> - <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"> - <Offset x="-32" y="-24"/> - </Anchor> - </Anchors> - </Texture> - <Texture name="$parentDialogBG"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-32"/> - </Anchor> - <Anchor point="BOTTOMRIGHT"> - <Offset x="-32" y="32"/> - </Anchor> - </Anchors> - </Texture> - </Layer> - <Layer level="ARTWORK"> - <FontString parentKey="Title" inherits="GameFontNormal"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-8"/> - </Anchor> - <Anchor point="TOPRIGHT"> - <Offset x="-32" y="-24"/> - </Anchor> - </Anchors> - </FontString> - <FontString parentKey="sourceLabel" font="GameFontNormalCenter"> - <Size x="140" y="16"/> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset x="104" y="8"/> - </Anchor> - </Anchors> - </FontString> - </Layer> - </Layers> - <Frames> - <ScrollFrame name="$parentDialog" inherits="MinimalScrollFrameTemplate"> - <Size x="343" y="194"/> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="12" y="-30"/> - </Anchor> - </Anchors> - <ScrollChild> - <EditBox parentKey="Input" multiLine="true" letters="4000" autoFocus="false"> - <Size x="343" y="194"/> - <Scripts> - <OnCursorChanged function="ScrollingEdit_OnCursorChanged"/> - <OnUpdate> - ScrollingEdit_OnUpdate(self, elapsed, self:GetParent()); - </OnUpdate> - <OnEditFocusGained> - self:HighlightText(0); - </OnEditFocusGained> - <OnEscapePressed function="EditBox_ClearFocus"/> - </Scripts> - <FontString inherits="GameFontHighlightSmall"/> - </EditBox> - </ScrollChild> - </ScrollFrame> - <Button parentKey="Clear" inherits="UIPanelButtonTemplate" text="RESET"> - <Size x="96" y="24"/> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset x="8" y="4"/> - </Anchor> - </Anchors> - <Scripts> - <OnClick> - local frame = _G["SVUI_ScriptErrorDialog"]; - frame.Input:SetText(""); - </OnClick> - </Scripts> - </Button> - <Button parentKey="Close" inherits="UIPanelCloseButton"> - <Anchors> - <Anchor point="TOPRIGHT"> - <Offset x="-2" y="-2"/> - </Anchor> - </Anchors> - </Button> - </Frames> - <Scripts> - <OnLoad function="SVUI_ScriptError_OnLoad"/> - <OnShow function="SVUI_ScriptError_OnShow"/> - <OnDragStart> - _G["SVUI_ScriptError"].moving = true; - _G["SVUI_ScriptError"]:StartMoving(); - </OnDragStart> - <OnDragStop> - _G["SVUI_ScriptError"].moving = nil; - _G["SVUI_ScriptError"]:StopMovingOrSizing(); - </OnDragStop> - </Scripts> - </Frame> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/debug.lua b/Interface/AddOns/SVUI_DebugOMatic/debug.lua deleted file mode 100644 index 5ad3d23..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/debug.lua +++ /dev/null @@ -1,296 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local type = _G.type; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local format, find, lower, match = string.format, string.find, string.lower, string.match; ---[[ MATH METHODS ]]-- -local floor, abs, min, max = math.floor, math.abs, math.min, math.max; ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, table.wipe, table.sort, table.concat, table.dump; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV, L = unpack(SVUI); -local ErrorStorage = {} -BINDING_HEADER_SVUIDEBUG = "Supervillain UI: Debugger"; ---[[ -########################################################## -CUSTOM MESSAGE WINDOW -########################################################## -]]-- -function SVUI_ScriptError_OnLoad() - SVUI_ScriptError.Source = ""; - SVUI_ScriptError:SetFixedPanelTemplate("Transparent") - SVUI_ScriptErrorDialog:SetFixedPanelTemplate("Transparent") - SVUI_ScriptErrorDialog.Input:SetScript("OnTextChanged", function(self, userInput) - if userInput then return end - local _, max = SVUI_ScriptErrorDialogScrollBar:GetMinMaxValues() - for i = 1, max do - ScrollFrameTemplate_OnMouseWheel(SVUI_ScriptErrorDialog, -1) - end - end) - _G["SVUI_ScriptError"]:RegisterForDrag("LeftButton"); -end - -function SVUI_ScriptError_OnShow() - if SVUI_ScriptError.Source then - local txt = SVUI_ScriptError.Source; - SVUI_ScriptError.Title:SetText(txt); - end -end ---[[ -########################################################## -OTHER SLASH COMMANDS -########################################################## -]]-- -local function GetOriginalContext() - UIParentLoadAddOn("Blizzard_DebugTools") - local orig_DevTools_RunDump = DevTools_RunDump - local originalContext - DevTools_RunDump = function(value, context) - originalContext = context - end - DevTools_Dump("") - DevTools_RunDump = orig_DevTools_RunDump - return originalContext -end - -local function SV_Dump(value) - local context = GetOriginalContext() - local buffer = "" - context.Write = function(self, msg) - buffer = buffer.."\n"..msg - end - - DevTools_RunDump(value, context) - return buffer.."\n"..table.dump(value) -end - -local function DebugDump(any) - if type(any)=="string" then - return any - elseif type(any) == "table" then - return SV_Dump(any) - elseif any==nil or type(any)=="number" then - return tostring(any) - end - return any -end - -local function DebugOutput(msg) - if not SVUI_ScriptError:IsShown() then - SVUI_ScriptError:Show() - end - local outputString = SVUI_ScriptErrorDialog.Input:GetText() - outputString = outputString .. "\n" .. msg - tinsert(ErrorStorage,msg); - SVUI_ScriptErrorDialog.Input:SetText(outputString) -end - -local function ShowDebug(header, ...) - local value = (header and format("Debug %s: ", header)) or "Debug: " - value = format("|cff11ff11 %s|r", value) - for i = 1, select('#', ...), 2 do - local name = select(i, ...) - local var = DebugDump(select(i+1, ...)) - value = format("%s %s = ", value, name)..var - end - SVUI_ScriptError.Source = header; - DebugOutput(value) -end - -function DebugThisFrame(arg) - local outputString = " "; - if arg then - arg = _G[arg] or GetMouseFocus() - else - arg = GetMouseFocus() - end - if arg and (arg.GetName and arg:GetName()) then - local point, relativeTo, relativePoint, xOfs, yOfs = arg:GetPoint() - outputString = outputString.."|cffCC0000----------------------------".."\n" - outputString = outputString.."|cffCC00FF--Mouseover Frame".."|r".."\n" - outputString = outputString.."|cffCC0000----------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Name: |cffFFD100"..arg:GetName().."\n" - if arg:GetParent() and arg:GetParent():GetName() then - outputString = outputString.."|cff00D1FF".."Parent: |cffFFD100"..arg:GetParent():GetName().."\n" - end - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg:GetFrameLevel().."\n" - outputString = outputString.."|cff00D1FF".."IsShown: |cffFFD100"..tostring(arg:IsShown()).."\n" - if xOfs then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",xOfs).."\n" - end - if yOfs then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",yOfs).."\n" - end - if relativeTo and relativeTo:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..point.."|r anchored to "..relativeTo:GetName().."'s |cffFFD100"..relativePoint.."\n" - end - local bg = arg:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if arg._template then - outputString = outputString.."Template Name: |cff00FF55"..arg._template.."\n" - end - if arg.Panel then - local cpt, crt, crp, cxo, cyo = arg.Panel:GetPoint() - outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg.Panel:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg.Panel:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg.Panel:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg.Panel:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = arg.Panel:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if arg._skin then - local cpt, crt, crp, cxo, cyo = arg._skin:GetPoint() - outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg._skin:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg._skin:GetHeight()).."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = arg._skin:GetTexture() - if bg then - outputString = outputString.."|cff00D1FF".."Texture: |cffFFD100"..bg.."\n" - end - end - end - local childFrames = { arg:GetChildren() } - if #childFrames > 0 then - outputString = outputString.."|cffCC00FF>>>> Child Frames----------------------------".."|r".."\n".."\n" - for _, child in ipairs(childFrames) do - local cpt, crt, crp, cxo, cyo = child:GetPoint() - if child:GetName() then - outputString = outputString.."\n\n|cff00FF55++"..child:GetName().."|r".."\n" - else - outputString = outputString.."\n\n|cff99FF55+!!+".."Anonymous Frame".."|r".."\n" - end - outputString = outputString.."|cffCC00FF----------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if child._template then - outputString = outputString.."Template Name: |cff00FF55"..child._template.."\n" - end - if child.Panel then - local cpt, crt, crp, cxo, cyo = child.Panel:GetPoint() - outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child.Panel:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child.Panel:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child.Panel:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child.Panel:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child.Panel:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if child._skin then - local cpt, crt, crp, cxo, cyo = child._skin:GetPoint() - outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child._skin:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child._skin:GetHeight()).."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child._skin:GetTexture() - if bg then - outputString = outputString.."|cffFF9900----------------------------|r".."\n" - outputString = outputString..bg.."\n" - end - outputString = outputString.."|cffCC0000----------------------------|r".."\n" - end - end - end - outputString = outputString.."\n\n" - end - elseif arg == nil or arg == "" then - outputString = outputString.."Invalid frame name".."\n" - else - outputString = outputString.."Could not find frame info".."\n" - end - DebugOutput(outputString) -end -SLASH_SVUI_FRAME_DEBUG1 = "/svdf" -SlashCmdList["SVUI_FRAME_DEBUG"] = DebugThisFrame; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua index eec7e14..da9fafa 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua @@ -635,9 +635,8 @@ local RefreshGPS = function(self, frame, template) end end -local function CreateGPS(frame) +function PLUGIN:CreateGPS(frame) if not frame then return end - local size = 32 local gps = CreateFrame("Frame", nil, frame.InfoPanel) @@ -660,7 +659,7 @@ local function CreateGPS(frame) frame.GPS = gps - frame.GPS:Hide() + --frame.GPS:Hide() end --[[ ########################################################## @@ -697,15 +696,19 @@ function PLUGIN:Load() end if(_TARGET) then + local frame = _G["SVUI_TrackingDoodad"] + frame:SetPoint("LEFT", _TARGET, "RIGHT", 2, 0) _TARGET:HookScript("OnShow", TargetFrame_OnChange) end - local BindableFrames = SV.SVUnit.Roster - for frame,key in pairs(BindableFrames) do - if(key:find("raid") or key:find("party")) then - CreateGPS(frame) - end - end + -- local BindableFrames = SV.SVUnit.Roster + -- for frame,key in pairs(BindableFrames) do + -- if(key:find("raid") or key:find("party")) then + -- CreateGPS(frame) + -- end + -- end + + -- SV.SVUnit:RefreshUnitFrames() NewHook(SV.SVUnit, "RefreshUnitLayout", RefreshGPS) @@ -727,7 +730,7 @@ CONFIGS[SCHEMA] = { ["enable"] = true, ["size"] = 75, ["fontSize"] = 12, - ["groups"] = false, + ["groups"] = true, ["proximity"] = false, } diff --git a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua index e204d5d..9bb1282 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua @@ -1,6 +1,8 @@ local oUF = oUF_Villain or oUF assert(oUF, 'oUF not loaded') +local PLUGIN = _G["TrackingVillain"]; + local max, floor = math.max, math.floor; local tinsert, tremove, tsort, twipe = table.insert, table.remove, table.sort, table.wipe; @@ -117,8 +119,8 @@ local Update = function(self, elapsed) if(not unit or not (UnitInParty(unit) or UnitInRaid(unit)) or UnitIsUnit(unit, "player") or not UnitIsConnected(unit) or (not GPS.OnlyProximity and ((GPS.onMouseOver and (GetMouseFocus() ~= object)) or outOfRange))) then GPS:Hide() - elseif(GPS.Triangulate) then - local distance, angle = GPS:Triangulate(unit) + else + local distance, angle = Triangulate(unit) if not angle then GPS:Hide() else @@ -174,8 +176,9 @@ local Update = function(self, elapsed) end local Enable = function(self) - local GPS = self.GPS - if GPS then + local unit = self.unit + if(unit:find("raid") or unit:find("party")) then + if not self.GPS then PLUGIN:CreateGPS(self) end tinsert(_FRAMES, self) if not OnUpdateFrame then