diff --git a/Cell_TBC.toc b/Cell_TBC.toc index 55f1aa0f..c06edddd 100644 --- a/Cell_TBC.toc +++ b/Cell_TBC.toc @@ -15,7 +15,7 @@ Locales\LoadLocales.xml Libs\LoadLibs_Classic.xml -Core_Vanilla.lua +Core_TBC.lua Utils.lua Revise.lua Comm\LoadComm.xml diff --git a/Core_TBC.lua b/Core_TBC.lua new file mode 100644 index 00000000..12141ad6 --- /dev/null +++ b/Core_TBC.lua @@ -0,0 +1,878 @@ +---@class Cell +local Cell = select(2, ...) +_G.Cell = Cell + +---@class Cell +---@field defaults table +---@field frames table +---@field vars table +---@field snippetVars table +---@field funcs CellFuncs +---@field iFuncs CellIndicatorFuncs +---@field bFuncs CellUnitButtonFuncs +---@field uFuncs CellUtilityFuncs +---@field animations CellAnimations + +Cell.defaults = {} +Cell.frames = {} +Cell.vars = {} +Cell.snippetVars = {} +Cell.funcs = {} +Cell.iFuncs = {} +Cell.bFuncs = {} +Cell.uFuncs = {} +Cell.animations = {} + +local F = Cell.funcs +local I = Cell.iFuncs +local P = Cell.pixelPerfectFuncs +local L = Cell.L + +-- sharing version check +Cell.MIN_VERSION = 246 +Cell.MIN_CLICKCASTINGS_VERSION = 246 +Cell.MIN_LAYOUTS_VERSION = 246 +Cell.MIN_INDICATORS_VERSION = 246 +Cell.MIN_DEBUFFS_VERSION = 246 + +--[==[@debug@ +local debugMode = true +--@end-debug@]==] +function F.Debug(arg, ...) + if debugMode then + if type(arg) == "string" or type(arg) == "number" then + print(arg, ...) + elseif type(arg) == "table" then + DevTools_Dump(arg) + elseif type(arg) == "function" then + arg(...) + elseif arg == nil then + return true + end + end +end + +function F.Print(msg) + print("|cFFFF3030[Cell]|r " .. msg) +end + +-------------------------------------------------- +-- CellParent +-------------------------------------------------- +local CellParent = CreateFrame("Frame", "CellParent", UIParent) +CellParent:SetAllPoints(UIParent) +CellParent:SetFrameLevel(0) + +------------------------------------------------- +-- layout +------------------------------------------------- +local delayedLayoutGroupType +local delayedFrame = CreateFrame("Frame") +delayedFrame:SetScript("OnEvent", function() + delayedFrame:UnregisterEvent("PLAYER_REGEN_ENABLED") + F.UpdateLayout(delayedLayoutGroupType) +end) + +function F.UpdateLayout(layoutGroupType) + if InCombatLockdown() then + F.Debug("|cFF7CFC00F.UpdateLayout(\""..layoutGroupType.."\") DELAYED") + delayedLayoutGroupType = layoutGroupType + delayedFrame:RegisterEvent("PLAYER_REGEN_ENABLED") + else + F.Debug("|cFF7CFC00F.UpdateLayout(\""..layoutGroupType.."\")") + + Cell.vars.layoutAutoSwitch = CellCharacterDB["layoutAutoSwitch"][Cell.vars.activeTalentGroup] + + local layout = Cell.vars.layoutAutoSwitch[layoutGroupType] + Cell.vars.layoutGroupType = layoutGroupType + + if layout == "hide" then + Cell.vars.isHidden = true + Cell.vars.currentLayout = "default" + Cell.vars.currentLayoutTable = CellDB["layouts"]["default"] + else + Cell.vars.isHidden = false + Cell.vars.currentLayout = layout + Cell.vars.currentLayoutTable = CellDB["layouts"][layout] + end + + F.IterateAllUnitButtons(function(b) + b._indicatorsReady = nil + end, true) + + Cell.Fire("UpdateLayout", layout) + Cell.Fire("UpdateIndicators") + end +end + +local bgMaxPlayers = { + [2197] = 40, -- 科尔拉克的复仇 +} + +-- layout auto switch +local instanceType +local function PreUpdateLayout() + if instanceType == "pvp" then + local name, _, _, _, _, _, _, id = GetInstanceInfo() + if bgMaxPlayers[id] then + if bgMaxPlayers[id] <= 15 then + Cell.vars.inBattleground = 15 + F.UpdateLayout("battleground15") + else + Cell.vars.inBattleground = 40 + F.UpdateLayout("battleground40") + end + else + Cell.vars.inBattleground = 15 + F.UpdateLayout("battleground15") + end + elseif instanceType == "arena" then + Cell.vars.inBattleground = 5 -- treat as bg 5 + F.UpdateLayout("arena") + else + Cell.vars.inBattleground = false + if Cell.vars.groupType == "solo" then + F.UpdateLayout("solo") + elseif Cell.vars.groupType == "party" then + F.UpdateLayout("party") + else -- raid + if Cell.vars.raidType then + F.UpdateLayout(Cell.vars.raidType) + else + F.UpdateLayout("raid_outdoor") + end + end + end +end +Cell.RegisterCallback("GroupTypeChanged", "Core_GroupTypeChanged", PreUpdateLayout) +Cell.RegisterCallback("ActiveTalentGroupChanged", "Core_ActiveTalentGroupChanged", PreUpdateLayout) + +------------------------------------------------- +-- events +------------------------------------------------- +local eventFrame = CreateFrame("Frame") +eventFrame:RegisterEvent("VARIABLES_LOADED") +eventFrame:RegisterEvent("ADDON_LOADED") +eventFrame:RegisterEvent("PLAYER_LOGIN") + +function eventFrame:VARIABLES_LOADED() + SetCVar("predictedHealth", 1) +end + +local IsInRaid = IsInRaid +local IsInGroup = IsInGroup +local GetNumGroupMembers = GetNumGroupMembers +local GetRaidRosterInfo = GetRaidRosterInfo +local UnitGUID = UnitGUID +-- local IsInBattleGround = C_PvP.IsBattleground -- NOTE: can't get valid value immediately after PLAYER_ENTERING_WORLD +local GetAddOnMetadata = C_AddOns and C_AddOns.GetAddOnMetadata or GetAddOnMetadata + +-- local cellLoaded, omnicdLoaded +function eventFrame:ADDON_LOADED(arg1) + if arg1 == "Cell" then + -- cellLoaded = true + eventFrame:UnregisterEvent("ADDON_LOADED") + + if type(CellDB) ~= "table" then CellDB = {} end + if type(CellCharacterDB) ~= "table" then CellCharacterDB = {} end + if type(CellDBBackup) ~= "table" then CellDBBackup = {} end + + if type(CellDB["optionsFramePosition"]) ~= "table" then CellDB["optionsFramePosition"] = {} end + + if type(CellDB["indicatorPreview"]) ~= "table" then + CellDB["indicatorPreview"] = { + ["scale"] = 2, + ["showAll"] = false, + } + end + + if type(CellDB["customTextures"]) ~= "table" then CellDB["customTextures"] = {} end + + if type(CellDB["snippets"]) ~= "table" then CellDB["snippets"] = {} end + if not CellDB["snippets"][0] then CellDB["snippets"][0] = F.GetDefaultSnippet() end + + -- general -------------------------------------------------------------------------------- + if type(CellDB["general"]) ~= "table" then + CellDB["general"] = { + ["enableTooltips"] = false, + ["hideTooltipsInCombat"] = true, + ["tooltipsPosition"] = {"BOTTOMLEFT", "Default", "TOPLEFT", 0, 15}, + ["hideBlizzardParty"] = true, + ["hideBlizzardRaid"] = true, + ["hideBlizzardRaidManager"] = true, + ["locked"] = false, + ["fadeOut"] = false, + ["menuPosition"] = "top_bottom", + ["alwaysUpdateAuras"] = false, + ["framePriority"] = { + {"Main", true}, + {"Spotlight", false}, + {"Quick Assist", false}, + }, + ["useCleuHealthUpdater"] = false, + ["translit"] = false, + } + end + + -- nicknames ------------------------------------------------------------------------------ + if type(CellDB["nicknames"]) ~= "table" then + CellDB["nicknames"] = { + ["mine"] = "", + ["sync"] = false, + ["custom"] = false, + ["list"] = {}, + ["blacklist"] = {}, + } + end + + -- tools ---------------------------------------------------------------------------------- + if type(CellDB["tools"]) ~= "table" then + CellDB["tools"] = { + ["battleResTimer"] = {true, false, {}}, + ["buffTracker"] = {false, "left-to-right", 27, {}, {}}, + ["deathReport"] = {false, 10}, + ["readyAndPull"] = {false, "text_button", {"default", 7}, {}}, + ["marks"] = {false, false, "target_h", {}}, + ["fadeOut"] = false, + } + end + + -- spellRequest --------------------------------------------------------------------------- + if type(CellDB["spellRequest"]) ~= "table" then + local POWER_INFUSION, POWER_INFUSION_ICON = F.GetSpellInfo(10060) + local INNERVATE, INNERVATE_ICON = F.GetSpellInfo(29166) + + CellDB["spellRequest"] = { + ["enabled"] = false, + ["checkIfExists"] = true, + ["knownSpellsOnly"] = true, + ["freeCooldownOnly"] = true, + ["replyCooldown"] = true, + ["responseType"] = "me", + ["timeout"] = 10, + -- ["replyAfterCast"] = nil, + ["sharedIconOptions"] = { + "beat", -- [1] animation + 27, -- [2] size + "BOTTOMRIGHT", -- [3] anchor + "BOTTOMRIGHT", -- [4] anchorTo + 0, -- [5] x + 0, -- [6] y + }, + ["spells"] = { + { + ["spellId"] = 10060, + ["buffId"] = 10060, + ["keywords"] = POWER_INFUSION, + ["icon"] = POWER_INFUSION_ICON, + ["type"] = "icon", + ["iconColor"] = {1, 1, 0, 1}, + ["glowOptions"] = { + "pixel", -- [1] glow type + { + {1,1,0,1}, -- [1] color + 0, -- [2] x + 0, -- [3] y + 9, -- [4] N + 0.25, -- [5] frequency + 8, -- [6] length + 2 -- [7] thickness + } -- [2] glowOptions + }, + ["isBuiltIn"] = true + }, + { + ["spellId"] = 29166, + ["buffId"] = 29166, + ["keywords"] = INNERVATE, + ["icon"] = INNERVATE_ICON, + ["type"] = "icon", + ["iconColor"] = {0, 1, 1, 1}, + ["glowOptions"] = { + "pixel", -- [1] glow type + { + {0, 1, 1, 1}, -- [1] color + 0, -- [2] x + 0, -- [3] y + 9, -- [4] N + 0.25, -- [5] frequency + 8, -- [6] length + 2 -- [7] thickness + } -- [2] glowOptions + }, + ["isBuiltIn"] = true + }, + }, + } + end + + -- dispelRequest -------------------------------------------------------------------------- + if type(CellDB["dispelRequest"]) ~= "table" then + CellDB["dispelRequest"] = { + ["enabled"] = false, + ["dispellableByMe"] = true, + ["responseType"] = "all", + ["timeout"] = 10, + ["debuffs"] = {}, + ["type"] = "text", + ["textOptions"] = { + "A", + {1, 1, 1, 1}, -- [1] color + 32, -- [2] size + "TOPLEFT", -- [3] anchor + "TOPLEFT", -- [4] anchorTo + -1, -- [5] x + 5, -- [6] y + }, + ["glowOptions"] = { + "shine", -- [1] glow type + { + {1, 0, 0.4, 1}, -- [1] color + 0, -- [2] x + 0, -- [3] y + 9, -- [4] N + 0.5, -- [5] frequency + 2, -- [6] scale + } -- [2] glowOptions + } + } + end + + -- appearance ----------------------------------------------------------------------------- + if type(CellDB["appearance"]) ~= "table" then + CellDB["appearance"] = F.Copy(Cell.defaults.appearance) + end + + -- color --------------------------------------------------------------------------------- + if CellDB["appearance"]["accentColor"] then -- version < r103 + if CellDB["appearance"]["accentColor"][1] == "custom" then + Cell.OverrideAccentColor(CellDB["appearance"]["accentColor"][2]) + end + end + + -- click-casting -------------------------------------------------------------------------- + Cell.vars.playerClass, Cell.vars.playerClassID = UnitClassBase("player") + + if type(CellCharacterDB["clickCastings"]) ~= "table" then + CellCharacterDB["clickCastings"] = { + ["class"] = Cell.vars.playerClass, -- NOTE: validate on import + ["useCommon"] = true, + ["smartResurrection"] = "disabled", + ["alwaysTargeting"] = { + ["common"] = "disabled", + [1] = "disabled", + [2] = "disabled", + }, + ["common"] = { + {"type1", "target"}, + {"type2", "togglemenu"}, + }, + [1] = { + {"type1", "target"}, + {"type2", "togglemenu"}, + }, + [2] = { + {"type1", "target"}, + {"type2", "togglemenu"}, + }, + } + + -- add resurrections + for _, t in pairs(F.GetResurrectionClickCastings(Cell.vars.playerClass)) do + tinsert(CellCharacterDB["clickCastings"]["common"], t) + for i = 1, 2 do + tinsert(CellCharacterDB["clickCastings"][i], t) + end + end + end + Cell.vars.clickCastings = CellCharacterDB["clickCastings"] + + -- layouts -------------------------------------------------------------------------------- + if type(CellDB["layouts"]) ~= "table" then + CellDB["layouts"] = { + ["default"] = F.Copy(Cell.defaults.layout) + } + end + + -- layoutAutoSwitch ----------------------------------------------------------------------- + if type(CellCharacterDB["layoutAutoSwitch"]) ~= "table" then + CellCharacterDB["layoutAutoSwitch"] = { + [1] = F.Copy(Cell.defaults.layoutAutoSwitch), + [2] = F.Copy(Cell.defaults.layoutAutoSwitch), + } + end + + -- dispelBlacklist ------------------------------------------------------------------------ + if type(CellDB["dispelBlacklist"]) ~= "table" then + CellDB["dispelBlacklist"] = I.GetDefaultDispelBlacklist() + end + Cell.vars.dispelBlacklist = F.ConvertTable(CellDB["dispelBlacklist"]) + + -- debuffBlacklist ------------------------------------------------------------------------ + if type(CellDB["debuffBlacklist"]) ~= "table" then + CellDB["debuffBlacklist"] = I.GetDefaultDebuffBlacklist() + end + Cell.vars.debuffBlacklist = F.ConvertTable(CellDB["debuffBlacklist"]) + + -- bigDebuffs ----------------------------------------------------------------------------- + if type(CellDB["bigDebuffs"]) ~= "table" then + CellDB["bigDebuffs"] = I.GetDefaultBigDebuffs() + end + Cell.vars.bigDebuffs = F.ConvertTable(CellDB["bigDebuffs"]) + + -- debuffTypeColor ------------------------------------------------------------------------ + if type(CellDB["debuffTypeColor"]) ~= "table" then + I.ResetDebuffTypeColor() + end + + -- aoeHealings ---------------------------------------------------------------------------- + if type(CellDB["aoeHealings"]) ~= "table" then CellDB["aoeHealings"] = {["disabled"]={}, ["custom"]={}} end + + -- defensives/externals ------------------------------------------------------------------- + if type(CellDB["defensives"]) ~= "table" then CellDB["defensives"] = {["disabled"]={}, ["custom"]={}} end + if type(CellDB["externals"]) ~= "table" then CellDB["externals"] = {["disabled"]={}, ["custom"]={}} end + + -- raid debuffs --------------------------------------------------------------------------- + if type(CellDB["raidDebuffs"]) ~= "table" then CellDB["raidDebuffs"] = {} end + -- CellDB["raidDebuffs"] = { + -- [instanceId] = { + -- ["general"] = { + -- [spellId] = {order, glowType, glowColor}, + -- }, + -- [bossId] = { + -- [spellId] = {order, glowType, glowColor}, + -- }, + -- } + -- } + + -- targetedSpells ------------------------------------------------------------------------- + if type(CellDB["targetedSpellsList"]) ~= "table" then + CellDB["targetedSpellsList"] = I.GetDefaultTargetedSpellsList() + end + Cell.vars.targetedSpellsList = F.ConvertTable(CellDB["targetedSpellsList"]) + + if type(CellDB["targetedSpellsGlow"]) ~= "table" then + CellDB["targetedSpellsGlow"] = I.GetDefaultTargetedSpellsGlow() + end + Cell.vars.targetedSpellsGlow = CellDB["targetedSpellsGlow"] + + -- actions -------------------------------------------------------------------------------- + if type(CellDB["actions"]) ~= "table" then + CellDB["actions"] = I.GetDefaultActions() + end + Cell.vars.actions = I.ConvertActions(CellDB["actions"]) + + -- misc ----------------------------------------------------------------------------------- + Cell.version = GetAddOnMetadata("Cell", "version") + Cell.versionNum = tonumber(string.match(Cell.version, "%d+")) + if not CellDB["revise"] then CellDB["firstRun"] = true end + F.Revise() + F.CheckWhatsNew() + F.RunSnippets() + + -- validation ----------------------------------------------------------------------------- + -- validate layout + for talent, t in pairs(CellCharacterDB["layoutAutoSwitch"]) do + for groupType, layout in pairs(t) do + if layout ~= "hide" and not CellDB["layouts"][layout] then + t[groupType] = "default" + end + end + end + + Cell.loaded = true + Cell.Fire("AddonLoaded") + end + + -- omnicd ------------------------------------------------------------------------------------- + -- if arg1 == "OmniCD" then + -- omnicdLoaded = true + + -- local E = OmniCD[1] + -- tinsert(E.unitFrameData, 1, { + -- [1] = "Cell", + -- [2] = "CellPartyFrameMember", + -- [3] = "unitid", + -- [4] = 1, + -- }) + + -- local function UnitFrames() + -- if not E.customUF.optionTable.Cell then + -- E.customUF.optionTable.Cell = "Cell" + -- E.customUF.optionTable.enabled.Cell = { + -- ["delay"] = 1, + -- ["frame"] = "CellPartyFrameMember", + -- ["unit"] = "unitid", + -- } + -- end + -- end + -- hooksecurefunc(E, "UnitFrames", UnitFrames) + -- end + + -- if cellLoaded and omnicdLoaded then + -- eventFrame:UnregisterEvent("ADDON_LOADED") + -- end +end + +Cell.vars.raidSetup = { + ["TANK"]={["ALL"]=0}, + ["HEALER"]={["ALL"]=0}, + ["DAMAGER"]={["ALL"]=0}, +} + +function eventFrame:GROUP_ROSTER_UPDATE() + if IsInRaid() then + if Cell.vars.groupType ~= "raid" then + Cell.vars.groupType = "raid" + F.Debug("|cffffbb77GroupTypeChanged:|r raid") + Cell.Fire("GroupTypeChanged", "raid") + end + + -- reset raid setup + for _, t in pairs(Cell.vars.raidSetup) do + for class in pairs(t) do + if class == "ALL" then + t["ALL"] = 0 + else + t[class] = nil + end + end + end + + -- update guid & raid setup + for i = 1, GetNumGroupMembers() do + -- update raid setup + local _, _, _, _, _, class, _, _, _, _, _, role = GetRaidRosterInfo(i) + if not role or role == "NONE" then role = "DAMAGER" end + -- update ALL + Cell.vars.raidSetup[role]["ALL"] = Cell.vars.raidSetup[role]["ALL"] + 1 + -- update for each class + if class then + if not Cell.vars.raidSetup[role][class] then + Cell.vars.raidSetup[role][class] = 1 + else + Cell.vars.raidSetup[role][class] = Cell.vars.raidSetup[role][class] + 1 + end + end + end + + -- update Cell.unitButtons.raid.units + for i = GetNumGroupMembers()+1, 40 do + Cell.unitButtons.raid.units["raid"..i] = nil + _G["CellRaidFrameMember"..i] = nil + end + F.UpdateRaidSetup() + + -- update Cell.unitButtons.party.units + Cell.unitButtons.party.units["player"] = nil + Cell.unitButtons.party.units["pet"] = nil + for i = 1, 4 do + Cell.unitButtons.party.units["party"..i] = nil + Cell.unitButtons.party.units["partypet"..i] = nil + end + + elseif IsInGroup() then + if Cell.vars.groupType ~= "party" then + Cell.vars.groupType = "party" + F.Debug("|cffffbb77GroupTypeChanged:|r party") + Cell.Fire("GroupTypeChanged", "party") + end + + -- update Cell.unitButtons.raid.units + for i = 1, 40 do + Cell.unitButtons.raid.units["raid"..i] = nil + _G["CellRaidFrameMember"..i] = nil + end + + -- update Cell.unitButtons.party.units + for i = GetNumGroupMembers(), 4 do + Cell.unitButtons.party.units["party"..i] = nil + Cell.unitButtons.party.units["partypet"..i] = nil + end + + else + if Cell.vars.groupType ~= "solo" then + Cell.vars.groupType = "solo" + F.Debug("|cffffbb77GroupTypeChanged:|r solo") + Cell.Fire("GroupTypeChanged", "solo") + end + + -- update Cell.unitButtons.raid.units + for i = 1, 40 do + Cell.unitButtons.raid.units["raid"..i] = nil + _G["CellRaidFrameMember"..i] = nil + end + + -- update Cell.unitButtons.party.units + Cell.unitButtons.party.units["player"] = nil + Cell.unitButtons.party.units["pet"] = nil + for i = 1, 4 do + Cell.unitButtons.party.units["party"..i] = nil + Cell.unitButtons.party.units["partypet"..i] = nil + end + end + + if Cell.vars.hasPermission ~= F.HasPermission() or Cell.vars.hasPartyMarkPermission ~= F.HasPermission(true) then + Cell.vars.hasPermission = F.HasPermission() + Cell.vars.hasPartyMarkPermission = F.HasPermission(true) + Cell.Fire("PermissionChanged") + F.Debug("|cffbb00bbPermissionChanged") + end +end + +local inInstance +function eventFrame:PLAYER_ENTERING_WORLD() + F.Debug("|cffbbbbbb=== PLAYER_ENTERING_WORLD ===") + + local isIn, iType = IsInInstance() + instanceType = iType + Cell.vars.raidType = nil + + if isIn then + F.Debug("|cffff1111*** Entered Instance:|r", iType) + PreUpdateLayout() + inInstance = true + + -- NOTE: delayed raid difficulty check + if iType == "raid" then + C_Timer.After(0.5, function() + --! can't get difficultyID, difficultyName immediately after entering an instance + local _, _, difficultyID, difficultyName, maxPlayers = GetInstanceInfo() + -- if difficultyID == 3 or difficultyID == 5 or difficultyID == 175 or difficultyID == 193 then + -- Cell.vars.raidType = "raid10" + -- elseif difficultyID == 4 or difficultyID == 6 or difficultyID == 176 or difficultyID == 194 then + -- Cell.vars.raidType = "raid25" + -- end + if maxPlayers == 10 then + Cell.vars.raidType = "raid10" + elseif maxPlayers == 25 then + Cell.vars.raidType = "raid25" + end + if Cell.vars.raidType then + PreUpdateLayout() + end + end) + end + + elseif inInstance then -- left insntance + F.Debug("|cffff1111*** Left Instance|r") + PreUpdateLayout() + inInstance = false + + if not InCombatLockdown() and not UnitAffectingCombat("player") then + F.Debug("|cffbbbbbb--- LeaveInstance: |cffff7777collectgarbage") + collectgarbage("collect") + end + end + + if CellDB["firstRun"] then + F.FirstRun() + end +end + +local function UpdateSpecVars(skipTalentUpdate) + -- if not skipTalentUpdate then + Cell.vars.activeTalentGroup = GetActiveTalentGroup() + Cell.vars.playerSpecID = Cell.vars.activeTalentGroup + -- end +end + +function eventFrame:PLAYER_LOGIN() + F.Debug("|cffbbbbbb=== PLAYER_LOGIN ===") + eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD") + eventFrame:RegisterEvent("GROUP_ROSTER_UPDATE") + eventFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + eventFrame:RegisterEvent("PLAYER_TALENT_UPDATE") + eventFrame:RegisterEvent("UI_SCALE_CHANGED") + + Cell.vars.playerNameShort = GetUnitName("player") + Cell.vars.playerNameFull = F.UnitFullName("player") + + Cell.vars.playerGUID = UnitGUID("player") + + -- update spec vars + UpdateSpecVars() + + --! init Cell.vars.currentLayout and Cell.vars.currentLayoutTable + eventFrame:GROUP_ROSTER_UPDATE() + -- update click-castings + Cell.Fire("UpdateClickCastings") + -- update indicators + -- Cell.Fire("UpdateIndicators") -- NOTE: already update in GROUP_ROSTER_UPDATE -> GroupTypeChanged -> F.UpdateLayout + -- update texture and font + Cell.Fire("UpdateAppearance") + Cell.UpdateOptionsFont(CellDB["appearance"]["optionsFontSizeOffset"], CellDB["appearance"]["useGameFont"]) + Cell.UpdateAboutFont(CellDB["appearance"]["optionsFontSizeOffset"]) + -- update tools + Cell.Fire("UpdateTools") + -- update requests + Cell.Fire("UpdateRequests") + -- update raid debuff list + Cell.Fire("UpdateRaidDebuffs") + -- hide blizzard + if CellDB["general"]["hideBlizzardParty"] then F.HideBlizzardParty() end + if CellDB["general"]["hideBlizzardRaid"] then F.HideBlizzardRaid() end + if CellDB["general"]["hideBlizzardRaidManager"] then F.HideBlizzardRaidManager() end + -- lock & menu + Cell.Fire("UpdateMenu") + -- update CLEU + Cell.Fire("UpdateCLEU") + -- update builtIns and customs + I.UpdateAoEHealings(CellDB["aoeHealings"]) + I.UpdateDefensives(CellDB["defensives"]) + I.UpdateExternals(CellDB["externals"]) + -- update pixel perfect + Cell.Fire("UpdatePixelPerfect") + -- LibHealComm + -- F.EnableLibHealComm(CellDB["appearance"]["useLibHealComm"]) + -- update LGF + F.UpdateFramePriority() +end + +local function UpdatePixels() + if not InCombatLockdown() then + F.Debug("UI_SCALE_CHANGED: ", UIParent:GetScale(), CellParent:GetEffectiveScale()) + Cell.Fire("UpdatePixelPerfect") + Cell.Fire("UpdateAppearance", "scale") + end +end + +local updatePixelsTimer +local function DelayedUpdatePixels() + if updatePixelsTimer then + updatePixelsTimer:Cancel() + end + updatePixelsTimer = C_Timer.NewTimer(1, UpdatePixels) +end + +function eventFrame:UI_SCALE_CHANGED() + DelayedUpdatePixels() +end + +hooksecurefunc(UIParent, "SetScale", DelayedUpdatePixels) + +function eventFrame:ACTIVE_TALENT_GROUP_CHANGED() + F.Debug("|cffbbbbbb=== ACTIVE_TALENT_GROUP_CHANGED ===") + -- not in combat & spec CHANGED + if not InCombatLockdown() and (Cell.vars.activeTalentGroup ~= GetActiveTalentGroup()) then + UpdateSpecVars() + + Cell.Fire("UpdateClickCastings") + F.Debug("|cffffbb77ActiveTalentGroupChanged:|r", Cell.vars.activeTalentGroup) + Cell.Fire("ActiveTalentGroupChanged", Cell.vars.activeTalentGroup) + end +end + +function eventFrame:PLAYER_TALENT_UPDATE() + UpdateSpecVars(true) + F.UpdateClickCastingProfileLabel() +end + +eventFrame:SetScript("OnEvent", function(self, event, ...) + self[event](self, ...) +end) + +------------------------------------------------- +-- slash command +------------------------------------------------- +SLASH_CELL1 = "/cell" +function SlashCmdList.CELL(msg, editbox) + local command, rest = msg:match("^(%S*)%s*(.-)$") + command = strlower(command or "") + rest = strlower(rest or "") + + if command == "options" or command == "opt" then + F.ShowOptionsFrame() + + elseif command == "healers" then + F.FirstRun() + + elseif command == "rescale" then + CellDB["appearance"]["scale"] = P.GetRecommendedScale() + ReloadUI() + + elseif command == "reset" then + if rest == "position" then + Cell.frames.anchorFrame:ClearAllPoints() + Cell.frames.anchorFrame:SetPoint("TOPLEFT", CellParent, "CENTER") + Cell.vars.currentLayoutTable["position"] = {} + P.ClearPoints(Cell.frames.readyAndPullFrame) + Cell.frames.readyAndPullFrame:SetPoint("TOPRIGHT", CellParent, "CENTER") + CellDB["tools"]["readyAndPull"][4] = {} + P.ClearPoints(Cell.frames.raidMarksFrame) + Cell.frames.raidMarksFrame:SetPoint("BOTTOMRIGHT", CellParent, "CENTER") + CellDB["tools"]["marks"][4] = {} + P.ClearPoints(Cell.frames.buffTrackerFrame) + Cell.frames.buffTrackerFrame:SetPoint("BOTTOMLEFT", CellParent, "CENTER") + CellDB["tools"]["buffTracker"][4] = {} + + elseif rest == "all" then + Cell.frames.anchorFrame:ClearAllPoints() + Cell.frames.anchorFrame:SetPoint("TOPLEFT", CellParent, "CENTER") + Cell.frames.readyAndPullFrame:ClearAllPoints() + Cell.frames.readyAndPullFrame:SetPoint("TOPRIGHT", CellParent, "CENTER") + Cell.frames.raidMarksFrame:ClearAllPoints() + Cell.frames.raidMarksFrame:SetPoint("BOTTOMRIGHT", CellParent, "CENTER") + Cell.frames.buffTrackerFrame:ClearAllPoints() + Cell.frames.buffTrackerFrame:SetPoint("BOTTOMLEFT", CellParent, "CENTER") + CellDB = nil + CellCharacterDB = nil + ReloadUI() + + elseif rest == "layouts" then + CellDB["layouts"] = nil + ReloadUI() + + elseif rest == "clickcastings" then + CellCharacterDB["clickCastings"] = nil + ReloadUI() + + elseif rest == "raiddebuffs" then + CellDB["raidDebuffs"] = nil + ReloadUI() + + elseif rest == "snippets" then + CellDB["snippets"] = {} + CellDB["snippets"][0] = F.GetDefaultSnippet() + ReloadUI() + end + + elseif command == "report" then + rest = tonumber(rest:format("%d")) + if rest and rest >= 0 and rest <= 40 then + if rest == 0 then + F.Print(L["Cell will report all deaths during a raid encounter."]) + else + F.Print(string.format(L["Cell will report first %d deaths during a raid encounter."], rest)) + end + CellDB["tools"]["deathReport"][2] = rest + Cell.Fire("UpdateTools", "deathReport") + else + F.Print(L["A 0-40 integer is required."]) + end + + -- elseif command == "buff" then + -- rest = tonumber(rest:format("%d")) + -- if rest and rest > 0 then + -- CellDB["tools"]["buffTracker"][3] = rest + -- F.Print(string.format(L["Buff Tracker icon size is set to %d."], rest)) + -- Cell.Fire("UpdateTools", "buffTracker") + -- else + -- F.Print(L["A positive integer is required."]) + -- end + + else + F.Print(L["Available slash commands"]..":\n".. + "|cFFFFB5C5/cell options|r, |cFFFFB5C5/cell opt|r: "..L["show Cell options frame"]..".\n".. + "|cFFFFB5C5/cell healers|r: "..L["create a \"Healers\" indicator"]..".\n".. + "|cFFFFB5C5/cell rescale|r: "..strlower(L["Apply Recommended Scale"])..".\n".. + "|cFFFF7777"..L["These \"reset\" commands below affect all your characters in this account"]..".|r\n".. + "|cFFFFB5C5/cell reset position|r: "..L["reset Cell position"]..".\n".. + "|cFFFFB5C5/cell reset layouts|r: "..L["reset all Layouts and Indicators"]..".\n".. + "|cFFFFB5C5/cell reset clickcastings|r: "..L["reset all Click-Castings"]..".\n".. + "|cFFFFB5C5/cell reset raiddebuffs|r: "..L["reset all Raid Debuffs"]..".\n".. + "|cFFFFB5C5/cell reset snippets|r: "..L["reset all Code Snippets"]..".\n".. + "|cFFFFB5C5/cell reset all|r: "..L["reset all Cell settings"].."." + ) + end +end diff --git a/Defaults/Layout_Defaults_TBC.lua b/Defaults/Layout_Defaults_TBC.lua new file mode 100644 index 00000000..65276e2d --- /dev/null +++ b/Defaults/Layout_Defaults_TBC.lua @@ -0,0 +1,495 @@ +local addonName, Cell = ... + +-- number of built-in indicators +Cell.defaults.builtIns = 27 + +Cell.defaults.indicatorIndices = { + ["nameText"] = 1, + ["statusText"] = 2, + ["healthText"] = 3, + ["powerText"] = 4, + ["healthThresholds"] = 5, + ["statusIcon"] = 6, + ["roleIcon"] = 7, + ["partyAssignmentIcon"] = 8, + ["leaderIcon"] = 9, + ["combatIcon"] = 10, + ["readyCheckIcon"] = 11, + ["playerRaidIcon"] = 12, + ["targetRaidIcon"] = 13, + ["aggroBlink"] = 14, + ["aggroBar"] = 15, + ["aggroBorder"] = 16, + ["aoeHealing"] = 17, + ["externalCooldowns"] = 18, + ["defensiveCooldowns"] = 19, + ["allCooldowns"] = 20, + ["dispels"] = 21, + ["debuffs"] = 22, + ["raidDebuffs"] = 23, + ["targetedSpells"] = 24, + ["targetCounter"] = 25, + ["actions"] = 26, + ["missingBuffs"] = 27, +} + +Cell.defaults.layout = { + -- ["syncWith"] = "layoutName", + ["main"] = { + ["combineGroups"] = false, + ["sortByRole"] = false, + ["roleOrder"] = {"TANK", "HEALER", "DAMAGER"}, + ["hideSelf"] = false, + ["size"] = {66, 46}, + ["position"] = {}, + ["powerSize"] = 2, + ["orientation"] = "vertical", + ["anchor"] = "TOPLEFT", + ["spacingX"] = 3, + ["spacingY"] = 3, + ["maxColumns"] = 8, + ["unitsPerColumn"] = 5, + ["groupSpacing"] = 0, + }, + ["pet"] = { + ["partyEnabled"] = true, + ["raidEnabled"] = false, + ["sameSizeAsMain"] = true, + ["sameArrangementAsMain"] = true, + ["size"] = {66, 46}, + ["position"] = {}, + ["powerSize"] = 2, + ["orientation"] = "vertical", + ["anchor"] = "TOPLEFT", + ["spacingX"] = 3, + ["spacingY"] = 3, + }, + ["npc"] = { + ["enabled"] = true, + ["separate"] = false, + ["sameSizeAsMain"] = true, + ["sameArrangementAsMain"] = true, + ["size"] = {66, 46}, + ["position"] = {}, + ["powerSize"] = 2, + ["orientation"] = "vertical", + ["anchor"] = "TOPLEFT", + ["spacingX"] = 3, + ["spacingY"] = 3, + }, + ["spotlight"] = { + ["enabled"] = false, + ["hidePlaceholder"] = false, + ["units"] = {}, + ["sameSizeAsMain"] = true, + ["sameArrangementAsMain"] = true, + ["size"] = {66, 46}, + ["position"] = {}, + ["powerSize"] = 2, + ["orientation"] = "vertical", + ["anchor"] = "TOPLEFT", + ["spacingX"] = 3, + ["spacingY"] = 3, + }, + ["barOrientation"] = {"horizontal", false}, + ["groupFilter"] = {true, true, true, true, true, true, true, true}, + ["powerFilters"] = { + ["DRUID"] = {["TANK"] = true, ["DAMAGER"] = true, ["HEALER"] = true}, + ["HUNTER"] = true, + ["MAGE"] = true, + ["PALADIN"] = {["TANK"] = true, ["DAMAGER"] = true, ["HEALER"] = true}, + ["PRIEST"] = {["DAMAGER"] = true, ["HEALER"] = true}, + ["ROGUE"] = true, + ["SHAMAN"] = {["DAMAGER"] = true, ["HEALER"] = true}, + ["WARLOCK"] = true, + ["WARRIOR"] = {["TANK"] = true, ["DAMAGER"] = true}, + ["PET"] = true, + ["VEHICLE"] = true, + ["NPC"] = true, + }, + ["indicators"] = { + { + ["name"] = "Name Text", + ["indicatorName"] = "nameText", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"CENTER", "healthBar", "CENTER", 0, 0}, + ["frameLevel"] = 1, + ["font"] = {"Cell ".._G.DEFAULT, 13, "None", true}, + ["color"] = {"custom_color", {1, 1, 1}}, + ["vehicleNamePosition"] = {"TOP", 0}, + ["textWidth"] = {"percentage", 0.75}, + ["showGroupNumber"] = false, + }, -- 1 + { + ["name"] = "Status Text", + ["indicatorName"] = "statusText", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"BOTTOM", 0, "justify"}, + ["frameLevel"] = 30, + ["font"] = {"Cell ".._G.DEFAULT, 11, "None", true}, + ["showTimer"] = true, + ["showBackground"] = true, + ["colors"] = { + ["AFK"] = {1, 0.19, 0.19, 1}, + ["OFFLINE"] = {1, 0.19, 0.19, 1}, + ["DEAD"] = {1, 0.19, 0.19, 1}, + ["GHOST"] = {1, 0.19, 0.19, 1}, + ["FEIGN"] = {1, 1, 0.12, 1}, + ["DRINKING"] = {0.12, 0.75, 1, 1}, + ["PENDING"] = {1, 1, 0.12, 1}, + ["ACCEPTED"] = {0.12, 1, 0.12, 1}, + ["DECLINED"] = {1, 0.19, 0.19, 1}, + }, + }, -- 2 + { + ["name"] = "Health Text", + ["indicatorName"] = "healthText", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"TOP", "button", "CENTER", 0, -6}, + ["frameLevel"] = 2, + ["font"] = {"Cell ".._G.DEFAULT, 10, "None", true}, + ["format"] = { + ["health1"] = { + ["format"] = "effective_percent", + ["color"] = {"custom_color", {1, 1, 1}}, + ["hideIfEmptyOrFull"] = false, + }, + ["health2"] = { + ["format"] = "none", + ["color"] = {"custom_color", {1, 1, 1}}, + ["hideIfEmptyOrFull"] = false, + ["delimiter"] = " ", + }, + ["shields"] = { + ["format"] = "none", + ["color"] = {"custom_color", {0, 1, 0}}, + ["delimiter"] = "+", + }, + ["healAbsorbs"] = { + ["format"] = "none", + ["color"] = {"custom_color", {1, 0, 0}}, + ["delimiter"] = "-", + }, + }, + }, -- 3 + { + ["name"] = "Power Text", + ["indicatorName"] = "powerText", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"BOTTOMRIGHT", "button", "BOTTOMRIGHT", 0, 3}, + ["frameLevel"] = 2, + ["font"] = {"Cell ".._G.DEFAULT, 10, "None", true}, + ["color"] = {"custom_color", {1, 1, 1}}, + ["format"] = "number", + ["hideIfEmptyOrFull"] = true, + ["filters"] = { + ["DRUID"] = {["TANK"] = true, ["DAMAGER"] = true, ["HEALER"] = true}, + ["HUNTER"] = true, + ["MAGE"] = true, + ["PALADIN"] = {["TANK"] = true, ["DAMAGER"] = true, ["HEALER"] = true}, + ["PRIEST"] = {["DAMAGER"] = true, ["HEALER"] = true}, + ["ROGUE"] = true, + ["SHAMAN"] = {["DAMAGER"] = true, ["HEALER"] = true}, + ["WARLOCK"] = true, + ["WARRIOR"] = {["TANK"] = true, ["DAMAGER"] = true}, + ["PET"] = true, + ["VEHICLE"] = true, + ["NPC"] = true, + }, + }, -- 4 + { + ["name"] = "Health Thresholds", + ["indicatorName"] = "healthThresholds", + ["type"] = "built-in", + ["enabled"] = false, + ["thickness"] = 1, + ["thresholds"] = { + {0.35, {1, 0, 0, 1}}, + }, + }, -- 5 + { + ["name"] = "Status Icon", + ["indicatorName"] = "statusIcon", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"TOP", "button", "TOP", 0, -3}, + ["frameLevel"] = 10, + ["size"] = {18, 18}, + }, -- 6 + { + ["name"] = "Role Icon", + ["indicatorName"] = "roleIcon", + ["type"] = "built-in", + ["enabled"] = true, + ["hideDamager"] = false, + ["position"] = {"TOPLEFT", "button", "TOPLEFT", 0, 0}, + ["size"] = {11, 11}, + ["roleTexture"] = {"default", "Interface\\AddOns\\ElvUI\\Core\\Media\\Textures\\Tank.tga", "Interface\\AddOns\\ElvUI\\Core\\Media\\Textures\\Healer.tga", "Interface\\AddOns\\ElvUI\\Core\\Media\\Textures\\DPS.tga"}, + ["frameLevel"] = 5, + }, -- 7 + { + ["name"] = "Party Assignment Icon", + ["indicatorName"] = "partyAssignmentIcon", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"TOPLEFT", "button", "TOPLEFT", 1, -18}, + ["size"] = {11, 11}, + }, -- 8 + { + ["name"] = "Leader Icon", + ["indicatorName"] = "leaderIcon", + ["type"] = "built-in", + ["enabled"] = true, + ["hideInCombat"] = true, + ["position"] = {"TOPLEFT", "button", "TOPLEFT", 1, -10}, + ["size"] = {11, 11}, + }, -- 9 + { + ["name"] = "Combat Icon", + ["indicatorName"] = "combatIcon", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"BOTTOMRIGHT", "button", "BOTTOMRIGHT", 4, -4}, + ["frameLevel"] = 5, + ["size"] = {16, 16}, + ["onlyEnableNotInCombat"] = true, + }, -- 10 + { + ["name"] = "Ready Check Icon", + ["indicatorName"] = "readyCheckIcon", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"CENTER", "button", "CENTER", 0, 0}, + ["frameLevel"] = 100, + ["size"] = {16, 16}, + }, -- 11 + { + ["name"] = "Raid Icon (player)", + ["indicatorName"] = "playerRaidIcon", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"TOP", "button", "TOP", 0, 3}, + ["frameLevel"] = 5, + ["size"] = {14, 14}, + ["alpha"] = 0.77, + }, -- 12 + { + ["name"] = "Raid Icon (target)", + ["indicatorName"] = "targetRaidIcon", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"TOP", "button", "TOP", -14, 3}, + ["frameLevel"] = 5, + ["size"] = {14, 14}, + ["alpha"] = 0.77, + }, -- 13 + { + ["name"] = "Aggro (blink)", + ["indicatorName"] = "aggroBlink", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"TOPLEFT", "button", "TOPLEFT", 0, 0}, + ["frameLevel"] = 7, + ["size"] = {11, 11}, + }, -- 14 + { + ["name"] = "Aggro (bar)", + ["indicatorName"] = "aggroBar", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"BOTTOMLEFT", "button", "TOPLEFT", 0, -1}, + ["frameLevel"] = 1, + ["size"] = {20, 4}, + }, -- 15 + { + ["name"] = "Aggro (border)", + ["indicatorName"] = "aggroBorder", + ["type"] = "built-in", + ["enabled"] = true, + ["frameLevel"] = 3, + ["thickness"] = 2, + }, -- 16 + { + ["name"] = "AoE Healing", + ["indicatorName"] = "aoeHealing", + ["type"] = "built-in", + ["enabled"] = true, + ["height"] = 10, + ["color"] = {1, 1, 0}, + }, -- 17 + { + ["name"] = "External Cooldowns", + ["indicatorName"] = "externalCooldowns", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"RIGHT", "button", "RIGHT", 2, 5}, + ["frameLevel"] = 10, + ["size"] = {12, 20}, + ["showDuration"] = false, + ["showAnimation"] = true, + ["num"] = 2, + ["orientation"] = "right-to-left", + ["font"] = { + {"Cell ".._G.DEFAULT, 11, "Outline", false, "TOPRIGHT", 2, 1, {1, 1, 1}}, + {"Cell ".._G.DEFAULT, 11, "Outline", false, "BOTTOMRIGHT", 2, -1, {1, 1, 1}}, + }, + ["glowOptions"] = {"None", {0.95, 0.95, 0.32, 1}} + }, -- 18 + { + ["name"] = "Defensive Cooldowns", + ["indicatorName"] = "defensiveCooldowns", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"LEFT", "button", "LEFT", -2, 5}, + ["frameLevel"] = 10, + ["size"] = {12, 20}, + ["showDuration"] = false, + ["showAnimation"] = true, + ["num"] = 2, + ["orientation"] = "left-to-right", + ["font"] = { + {"Cell ".._G.DEFAULT, 11, "Outline", false, "TOPRIGHT", 2, 1, {1, 1, 1}}, + {"Cell ".._G.DEFAULT, 11, "Outline", false, "BOTTOMRIGHT", 2, -1, {1, 1, 1}}, + }, + ["glowOptions"] = {"None", {0.95, 0.95, 0.32, 1}} + }, -- 19 + { + ["name"] = "Externals + Defensives", + ["indicatorName"] = "allCooldowns", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"LEFT", "button", "LEFT", -2, 5}, + ["frameLevel"] = 10, + ["size"] = {12, 20}, + ["showDuration"] = false, + ["showAnimation"] = true, + ["num"] = 2, + ["orientation"] = "left-to-right", + ["font"] = { + {"Cell ".._G.DEFAULT, 11, "Outline", false, "TOPRIGHT", 2, 1, {1, 1, 1}}, + {"Cell ".._G.DEFAULT, 11, "Outline", false, "BOTTOMRIGHT", 2, -1, {1, 1, 1}}, + }, + ["glowOptions"] = {"None", {0.95, 0.95, 0.32, 1}} + }, -- 20 + { + ["name"] = "Dispels", + ["indicatorName"] = "dispels", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"BOTTOMRIGHT", "button", "BOTTOMRIGHT", 0, 4}, + ["frameLevel"] = 15, + ["size"] = {12, 12}, + ["filters"] = { + ["dispellableByMe"] = true, + ["Curse"] = true, + ["Disease"] = true, + ["Magic"] = true, + ["Poison"] = true, + ["Bleed"] = true, + }, + ["highlightType"] = "gradient-half", + ["iconStyle"] = "blizzard", + ["orientation"] = "right-to-left", + }, -- 21 + { + ["name"] = "Debuffs", + ["indicatorName"] = "debuffs", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"BOTTOMLEFT", "button", "BOTTOMLEFT", 1, 4}, + ["frameLevel"] = 5, + ["size"] = {{13, 13}, {17, 17}}, + ["showDuration"] = false, + ["showAnimation"] = true, + ["showTooltip"] = false, + ["enableBlacklistShortcut"] = false, + ["num"] = 3, + ["font"] = { + {"Cell ".._G.DEFAULT, 11, "Outline", false, "TOPRIGHT", 2, 1, {1, 1, 1}}, + {"Cell ".._G.DEFAULT, 11, "Outline", false, "BOTTOMRIGHT", 2, -1, {1, 1, 1}}, + }, + ["dispellableByMe"] = false, + ["orientation"] = "left-to-right", + }, -- 22 + { + ["name"] = "Raid Debuffs", + ["indicatorName"] = "raidDebuffs", + ["type"] = "built-in", + ["enabled"] = true, + ["position"] = {"CENTER", "button", "CENTER", 0, 3}, + ["frameLevel"] = 20, + ["size"] = {22, 22}, + ["border"] = 2, + ["num"] = 1, + ["showDuration"] = true, + ["font"] = { + {"Cell ".._G.DEFAULT, 11, "Outline", false, "TOPRIGHT", 2, 1, {1, 1, 1}}, + {"Cell ".._G.DEFAULT, 11, "Outline", false, "BOTTOMRIGHT", 2, -1, {1, 1, 1}}, + }, + ["onlyShowTopGlow"] = false, + ["orientation"] = "left-to-right", + ["showTooltip"] = false, + }, -- 23 + { + ["name"] = "Targeted Spells", + ["indicatorName"] = "targetedSpells", + ["type"] = "built-in", + ["enabled"] = true, + ["showAllSpells"] = false, + ["position"] = {"TOPLEFT", "button", "TOPLEFT", -4, 4}, + ["frameLevel"] = 50, + ["size"] = {20, 20}, + ["border"] = 2, + ["num"] = 1, + ["font"] = {"Cell ".._G.DEFAULT, 12, "Outline", false, "TOPRIGHT", 2, 1, {1, 1, 1}}, + ["orientation"] = "left-to-right", + }, -- 24 + { + ["name"] = "Target Counter", + ["indicatorName"] = "targetCounter", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"TOP", "button", "TOP", 0, 5}, + ["frameLevel"] = 15, + ["font"] = {"Cell ".._G.DEFAULT, 15, "Outline", false}, + ["color"] = {1, 0.1, 0.1}, + ["filters"] = { + ["outdoor"] = false, + ["pve"] = false, + ["pvp"] = true, + }, + }, -- 25 + { + ["name"] = "Actions", + ["indicatorName"] = "actions", + ["type"] = "built-in", + ["enabled"] = true, + ["speed"] = 1, + }, -- 26 + { + ["name"] = "Missing Buffs", + ["indicatorName"] = "missingBuffs", + ["type"] = "built-in", + ["enabled"] = false, + ["position"] = {"BOTTOMRIGHT", "button", "BOTTOMRIGHT", 0, 4}, + ["frameLevel"] = 10, + ["size"] = {13, 13}, + ["orientation"] = "right-to-left", + }, -- 27 + }, +} + +Cell.defaults.layoutAutoSwitch = { + ["solo"] = "default", + ["party"] = "default", + ["raid_outdoor"] = "default", + ["raid10"] = "default", + ["raid25"] = "default", + ["arena"] = "default", + ["battleground15"] = "default", + ["battleground40"] = "default", +} \ No newline at end of file diff --git a/Defaults/Layout_Defaults_TBC_Vanilla.lua b/Defaults/Layout_Defaults_Vanilla.lua similarity index 100% rename from Defaults/Layout_Defaults_TBC_Vanilla.lua rename to Defaults/Layout_Defaults_Vanilla.lua diff --git a/Defaults/LoadDefaults_TBC.xml b/Defaults/LoadDefaults_TBC.xml index 4d5582a5..5fdfc628 100644 --- a/Defaults/LoadDefaults_TBC.xml +++ b/Defaults/LoadDefaults_TBC.xml @@ -4,6 +4,6 @@