diff --git a/SVUI_!Core/libs/_SVUI_Lib/LUA.lua b/SVUI_!Core/libs/_SVUI_Lib/LUA.lua index 6ed615d..7333838 100644 --- a/SVUI_!Core/libs/_SVUI_Lib/LUA.lua +++ b/SVUI_!Core/libs/_SVUI_Lib/LUA.lua @@ -39,6 +39,7 @@ local huge = math.huge; --MATH METHODS function math.parsefloat(value, decimal) + value = value or 0 if(decimal and decimal > 0) then local calc1 = 10 ^ decimal; local calc2 = (value * calc1) + 0.5; diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua index 084f860..1e5265f 100644 --- a/SVUI_!Core/system/core.lua +++ b/SVUI_!Core/system/core.lua @@ -778,7 +778,7 @@ function SV:Initialize() self.Events:TriggerOnce("CORE_INITIALIZED"); hooksecurefunc("StaticPopup_Show", self.StaticPopup_Show); - hooksecurefunc("CloseSpecialWindows", function() SV.Events:Trigger("SPECIAL_FRAMES_CLOSED") end) + hooksecurefunc("CloseSpecialWindows", function() SV.OptionsStandby = nil; SV.Events:Trigger("SPECIAL_FRAMES_CLOSED") end) if self.db.general.loginmessage then SetLoginMessage(self); diff --git a/SVUI_!Core/system/dock.lua b/SVUI_!Core/system/dock.lua index c41ca05..8a686fd 100644 --- a/SVUI_!Core/system/dock.lua +++ b/SVUI_!Core/system/dock.lua @@ -159,11 +159,13 @@ end local dockPostSizeFunc = function(self, width, height) local name = self:GetName() SetDockDimensions(name, width, height) + MOD:Refresh() end local dockBarPostSizeFunc = function(self, width, height) local name = self:GetName() SetDockDimensions(name, width, height, true) + MOD:Refresh() end local function ScreenBorderVisibility() diff --git a/SVUI_!Core/system/layout.lua b/SVUI_!Core/system/layout.lua index 11ca31e..601631e 100644 --- a/SVUI_!Core/system/layout.lua +++ b/SVUI_!Core/system/layout.lua @@ -338,6 +338,9 @@ local function CalculateOffsets(frame) local topMedian = (top * 0.5); local anchor, a1, a2; + xOffset = xOffset or 0 + yOffset = yOffset or 0 + if(yOffset >= (top * 0.5)) then a1 = "TOP" yOffset = -(top - CurrentFrameTarget:GetTop()) @@ -816,7 +819,6 @@ function Layout:Toggle() local enabled = false; local aceConfig = LibStub("AceConfigDialog-1.0") if(aceConfig and SV.OptionsLoaded) then - SV.OptionsStandby = nil aceConfig:Close(SV.NameID) GameTooltip:Hide() end @@ -935,7 +937,8 @@ end local XML_LayoutLockButton_OnClick = function(self) Graph:Toggle() Layout:Toggle() - if(SV.OptionsLoaded) then + if(SV.OptionsLoaded and SV.OptionsStandby) then + SV.OptionsStandby = nil LibStub("AceConfigDialog-1.0"):Open(SV.NameID) end end diff --git a/SVUI_!Options/UnitFrames.lua b/SVUI_!Options/UnitFrames.lua index 38d4e6e..9cd1986 100644 --- a/SVUI_!Options/UnitFrames.lua +++ b/SVUI_!Options/UnitFrames.lua @@ -4856,7 +4856,7 @@ SV.Options.args[Schema] = { set = function(l, m)MOD:ChangeDBVar(m, l[#l], "boss");MOD:SetEnemyFrame("boss", MAX_BOSS_FRAMES)end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - displayFrames = {type = "execute", order = 2, name = L["Display Frames"], func = function()MOD:ViewEnemyFrames("boss", 4)end}, + displayFrames = {type = "execute", order = 2, name = L["Display Frames"], func = function()MOD:ViewEnemyFrames("boss", MAX_BOSS_FRAMES)end}, resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("boss")SV:ResetAnchors("Boss Frames")end}, spacer1 = { order = 4, diff --git a/SVUI_NamePlates/SVUI_NamePlates.lua b/SVUI_NamePlates/SVUI_NamePlates.lua index 5937fe6..5100541 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.lua +++ b/SVUI_NamePlates/SVUI_NamePlates.lua @@ -526,7 +526,7 @@ end local function UpdateAuraIcon(aura, texture, expiration, stacks, test) if aura and texture and expiration then aura.Icon:SetTexture(texture) - if stacks > 1 then + if(stacks and stacks > 1) then aura.Stacks:SetText(stacks) else aura.Stacks:SetText("") diff --git a/SVUI_QuestTracker/Loader.lua b/SVUI_QuestTracker/Loader.lua index 3fec7c3..d727b11 100644 --- a/SVUI_QuestTracker/Loader.lua +++ b/SVUI_QuestTracker/Loader.lua @@ -62,17 +62,17 @@ function MOD:LoadOptions() SV.Options.args[Schema] = { type = "group", name = Schema, - get = function(a)return SV.db[Schema][a[#a]] end, - set = function(a,b) - MOD:ChangeDBVar(b,a[#a]); - --MOD:UpdateLocals(); - end, args = { generalGroup = { order = 1, type = "group", name = "General", guiInline = true, + get = function(a)return SV.db[Schema][a[#a]] end, + set = function(a,b) + MOD:ChangeDBVar(b,a[#a]); + SV:StaticPopup_Show("RL_CLIENT") + end, args = { rowHeight = { order = 1, @@ -91,6 +91,11 @@ function MOD:LoadOptions() type = "group", name = "Quest Items", guiInline = true, + get = function(a)return SV.db[Schema][a[#a]] end, + set = function(a,b) + MOD:ChangeDBVar(b,a[#a]); + MOD:UpdateLocals(); + end, args = { itemBarDirection = { order = 1, diff --git a/SVUI_QuestTracker/components/active.lua b/SVUI_QuestTracker/components/active.lua index 22bbd42..61ef591 100644 --- a/SVUI_QuestTracker/components/active.lua +++ b/SVUI_QuestTracker/components/active.lua @@ -209,6 +209,7 @@ local UnsetActiveData = function(self, bypass) end local SetActiveData = function(self, title, level, icon, questID, questLogIndex, numObjectives, duration, elapsed, isComplete) + if(not questID) then return end self.ActiveQuestID = questID; MOD.ActiveQuestID = self.ActiveQuestID; local fill_height = 0; @@ -229,7 +230,7 @@ local SetActiveData = function(self, title, level, icon, questID, questLogIndex, local objective_block = block.Objectives; objective_block:Reset(); for i = 1, numObjectives do - local description, category, completed = GetQuestObjectiveInfo(questID, i); + local description, category, completed = GetQuestObjectiveInfo(questID, i, true); if(not completed) then isComplete = false end if(duration and elapsed and (elapsed < duration)) then objective_rows = objective_block:SetTimer(objective_rows, duration, elapsed); diff --git a/SVUI_QuestTracker/components/bonus.lua b/SVUI_QuestTracker/components/bonus.lua index c1854bc..573d3cf 100644 --- a/SVUI_QuestTracker/components/bonus.lua +++ b/SVUI_QuestTracker/components/bonus.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -61,8 +61,8 @@ local PERCENTAGE_STRING = _G.PERCENTAGE_STRING; local TRACKER_HEADER_BONUS_OBJECTIVES = _G.TRACKER_HEADER_BONUS_OBJECTIVES; local GetNumQuestLogRewardCurrencies = _G.GetNumQuestLogRewardCurrencies; local GetQuestLogRewardCurrencyInfo = _G.GetQuestLogRewardCurrencyInfo; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- @@ -70,8 +70,8 @@ local SV = _G['SVUI'] local L = SV.L local LSM = _G.LibStub("LibSharedMedia-3.0") local MOD = SV.QuestTracker; ---[[ -########################################################## +--[[ +########################################################## LOCALS ########################################################## ]]-- @@ -85,8 +85,8 @@ local OBJ_ICON_COMPLETE = [[Interface\COMMON\Indicator-Green]]; local OBJ_ICON_INCOMPLETE = [[Interface\COMMON\Indicator-Gray]]; local CACHED_BONUS_DATA = {}; local COMPLETED_BONUS_DATA = {}; ---[[ -########################################################## +--[[ +########################################################## DATA CACHE HANDLERS ########################################################## ]]-- @@ -100,7 +100,7 @@ local function CacheBonusData(questID, xp, money) if(numObjectives and (type(numObjectives) == "number") and numObjectives > 0) then for objectiveIndex = 1, numObjectives do - local text, objectiveType, finished = GetQuestObjectiveInfo(questID, objectiveIndex); + local text, objectiveType, finished = GetQuestObjectiveInfo(questID, objectiveIndex, true); if not finished then iscomplete = false end tinsert(data.objectives, text); data.objectiveType = objectiveType; @@ -140,7 +140,7 @@ local function CacheBonusData(questID, xp, money) t.count = count; t.font = "GameFontHighlightSmall"; tinsert(data.rewards, t); - end + end if(not money) then money = GetQuestLogRewardMoney(questID); @@ -192,7 +192,7 @@ local function GetCachedQuestObjectiveInfo(questID, objectiveIndex) if(CACHED_BONUS_DATA[questID]) then return CACHED_BONUS_DATA[questID].objectives[objectiveIndex], CACHED_BONUS_DATA[questID].objectiveType, true; else - return GetQuestObjectiveInfo(questID, objectiveIndex); + return GetQuestObjectiveInfo(questID, objectiveIndex, false); end end @@ -206,13 +206,13 @@ local function GetScenarioBonusStep(index) end end end ---[[ -########################################################## +--[[ +########################################################## TRACKER FUNCTIONS ########################################################## ]]-- local GetBonusRow = function(self, index) - if(not self.Rows[index]) then + if(not self.Rows[index]) then local previousFrame = self.Rows[#self.Rows] local index = #self.Rows + 1; local yOffset = 0; @@ -271,7 +271,7 @@ local SetCriteriaRow = function(self, index, bonusStepIndex, subCount, hasFailed objective_block:Reset() for i = 1, subCount do - local text, category, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID, duration, elapsed, failed = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, i); + local text, category, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID, duration, elapsed, failed = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, i); if(text and text ~= '') then if not completed then iscomplete = false end objective_rows = objective_block:SetInfo(objective_rows, text, completed, failed); @@ -376,7 +376,7 @@ local UpdateBonusObjectives = function(self) for i = 1, #tblBonusSteps do local bonusStepIndex = tblBonusSteps[i]; - local name, description, numCriteria, stepFailed, isBonusStep, isForCurrentStepOnly = C_Scenario.GetStepInfo(bonusStepIndex); + local name, description, numCriteria, stepFailed, isBonusStep, isForCurrentStepOnly = C_Scenario.GetStepInfo(bonusStepIndex); local add_height = 0; rows, add_height = self:SetCriteria(rows, bonusStepIndex, numCriteria, stepFailed) fill_height = fill_height + add_height; @@ -424,7 +424,7 @@ local RefreshBonusObjectives = function(self, event, ...) local bonusStepIndex = tblBonusSteps[i]; local _, _, numCriteria = C_Scenario.GetStepInfo(bonusStepIndex); for criteriaIndex = 1, numCriteria do - local _, _, _, _, _, _, _, _, criteriaID = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, criteriaIndex); + local _, _, _, _, _, _, _, _, criteriaID = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, criteriaIndex); if(id == criteriaID) then local questID = C_Scenario.GetBonusStepRewardQuestID(bonusStepIndex); if(questID ~= 0) then @@ -451,8 +451,8 @@ local ResetBonusBlock = function(self) end end end ---[[ -########################################################## +--[[ +########################################################## CORE FUNCTIONS ########################################################## ]]-- @@ -490,4 +490,4 @@ function MOD:InitializeBonuses() self:RegisterEvent("CRITERIA_COMPLETE", self.UpdateBonusObjective); SV.Events:On("QUEST_UPVALUES_UPDATED", UpdateBonusLocals, true); -end \ No newline at end of file +end diff --git a/SVUI_QuestTracker/components/quests.lua b/SVUI_QuestTracker/components/quests.lua index 9a0674b..8961a22 100644 --- a/SVUI_QuestTracker/components/quests.lua +++ b/SVUI_QuestTracker/components/quests.lua @@ -236,6 +236,7 @@ do local itembutton = CreateFrame('Button', buttonName, UIParent, 'SecureActionButtonTemplate, SecureHandlerStateTemplate, SecureHandlerAttributeTemplate'); itembutton:SetAlpha(0); itembutton:SetStyle("!_ActionSlot"); + --itembutton:SetBackdropBorderColor(0.1, 0.1, 0.1) itembutton:SetSize(ITEM_BUTTON_SIZE, ITEM_BUTTON_SIZE); itembutton:SetID(index); itembutton.___overflow = false; @@ -369,6 +370,7 @@ function ItemBar:Update() end firstButton:ClearAllPoints(); + firstButton:SetSize(ITEM_BUTTON_SIZE, ITEM_BUTTON_SIZE); if(dockletLocation:find('Left')) then anchor1 = isHorizontal and "RIGHT" or "TOP"; @@ -915,7 +917,7 @@ local SetQuestRow = function(self, index, watchIndex, title, level, icon, questI objective_block:Reset(); for i = 1, subCount do - local description, category, objective_completed = GetQuestObjectiveInfo(questID, i, false); + local description, category, objective_completed = GetQuestObjectiveInfo(questID, i, true); if not objective_completed then iscomplete = false end if(description) then fill_height = fill_height + (INNER_HEIGHT + 4); @@ -1180,7 +1182,7 @@ local function UpdateQuestLocals(...) ITEM_BUTTON_SIZE = SV.db.QuestTracker.itemButtonSize; ITEMS_PER_ROW = SV.db.QuestTracker.itemButtonsPerRow; ReAnchorItemBar(); - + ItemBar:Update() end local function PostMoveCallback(buttonName) @@ -1212,7 +1214,8 @@ end function MOD:InitializeQuests() ReAnchorItemBar() SV:NewAnchor(ItemBar, L["Quest Items"]); - + ITEM_BUTTON_SIZE = SV.db.QuestTracker.itemButtonSize; + ITEMS_PER_ROW = SV.db.QuestTracker.itemButtonsPerRow; for i = 1, 5 do ItemBar.Buttons[i] = CreateQuestItemButton(i) end diff --git a/SVUI_Tooltip/SVUI_Tooltip.lua b/SVUI_Tooltip/SVUI_Tooltip.lua index 9278bc1..3190938 100644 --- a/SVUI_Tooltip/SVUI_Tooltip.lua +++ b/SVUI_Tooltip/SVUI_Tooltip.lua @@ -718,9 +718,9 @@ end MOD.GameTooltip_SetDefaultAnchor = _hook_GameTooltip_SetDefaultAnchor local _hook_BNToastOnShow = function(self,anchor,parent,relative,x,y) - if parent ~= BattleNetToasts_MOVE then + if parent ~= BNToastFrame_MOVE then BNToastFrame:ClearAllPoints() - BNToastFrame:SetPoint('TOPLEFT',BattleNetToasts_MOVE,'TOPLEFT') + BNToastFrame:SetPoint('TOPLEFT',BNToastFrame_MOVE,'TOPLEFT') end end diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.lua b/SVUI_UnitFrames/SVUI_UnitFrames.lua index 5373521..0af98c9 100644 --- a/SVUI_UnitFrames/SVUI_UnitFrames.lua +++ b/SVUI_UnitFrames/SVUI_UnitFrames.lua @@ -459,6 +459,7 @@ function MOD:RefreshUnitLayout(frame, template) if(RESIZE_NEEDED) then frame:SetSize(UNIT_WIDTH + (MASTER_X1_OFFSET + MASTER_X2_OFFSET), UNIT_HEIGHT + (MASTER_TOP_OFFSET + MASTER_BOTTOM_OFFSET)) + frame.Grip:SetSize(frame:GetSize()) end MASTER_GRIP:ClearAllPoints(); diff --git a/SVUI_UnitFrames/frames.lua b/SVUI_UnitFrames/frames.lua index 227ef9d..68118a9 100644 --- a/SVUI_UnitFrames/frames.lua +++ b/SVUI_UnitFrames/frames.lua @@ -97,6 +97,17 @@ local unitLayoutPostSizeFunc = function(self, width, height) self:Update() end +local enemyLayoutPostSizeFunc = function(self, width, height) + SV.db.UnitFrames[self.___key].width = width; + SV.db.UnitFrames[self.___key].height = height; + for i=1, self.___maxCount do + local frame = MOD.Units[self.___key .. i]; + if(frame) then + frame:Update() + end + end +end + local UpdateTargetGlow = function(self) if not self.unit then return end local unit = self.unit; @@ -178,9 +189,9 @@ local UpdatePlayerFrame = function(self) self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) + self.Grip:SetSize(self:GetSize()) local lossSize = UNIT_WIDTH * 0.6 self.LossOfControl.stunned:SetSize(lossSize, lossSize) - self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "player") @@ -663,15 +674,16 @@ local UpdateBossFrame = function(self) self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - self:ClearAllPoints() + self.Grip:SetSize(self:GetSize()) - if(holder and (tonumber(INDEX) == 1)) then - local yOffset = (UNIT_HEIGHT + 12 + db.castbar.height) * (INDEX - 1) - if db.showBy == "UP"then - self:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, yOffset) - else - self:SetPoint("TOPRIGHT", holder, "TOPRIGHT", 0, -yOffset) - end + if(holder and (tonumber(INDEX) > 1) and (not self.Grip:HasMoved())) then + self.Grip:ClearAllPoints() + local yOffset = (UNIT_HEIGHT + 12 + db.castbar.height) * (INDEX - 1) + if db.showBy == "UP" then + self.Grip:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, yOffset) + else + self.Grip:SetPoint("TOPRIGHT", holder, "TOPRIGHT", 0, -yOffset) + end end self:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and "AnyDown" or "AnyUp") @@ -683,7 +695,7 @@ CONSTRUCTORS["boss"] = function(self, unit) local key = "boss" local selfID = unit:match('boss(%d)') self.unit = unit - self.___key = key + self.___key = key; self:SetID(selfID) self:SetScript("OnEnter", UnitFrame_OnEnter) @@ -707,14 +719,27 @@ CONSTRUCTORS["boss"] = function(self, unit) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:SetAttribute("type2", "focus") - if(not lastBossFrame) then - self:SetPoint("RIGHT", SV.Screen, "RIGHT", -105, 0) + local db = SV.db.UnitFrames["boss"] + local UNIT_WIDTH = db.width; + local UNIT_HEIGHT = db.height; + local yOffset = 12 + db.castbar.height + self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) + + if(db.showBy == "UP") then + if(not lastBossFrame) then + self:SetPoint("RIGHT", SV.Screen, "RIGHT", -100, -190) + else + self:SetPoint("BOTTOMRIGHT", lastBossFrame, "TOPRIGHT", 0, yOffset) + end else - self:SetPoint("TOPRIGHT", lastBossFrame, "BOTTOMRIGHT", 0, -20) + if(not lastBossFrame) then + self:SetPoint("RIGHT", SV.Screen, "RIGHT", -85, 190) + else + self:SetPoint("TOPRIGHT", lastBossFrame, "BOTTOMRIGHT", 0, -yOffset) + end end - - SV:NewAnchor(self, L["Boss Frames"]) - SV:SetAnchorResizing(self, unitLayoutPostSizeFunc, 10, 500) + SV:NewAnchor(self, L["Boss Frame "..selfID]) + SV:SetAnchorResizing(self, enemyLayoutPostSizeFunc, 10, 500) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateBossFrame @@ -737,17 +762,17 @@ local UpdateArenaFrame = function(self) self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) + self.Grip:SetSize(self:GetSize()) self:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and "AnyDown" or "AnyUp") - self:ClearAllPoints() - - if(holder and (tonumber(INDEX) > 1)) then - local yOffset = (UNIT_HEIGHT + 12 + db.castbar.height) * (INDEX - 1) - if(db.showBy == "UP") then - self:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, yOffset) - else - self:SetPoint("TOPRIGHT", holder, "TOPRIGHT", 0, -yOffset) - end + if(holder and (tonumber(INDEX) > 1) and (not self.Grip:HasMoved())) then + self.Grip:ClearAllPoints() + local yOffset = (UNIT_HEIGHT + 12 + db.castbar.height) * (INDEX - 1) + if(db.showBy == "UP") then + self.Grip:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, yOffset) + else + self.Grip:SetPoint("TOPRIGHT", holder, "TOPRIGHT", 0, -yOffset) + end end MOD:RefreshUnitLayout(self, "arena") @@ -872,14 +897,28 @@ CONSTRUCTORS["arena"] = function(self, unit) prep:Hide() end - if(not lastArenaFrame) then - self:SetPoint("RIGHT", SV.Screen, "RIGHT", -105, 0) + local db = SV.db.UnitFrames["arena"] + local UNIT_WIDTH = db.width; + local UNIT_HEIGHT = db.height + local yOffset = 12 + db.castbar.height + self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) + + if(db.showBy == "UP") then + if(not lastArenaFrame) then + self:SetPoint("RIGHT", SV.Screen, "RIGHT", -85, -200) + else + self:SetPoint("BOTTOMRIGHT", lastArenaFrame, "TOPRIGHT", 0, yOffset) + end else - self:SetPoint("TOPRIGHT", lastArenaFrame, "BOTTOMRIGHT", 0, -20) + if(not lastArenaFrame) then + self:SetPoint("RIGHT", SV.Screen, "RIGHT", -85, 200) + else + self:SetPoint("TOPRIGHT", lastArenaFrame, "BOTTOMRIGHT", 0, -yOffset) + end end - SV:NewAnchor(self, L["Arena Frames"]) - SV:SetAnchorResizing(self, unitLayoutPostSizeFunc, 10, 500) + SV:NewAnchor(self, L["Arena Frame "..selfID]) + SV:SetAnchorResizing(self, enemyLayoutPostSizeFunc, 10, 500) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateArenaFrame @@ -1005,6 +1044,7 @@ function MOD:SetEnemyFrame(key, maxCount) oUF_SVUI:RegisterStyle(styleName, CONSTRUCTORS[key]) oUF_SVUI:SetActiveStyle(styleName) frame = oUF_SVUI:Spawn(unit, styleName) + frame.___maxCount = maxCount; self.Units[unit] = frame else frame = self.Units[unit] diff --git a/SVUI_UnitFrames/view.lua b/SVUI_UnitFrames/view.lua index a2d6e5b..b7f5f96 100644 --- a/SVUI_UnitFrames/view.lua +++ b/SVUI_UnitFrames/view.lua @@ -61,27 +61,27 @@ local _PRIVATE_TAGS = {}; local _PRIVATE_METHODS = { UnitPower = function(unit, g) - if unit:find('target') or unit:find('focus') then - return UnitPower(unit, g) - end + -- if unit:find('target') or unit:find('focus') then + -- return UnitPower(unit, g) + -- end return random(1, UnitPowerMax(unit, g)or 1) end, UnitHealth = function(unit) - if unit:find('target') or unit:find('focus') then - return UnitHealth(unit) - end + -- if unit:find('target') or unit:find('focus') then + -- return UnitHealth(unit) + -- end return random(1, UnitHealthMax(unit)) end, UnitName = function(unit) - if unit:find('target') or unit:find('focus') then - return UnitName(unit) - end + -- if unit:find('target') or unit:find('focus') then + -- return UnitName(unit) + -- end return "Dummy" end, UnitClass = function(unit) - if unit:find('target') or unit:find('focus') then - return UnitClass(unit) - end + -- if unit:find('target') or unit:find('focus') then + -- return UnitClass(unit) + -- end local token = CLASS_SORT_ORDER[random(1, #(CLASS_SORT_ORDER))] return LOCALIZED_CLASS_NAMES_MALE[token], token end,