diff --git a/BuffsDebuffs.lua b/BuffsDebuffs.lua index 56a4d9d..f8542f9 100644 --- a/BuffsDebuffs.lua +++ b/BuffsDebuffs.lua @@ -111,7 +111,7 @@ sanctum.spreading_poison[52036] = 1 -- \\ sanctum.spreading_poison[58663] = 1 -- >> Cast 1.9s, Enemy, 28m Range sanctum.spreading_poison[82591] = 1 -- // sanctum.spreading_poison[54419] = 2 -- \\ (the actual poison) -sanctum.spreading_poison[58669] = 2 -- >> Instant Cast, Enemy, 28m Range, 2.5s +sanctum.spreading_poison[58669] = 2 -- >> Instant Cast, Enemy, 28m Range, 2.5s sanctum.spreading_poison[82597] = 2 -- // sanctum.spreading_poison[54420] = 3 -- Instant Cast, Area, 3.5m Radius sanctum.spreading_poison[80794] = 4 -- Cast 1.9s, Cone??, 0m Range??, 28m Radius @@ -173,7 +173,7 @@ maw_lorkhaj.zhajBoss_curseduration = 25 maw_lorkhaj.zhajBoss_glyphability = 57525 maw_lorkhaj.zhajBoss_glyphcooldown = 25 maw_lorkhaj.zhajBoss_knownGlyphs = {} -maw_lorkhaj.zhajBoss_glyphs = +maw_lorkhaj.zhajBoss_glyphs = { {x=0.55496829748154, y=0.29175475239754}, {x=0.56342494487762, y=0.25405216217041}, @@ -183,7 +183,7 @@ maw_lorkhaj.zhajBoss_glyphs = {x=0.62508809566498, y=0.32699084281921}, } ---False Moon Twins, S’Kinrai and Vashai +--False Moon Twins, S’Kinrai and Vashai -- Holy Aspect maw_lorkhaj.twinBoss_lunaraspect = {} maw_lorkhaj.twinBoss_lunaraspect[59472] = true @@ -318,7 +318,7 @@ halls_fab.hunters_spawn_sphere = 90414 -- Pinnacle Factotum (2nd boss) halls_fab.pinnacleBoss_fluxburst = 90755 -- the streak-like attack halls_fab.pinnacleBoss_conduit_spawn = 91781 -- sadly not targeted on somebody -halls_fab.pinnacleBoss_conduit_drain = 91792 +halls_fab.pinnacleBoss_conduit_drain = 91792 halls_fab.pinnacleBoss_scalded_debuff = 90916 -- Refabrication Committee (4th bosses) @@ -403,7 +403,7 @@ asylum.interest_list[99990] = true -- "Enrage", called when bosses enrage, 2240 on start, 2250 on stop (also when they go to sleep), seems to repeat each 20s (does that mean the enrage stacks up?), tUnitId == boss-in-question asylum.interest_list[101354] = true -- easy debugging when put here (see above for what these do) -asylum.interest_list[64508] = true +asylum.interest_list[64508] = true RaidNotifier.BuffsDebuffs[RAID_ASYLUM_SANCTORIUM] = asylum @@ -527,12 +527,12 @@ sunspire.focus_fire_tick = { -- remove } -- Lokkestiiz ice boss sunspire.door_protection_ice = 120417 -- 2200 -sunspire.frozen_tomb = 119632 +sunspire.frozen_tomb = 119632 sunspire.frozen_tomb_wipe_time = 60000 sunspire.fire_trail = 122727 -- lighting breath while flying mechanic sunspire.raid_mr3_conjuredReflection = 124051 -sunspire.frozen_prison = 124335 +sunspire.frozen_prison = 124335 sunspire.storm_fury = { [115871] = true, [115702] = true, @@ -567,7 +567,7 @@ sunspire.translation_apocalypse = 121436 2240 time shift 124280 laduje portal na prawo (od startu okolo 3 sek) 2245 time shift 121502 - + ]] sunspire.negate_field = 121411 -- 2200 hitvalue diff --git a/RaidNotifier.lua b/RaidNotifier.lua index 7779acb..04e6ab7 100644 --- a/RaidNotifier.lua +++ b/RaidNotifier.lua @@ -38,7 +38,7 @@ end -- Locale local L -RaidNotifier.ActionResults = +RaidNotifier.ActionResults = { ACTION_RESULT_DAMAGE, ACTION_RESULT_BEGIN, @@ -46,7 +46,7 @@ RaidNotifier.ActionResults = ACTION_RESULT_EFFECT_GAINED, ACTION_RESULT_EFFECT_GAINED_DURATION, ACTION_RESULT_EFFECT_FADED, - ACTION_RESULT_INTERRUPT, + ACTION_RESULT_INTERRUPT, ACTION_RESULT_DIED, --ACTION_RESULT_DIED_XP, -- only interested in spawns/minions, which don't give exp?? } @@ -68,7 +68,7 @@ do --------------------------------- end local DEFAULT_SOUND = "Default_Sound" - local Sounds = + local Sounds = { {name = "-Default-", id = DEFAULT_SOUND}, {name = "-None-", id = SOUNDS.NO_SOUND}, @@ -96,7 +96,7 @@ do --------------------------------- {name = "Synergy Ready", id = SOUNDS.ABILITY_SYNERGY_READY}, {name = "TelVar Multiplier Max", id = SOUNDS.TELVAR_MULTIPLIERMAX}, } - + function RaidNotifier:GetSounds() return Sounds end @@ -132,7 +132,7 @@ do --------------------------------- local duration = 3000 local soundId = self:GetSoundValue(category, setting) - if soundId == DEFAULT_SOUND then -- + if soundId == DEFAULT_SOUND then -- soundId = self.Vars.general.default_sound end @@ -141,7 +141,7 @@ do --------------------------------- return end - if (interval) then + if (interval) then local currentTime = GetTimeStamp() if (interval > GetDiffBetweenTimeStamps(currentTime, self:GetLastNotify(category, setting))) then return @@ -163,7 +163,7 @@ do --------------------------------- if soundId ~= nil then PlaySound(soundId) end end end - + -- called when messageParams are applied to the line local orgTextScale, orgCountdownScale, orgCountdownColor local function SetupCallback(line, messageParams, doReset) @@ -221,30 +221,30 @@ do --------------------------------- p("Invalid text for '%s -> %s'", category, setting) return end - if (interval) then + if (interval) then local currentTime = GetTimeStamp() if (interval > GetDiffBetweenTimeStamps(currentTime, self:GetLastNotify(category, setting))) then return end self:SetLastNotify(category, setting, currentTime) end - + important = important and important or important == nil -- default countdown - + local countdownId = 0 if not self:IsCountdownInProgress() and self.Vars.general.use_center_screen_announce > 0 or important then countdownId = LCSA:CreateCountdown(timer, soundId, nil, text, nil, SetupCallback, CountdownCallback) else local pool = RaidNotifier.NotificationsPool.GetInstance() countdownId = pool:Add(text, timer, true) - if soundId ~= nil then PlaySound(soundId) end + if soundId ~= nil then PlaySound(soundId) end end if countdownId > 0 then countdownInProgress = true end return countdownId end - + function RaidNotifier:StopCountdown(countdownIndex) LCSA:EndCountdown(countdownIndex) -- if self.Vars.general.use_center_screen_announce == 0 and not important then @@ -253,7 +253,7 @@ do --------------------------------- -- end countdownInProgress = false end - + end @@ -273,7 +273,7 @@ do ---------------------- function RaidNotifier.OnUltimateReceived(unitTag, ultimateCurrent, ultimateCost) --, ultimateGroupId, isSelf) local self = RaidNotifier local userName = GetUnitDisplayName(unitTag) - ultimates[userName] = + ultimates[userName] = { userName = userName, name = GetUnitName(unitTag), @@ -301,7 +301,7 @@ do ---------------------- local function ToggleLibGroupSocket(enabled) local settings = RaidNotifier.Vars.ultimate - if settings.enabled then + if settings.enabled then local button = ZO_GroupMenu_Keyboard_LibGroupSocketToggle if not button then -- wait for button zo_callLater(function() ToggleLibGroupSocket(enabled) end, 1000) @@ -316,9 +316,9 @@ do ---------------------- function RaidNotifier:RegisterForUltimateChanges() local settings = self.Vars.ultimate if not settings.enabled then return end - + if not ultimateHandler then return end - + if listening then return end listening = true dbg("RegisterForUltimateChanges") @@ -326,7 +326,7 @@ do ---------------------- self:SetElementHidden("ultimate", "ulti_window", settings.hidden) ultimates = {} - if ultimateHandler.SetUltimateGroupId then + if ultimateHandler.SetUltimateGroupId then ultimateHandler:SetUltimateGroupId(ultimateGroupId) end ultimateHandler:RegisterForUltimateChanges(self.OnUltimateReceived) @@ -356,7 +356,7 @@ do ---------------------- local newMembers = {} for i=1, groupSize do local userName = GetUnitDisplayName("group"..i) - if userName and userName ~= "" then + if userName and userName ~= "" then newMembers[userName] = IsUnitOnline("group"..i) end end @@ -385,7 +385,7 @@ do ---------------------- function RaidNotifier:UnregisterForUltimateChanges() if not ultimateHandler then return end - + if not listening then return end listening = false dbg("UnregisterForUltimateChanges") @@ -416,7 +416,7 @@ do ---------------------- self:UpdateUltimates() end - SLASH_COMMANDS["/rnulti"] = function(str) + SLASH_COMMANDS["/rnulti"] = function(str) local args = {zo_strsplit(" ", str)} local self = RaidNotifier @@ -435,7 +435,7 @@ do ---------------------- settings.enabled = true settings.hidden = false self:RegisterForUltimateChanges() - self:UpdateUltimates() + self:UpdateUltimates() elseif (args[1] == "disable" or args[1] == "off" or args[1] == "0") then p("Disable Ultimate Exchange") settings.enabled = false @@ -446,7 +446,7 @@ do ---------------------- ultimateHandler:Refresh() end elseif (args[1] == "debug") then - if ultimateHandler then + if ultimateHandler then ultimateHandler:SetDebug(tonumber(args[2])) end elseif (args[1] == "clear") then @@ -459,7 +459,7 @@ do ---------------------- settings.override_cost = tonumber(args[2]) elseif (args[2] == "auto") then -- maybe use GetSlotBoundId to grab slotted ability instead? settings.override_cost = GetSlotAbilityCost(ACTION_BAR_ULTIMATE_SLOT_INDEX + 1) - else + else p("Trying to set override cost to unsupported value (%s)", args[2]) return end @@ -564,9 +564,9 @@ do ---------------------- self:AddAnnouncement(GetString(RAIDNOTIFIER_ALERTS_GENERAL_NO_BUFFFOOD), "general", "buffFood_reminder", settings.buffFood_reminder_interval) end end - + -- These should remain the same throughout updates - local RaidZoneIds = + local RaidZoneIds = { [RAID_HEL_RA_CITADEL] = 636, [RAID_AETHERIAN_ARCHIVE] = 638, @@ -626,7 +626,7 @@ do ---------------------- self.raidDifficulty = GetCurrentZoneDungeonDifficulty() if (self.raidId > 0) then dbg("Register for %s (%s)", GetRaidZoneName(self.raidId), GetString("SI_DUNGEONDIFFICULTY", self.raidDifficulty)) - + local trial = self.Trial[self.raidId] if (trial) then trial.Initialize() @@ -634,7 +634,7 @@ do ---------------------- local bossesChangedCallback = trial.OnBossesChanged local effectChangedCallback = trial.OnEffectChanged local combatStateChangedCallback = trial.OnCombatStateChanged - + local abilityList = {} local function RegisterForAbility(abId) if not abilityList[abId] then @@ -645,12 +645,12 @@ do ---------------------- -- The main juicy events we want, registered seperately for better performance -- TODO: Remove (some of) this debugging when releasing it - -- TODO: Also add filter for action result but will require re-organizing BuffsDebuffs.lua + -- TODO: Also add filter for action result but will require re-organizing BuffsDebuffs.lua dbg("----------------------------------------------") dbg(" Gathering Abilities for Raid") local raidData = self.BuffsDebuffs[self.raidId] for k,v in pairs(raidData) do - if type(v) == "number" then + if type(v) == "number" then if v > 10000 then dbg("Found ability #%d (%s)", v, k) RegisterForAbility(v) @@ -685,7 +685,7 @@ do ---------------------- end if (bossesChangedCallback) then EVENT_MANAGER:RegisterForEvent(self.Name, EVENT_BOSSES_CHANGED, bossesChangedCallback) - end + end -- In case of initializing while already at a boss if (bossesChangedCallback) then @@ -702,14 +702,14 @@ do ---------------------- end if (settings.no_assistants and GetActiveCollectibleByType(COLLECTIBLE_CATEGORY_TYPE_ASSISTANT) > 0) then UseCollectible(GetActiveCollectibleByType(COLLECTIBLE_CATEGORY_TYPE_ASSISTANT)) - end + end else if (combatStateChangedCallback) then - zo_callLater(function() - if (not IsUnitInCombat("player")) then + zo_callLater(function() + if (not IsUnitInCombat("player")) then dbg("not InCombat") combatStateChangedCallback(inCombat) - end + end end, 3000); end end @@ -719,7 +719,7 @@ do ---------------------- --self:AddFragment() listening = true - + -- Ultimate exchanging self:RegisterForUltimateChanges() @@ -748,7 +748,7 @@ do ---------------------- -- Ultimate exchanging self:UnregisterForUltimateChanges() - + -- Food buffs EVENT_MANAGER:UnregisterForUpdate(self.Name .. "Food") @@ -777,7 +777,7 @@ do ---------------------- end self.dbg = dbg - if ENABLE_DEBUG_LOG then + if ENABLE_DEBUG_LOG then if not RN_DEBUG_LOG then RN_DEBUG_LOG = {} end @@ -793,9 +793,9 @@ do ---------------------- end self:CreateSettingsMenu() - + L = self:GetLocale() - + -- Init debug self:ToggleDebugTracker(self.Vars.dbg.tracker or self.Vars.dbg.units) @@ -807,12 +807,12 @@ do ---------------------- self.AnnouncementUIManager:Initialize(RaidNotifierUICenterAnnounce) RaidNotifier.NotificationsPool.GetInstance():SetScale(self.Vars.general.notifications_scale / 100); RaidNotifier.NotificationsPool.GetInstance():SetPrecise(self.Vars.countdown.timerPrecise) - + -- Bindings ZO_CreateStringId("SI_BINDING_NAME_RAIDNOTIFIER_TOGGLE_ULTI", L.Binding_ToggleUltimateExchange) -- Always add fragment now - self:AddFragment() + self:AddFragment() -- These aren't needed anymore since we now start & stop Raid Notifier solely based on being in the raid zone --EVENT_MANAGER:RegisterForEvent(self.Name, EVENT_RAID_TRIAL_STARTED, function(...) self:RegisterEvents() end) @@ -856,11 +856,11 @@ end do local bossCount, bossAlive, bossFull function RaidNotifier:GetNumBosses(fresh) - if (not bossCount or fresh) then + if (not bossCount or fresh) then bossCount = 0 bossAlive = 0 - bossFull = 0 - + bossFull = 0 + local health, maxHealth for i = 1, MAX_BOSSES do if DoesUnitExist("boss"..i) then @@ -883,7 +883,7 @@ do --------------------------- local LUNIT = LibUnits2 local Util = RaidNotifier.Util - + function RaidNotifier.UnitIdToString(id) local name = RaidNotifier.Vars.general.useDisplayName and LUNIT.GetDisplayNameForUnitId(id) or LUNIT.GetNameForUnitId(id) if name == "" then @@ -891,7 +891,7 @@ do --------------------------- end return name end - + function RaidNotifier.UnitToTag(id) return LUNIT.GetUnitTagForUnitId(id) end @@ -922,7 +922,7 @@ do --------------------------- [RAID_SUNSPIRE] = RaidNotifier.SS, [RAID_KYNES_AEGIS] = RaidNotifier.KA, } - + ------------------- ---- Debugging ---- ------------------- @@ -934,19 +934,19 @@ do --------------------------- local trackedUnits = {} local trackedAbilities = {} - + local function OnCombatDebugEvent(_, result, isError, aName, aGraphic, aActionSlotType, sName, sType, tName, tType, hitValue, pType, dType, log, sUnitId, tUnitId, abilityId) local self = RaidNotifier - + -- if abilityId < 80000 then --- return +-- return if sType == COMBAT_UNIT_TYPE_PLAYER then return elseif self.blacklist and self.blacklist[abilityId] then - return + return end - + if self.Vars.dbg.units then local function CheckUnit(id, name, type) if id > 0 and not trackedUnits[id] then @@ -962,7 +962,7 @@ do --------------------------- end CheckUnit(tUnitId, tName, tType) end - + --self.Vars.dbg.blacklist = self.Vars.dbg.blacklist or {} --self.Vars.dbg.blacklist[abilityId] = true @@ -989,7 +989,7 @@ do --------------------------- local ability = (aName ~= "" and aName ~= nil) and aName or GetAbilityName(abilityId) debugList[result][abilityId] = self.Vars.dbg.spamControl - dlog(debugMsg, result, ability, abilityId, source, target, hitValue) + dlog(debugMsg, result, ability, abilityId, source, target, hitValue) end end end @@ -998,7 +998,7 @@ do --------------------------- local debugEventName = RaidNotifier.Name .. "_CombatEventDebug" function RaidNotifier:ToggleDebugTracker(enabled) EVENT_MANAGER:UnregisterForEvent(debugEventName, EVENT_COMBAT_EVENT) - if enabled then + if enabled then EVENT_MANAGER:RegisterForEvent(debugEventName, EVENT_COMBAT_EVENT, OnCombatDebugEvent) end end @@ -1028,7 +1028,7 @@ do --------------------------- end -- Fast debug toggle - SLASH_COMMANDS["/rndebug"] = function(str) + SLASH_COMMANDS["/rndebug"] = function(str) local args = {zo_strsplit(" ", str)} local self = RaidNotifier @@ -1045,7 +1045,7 @@ do --------------------------- elseif (args[1] == "spam") then settings.spamControl = Util.GetArgValue(args[2], settings.spamControl) p("%s Spam Control", settings.spamControl and "Enabled" or "Disabled") - elseif (args[1] == "arrow") then + elseif (args[1] == "arrow") then p("Arrow test") local masterList = GROUP_LIST_MANAGER:GetMasterList() if (#masterList == 0) then @@ -1060,7 +1060,7 @@ do --------------------------- p("%s My Enemy Only", settings.myEnemyOnly and "Enabled" or "Disabled") elseif (args[1] == "clear") then local result = tonumber(args[2]) - if result ~= nil then + if result ~= nil then p("Clearing debug list [%d]", result) debugList[result] = {} else diff --git a/Settings.lua b/Settings.lua index 41196eb..4f9332e 100644 --- a/Settings.lua +++ b/Settings.lua @@ -33,11 +33,11 @@ do ------------------ -- [3] = true, -- Tank -- } - -- local defaults = + -- local defaults = -- { -- useAccountWide = true, --very special setting!! - -- general = + -- general = -- { -- no need for advanced settings -- buffFood_reminder = true, -- buffFood_reminder_interval = 60, @@ -47,7 +47,7 @@ do ------------------ -- last_pet = 0, -- default_sound = SOUNDS.CHAMPION_POINTS_COMMITTED, -- }, - -- ultimate = + -- ultimate = -- { -- no need for advanced settings -- enabled = false, -- hidden = false, @@ -60,7 +60,7 @@ do ------------------ -- override_cost = 0, -- }, - -- helra = + -- helra = -- { -- warrior_stoneform = {value = 1, --[[Self]] sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY, roles = ALL_ROLES}, -- }, @@ -84,7 +84,7 @@ do ------------------ -- overcharge = {value = 0, --[[Off]] sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- call_lightning = {value = 1, --[[Self]] sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- }, - -- dragonstar = + -- dragonstar = -- { -- general_taking_aim = {value = false, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- general_crystal_blast = {value = true, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, @@ -112,7 +112,7 @@ do ------------------ -- stage7_poison = {value = true, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- stage9_synergy = {value = true, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- }, - -- hallsFab = + -- hallsFab = -- { -- conduit_strike = {value = true, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- taking_aim = {value = 1, --[[Self]] sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY, roles = ALL_ROLES}, @@ -125,9 +125,9 @@ do ------------------ -- committee_auras_dynamic = {value = false, }, -- TODO: combine with "committee_auras" as dropdown once fully tested -- committee_fabricant_spawn = {value = false, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, -- committee_reclaim_achieve = {value = false, sound = DEFAULT_SOUND, priority = DEFAULT_PRIORITY}, - -- }, + -- }, - -- dbg = + -- dbg = -- { -- no need for advanced settings -- enable = false, -- notify = false, @@ -138,10 +138,10 @@ do ------------------ -- devMode = false, -- }, -- } - + local defaults = { - dLog = {}, - useAccountWide = true, + dLog = {}, + useAccountWide = true, general = { buffFood_reminder = true, buffFood_reminder_interval = 60, @@ -214,7 +214,7 @@ do ------------------ rakkhat_unstablevoid_countdown = false, rakkhat_threshingwings = true, rakkhat_darknessfalls = false, - rakkhat_darkbarrage = false, + rakkhat_darkbarrage = false, rakkhat_lunarbastion1 = 0, -- "Off" rakkhat_lunarbastion2 = 0, -- "Off" hulk_armorweakened = false, @@ -230,7 +230,7 @@ do ------------------ stage9_synergy = true, }, hallsFab = { - conduit_strike = true, + conduit_strike = true, taking_aim = 1, -- "Self" taking_aim_dynamic = 1, -- "Normal" taking_aim_duration = 5000, @@ -248,7 +248,7 @@ do ------------------ committee_overpower_auras_duration = 9000, committee_fabricant_spawn = false, committee_reclaim_achieve = false, - }, + }, asylum = { llothis_defiling_blast = 1, -- "Self" llothis_soul_stained_corruption = false, @@ -268,7 +268,7 @@ do ------------------ hoarfrost = 0, -- "Off" hoarfrost_shed = true, hoarfrost_countdown = true, - heavy_attack = 0, -- "Off" + heavy_attack = 0, -- "Off" chilling_comet = true, baneful_barb = 0, -- "Off" roaring_flare = 2, -- "Full" @@ -317,7 +317,7 @@ do ------------------ else -- we passed the category itself already return settings[category] end - + end function RaidNotifier:GetDefaults() @@ -433,35 +433,35 @@ function RaidNotifier:CreateSettingsMenu() local off_self_all = { L.Settings_General_Choices_Off, - L.Settings_General_Choices_Self, - L.Settings_General_Choices_All, + L.Settings_General_Choices_Self, + L.Settings_General_Choices_All, } local choices = { mawLorkhaj = { twinBoss_aspects = { L.Settings_General_Choices_Off, - L.Settings_General_Choices_Minimal, + L.Settings_General_Choices_Minimal, L.Settings_General_Choices_Normal, - L.Settings_General_Choices_Full, + L.Settings_General_Choices_Full, }, shattering_strike = off_self_all, rakkhat_unstablevoid = off_self_all, rakkhat_lunarbastion1 = { L.Settings_General_Choices_Off, - L.Settings_General_Choices_Self, + L.Settings_General_Choices_Self, L.Settings_General_Choices_Other, - L.Settings_General_Choices_All, + L.Settings_General_Choices_All, }, rakkhat_lunarbastion2 = { L.Settings_General_Choices_Off, - L.Settings_General_Choices_Self, + L.Settings_General_Choices_Self, L.Settings_General_Choices_Other, - L.Settings_General_Choices_All, + L.Settings_General_Choices_All, }, suneater_eclipse = { L.Settings_General_Choices_Off, L.Settings_General_Choices_Self, - L.Settings_General_Choices_Near, + L.Settings_General_Choices_Near, L.Settings_General_Choices_All, }, }, @@ -501,7 +501,7 @@ function RaidNotifier:CreateSettingsMenu() draining_ballista = off_self_all, }, asylum = { - llothis_defiling_blast = off_self_all, + llothis_defiling_blast = off_self_all, felms_teleport_strike = off_self_all, olms_eruption = off_self_all, }, @@ -567,10 +567,10 @@ function RaidNotifier:CreateSettingsMenu() local function MakeControlEntry(data, category, key) if (category ~= nil and key ~= nil) then - -- for the majority of the settings + -- for the majority of the settings data.category = category data.key = key - + -- build simple table with zero-based values for choices if data.choices and not data.choicesValues then data.choicesValues = {} @@ -593,7 +593,7 @@ function RaidNotifier:CreateSettingsMenu() index = index + 1 data.reference = "RNSettingCtrl"..index end - + -- add get/set functions if they were not provided if not data.getFunc then data.getFunc = function() return getValue(data.category, data.key) end @@ -657,11 +657,11 @@ function RaidNotifier:CreateSettingsMenu() L.Settings_General_Choices_Major_Announcement, L.Settings_General_Choices_Custom_Announcement, }, choicesValues = { - CSA_CATEGORY_SMALL_TEXT, + CSA_CATEGORY_SMALL_TEXT, --CSA_CATEGORY_LARGE_TEXT, CSA_CATEGORY_MAJOR_TEXT, 0, - }, + }, noAlert = true, }, "general", "use_center_screen_announce") MakeControlEntry({ @@ -676,7 +676,7 @@ function RaidNotifier:CreateSettingsMenu() min = 70, max = 150, step = 5, noAlert = true, disabled = function() return savedVars.general.use_center_screen_announce ~= 0 end, - }, "general", "notifications_scale") + }, "general", "notifications_scale") MakeControlEntry({ type = "button", name = L.Settings_General_Notifications_Showcase, @@ -745,7 +745,7 @@ function RaidNotifier:CreateSettingsMenu() noAlert = true, scrollable = true, }, "general", "default_sound") - + -- moved here for easier access MakeControlEntry({ type = "checkbox", @@ -764,8 +764,8 @@ function RaidNotifier:CreateSettingsMenu() getFunc = function() return savedVars.ultimate.enabled end, setFunc = function(value) savedVars.ultimate.enabled = value - if self.raidId > 0 then - if value then + if self.raidId > 0 then + if value then self:RegisterForUltimateChanges() else self:UnregisterForUltimateChanges() @@ -780,7 +780,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_Ultimate_Hidden_TT, getFunc = function() return savedVars.ultimate.hidden end, setFunc = function(value) - savedVars.ultimate.hidden = value + savedVars.ultimate.hidden = value self:SetElementHidden("ultimate", "ulti_window", value) end, default = false, @@ -791,7 +791,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_Ultimate_UseColor_TT, getFunc = function() return savedVars.ultimate.useColor end, setFunc = function(value) - savedVars.ultimate.useColor = value + savedVars.ultimate.useColor = value self:UpdateUltimates() end, default = true, @@ -802,7 +802,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_Ultimate_UseDisplayName_TT, getFunc = function() return savedVars.ultimate.useDisplayName end, setFunc = function(value) - savedVars.ultimate.useDisplayName = value + savedVars.ultimate.useDisplayName = value self:UpdateUltimates() end, default = false, @@ -813,7 +813,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_Ultimate_ShowHealers_TT, getFunc = function() return savedVars.ultimate.showHealers end, setFunc = function(value) - savedVars.ultimate.showHealers = value + savedVars.ultimate.showHealers = value self:UpdateUltimates() end, default = true, @@ -824,7 +824,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_Ultimate_ShowTanks_TT, getFunc = function() return savedVars.ultimate.showTanks end, setFunc = function(value) - savedVars.ultimate.showTanks = value + savedVars.ultimate.showTanks = value self:UpdateUltimates() end, default = true, @@ -835,7 +835,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_Ultimate_ShowDps_TT, getFunc = function() return savedVars.ultimate.showDps end, setFunc = function(value) - savedVars.ultimate.showDps = value + savedVars.ultimate.showDps = value self:UpdateUltimates() end, default = false, @@ -879,7 +879,7 @@ function RaidNotifier:CreateSettingsMenu() 10, 5, 2, - }, + }, getFunc = function() return savedVars.countdown.timerPrecise end, @@ -889,12 +889,12 @@ function RaidNotifier:CreateSettingsMenu() ReloadUI() end, noAlert = true, - }, "countdown", "timerPrecise") + }, "countdown", "timerPrecise") MakeControlEntry({ type = "checkbox", name = L.Settings_Countdown_UseColors, tooltip = L.Settings_Countdown_UseColors_TT, - noAlert = true, + noAlert = true, }, "countdown", "useColor") subTable = nil --end submenu @@ -906,9 +906,9 @@ function RaidNotifier:CreateSettingsMenu() tooltip = RAIDNOTIFIER_SETTINGS_PROFILE_USEGLOBAL_TT, warning = L.Settings_Profile_UseGlobal_Warning, getFunc = function() - return RNVars.Default[GetDisplayName()]["$AccountWide"].useAccountWide + return RNVars.Default[GetDisplayName()]["$AccountWide"].useAccountWide end, - setFunc = function(value) + setFunc = function(value) RNVars.Default[GetDisplayName()]["$AccountWide"].useAccountWide = value ReloadUI() end, @@ -1115,7 +1115,7 @@ function RaidNotifier:CreateSettingsMenu() tooltip = L.Settings_MawLorkhaj_Zhaj_Glyphs_Invert_TT, getFunc = function() return savedVars.mawLorkhaj.zhaj_glyphs_invert end, setFunc = function(value) savedVars.mawLorkhaj.zhaj_glyphs_invert = value; self:InvertGlyphs() end, - disabled = function() return not savedVars.mawLorkhaj.zhaj_glyphs end, + disabled = function() return not savedVars.mawLorkhaj.zhaj_glyphs end, noAlert = true, }, "mawLorkhaj", "zhaj_glyphs_invert") MakeControlEntry({ @@ -1460,19 +1460,19 @@ function RaidNotifier:CreateSettingsMenu() type = "checkbox", name = L.Settings_Cloudrest_Malicious_Strike, tooltip = L.Settings_Cloudrest_Malicious_Strike_TT, - }, "cloudrest", "malicious_strike") + }, "cloudrest", "malicious_strike") MakeControlEntry({ type = "dropdown", name = L.Settings_Cloudrest_Heavy_Attack, tooltip = L.Settings_Cloudrest_Heavy_Attack_TT, choices = choices.cloudrest.heavy_attack, - }, "cloudrest", "heavy_attack") + }, "cloudrest", "heavy_attack") MakeControlEntry({ type = "dropdown", name = L.Settings_Cloudrest_Baneful_Barb, tooltip = L.Settings_Cloudrest_Baneful_Barb_TT, choices = choices.cloudrest.baneful_barb, - }, "cloudrest", "baneful_barb") + }, "cloudrest", "baneful_barb") MakeControlEntry({ type = "checkbox", name = L.Settings_Cloudrest_Break_Amulet, @@ -1546,13 +1546,13 @@ function RaidNotifier:CreateSettingsMenu() type = "checkbox", name = L.Settings_Sunspire_Thrash, tooltip = L.Settings_Sunspire_Thrash_TT, - }, "sunspire", "thrash") + }, "sunspire", "thrash") MakeControlEntry({ type = "dropdown", name = L.Settings_Sunspire_Mark_For_Death, tooltip = L.Settings_Sunspire_Mark_For_Death_TT, choices = choices.sunspire.mark_for_death, - }, "sunspire", "mark_for_death") + }, "sunspire", "mark_for_death") MakeControlEntry({ type = "checkbox", name = L.Settings_Sunspire_Time_Breach, @@ -1562,7 +1562,7 @@ function RaidNotifier:CreateSettingsMenu() type = "checkbox", name = L.Settings_Sunspire_Shock_Bolt, tooltip = L.Settings_Sunspire_Shock_Bolt_TT, - }, "sunspire", "shock_bolt") + }, "sunspire", "shock_bolt") MakeControlEntry({ type = "checkbox", name = L.Settings_Sunspire_Apocalypse, @@ -1619,7 +1619,7 @@ function RaidNotifier:CreateSettingsMenu() --tooltip = RAIDNOTIFIER_SETTINGS_DEBUG_TRACKER_ENABLED_TT, -- dont need tooltip for this getFunc = function() return savedVars.dbg.tracker end, setFunc = function(value) - savedVars.dbg.tracker = value + savedVars.dbg.tracker = value self:ToggleDebugTracker(savedVars.dbg.tracker) end, }) @@ -1650,7 +1650,7 @@ function RaidNotifier:CreateSettingsMenu() --function RaidNotifier:GetSoundValue(category, key) -- local setting = self:GetSetting(savedVars, category, key) - -- return setting.sound + -- return setting.sound --end --function RaidNotifier:SetSoundValue(category, key, value) -- local setting = self:GetSetting(savedVars, category, key) @@ -1660,13 +1660,13 @@ function RaidNotifier:CreateSettingsMenu() local function InitializeCustomDialog() local customControl = RaidNotifier_ConfigDialog - + local function SetupDialog(dialog, data) customControl.selectSound = customControl:GetNamedChild("SelectSound") customControl.selectedSoundID = self:GetSoundValue(data.category, data.key) customControl.selectSound.dropdown:SetSelectedItemText(self:GetSoundName(customControl.selectedSoundID)) end - + local function OnDialogConfirm(dialog) self:SetSoundValue(dialog.data.category, dialog.data.key, dialog.selectedSoundID) end @@ -1696,12 +1696,12 @@ function RaidNotifier:CreateSettingsMenu() } } }) - + local function OnSoundSelected(comboBox, entryText, entry) customControl.selectedSoundID = entry.id PlaySound(entry.id) end - + local function PopulateSoundDropdown(comboBox) comboBox:SetSortsItems(false) @@ -1736,12 +1736,12 @@ function RaidNotifier:CreateSettingsMenu() if (control and not control.data.noAlert) then control.soundBtn = WINDOW_MANAGER:CreateControlFromVirtual(nil, control, "RaidNotifier_ConfigButton") control.soundBtn:SetAnchor(RIGHT, control.combobox or control[control.data.type], LEFT, -1, 0) - control.soundBtn:SetHandler("OnClicked", function() + control.soundBtn:SetHandler("OnClicked", function() ZO_Dialogs_ShowDialog("RAID_NOTIFIER_CONFIG_DIALOG", control.data) end) control.soundBtn.data = {tooltipText=function() return GetConfigButtonTooltipText(control) end} control.soundBtn:SetHidden(false) - + -- re-anchor the warning control if control.warning then control.warning:ClearAnchors() @@ -1750,7 +1750,7 @@ function RaidNotifier:CreateSettingsMenu() end end end - + end CALLBACK_MANAGER:RegisterCallback("LAM-PanelControlsCreated", OnPanelCreation) @@ -1762,7 +1762,7 @@ function RaidNotifier:TryUpgradeSettings() local savedVars = self.Vars local version, lastVersion = self.Version, savedVars.addonVersion or "0" - if lastVersion < "2.2.1" then + if lastVersion < "2.2.1" then -- change all alert sounds with CHAMPION_POINT_GAINED to DEFAULT_SOUND for key, sound in pairs(savedVars.sounds) do if sound == SOUNDS.CHAMPION_POINTS_COMMITTED then @@ -1777,7 +1777,7 @@ function RaidNotifier:TryUpgradeSettings() savedVars.countdown.timerScale = 100 savedVars.countdown.textScale = 100 end - + if lastVersion > "0" and lastVersion < "2.3.6" then -- set taking_aim_duration to "Custom" if previous duration differs from the default if savedVars.hallsFab.taking_aim_duration ~= defaults.hallsFab.taking_aim_duration then diff --git a/lang/en.lua b/lang/en.lua index 4cbaad2..743f5ac 100644 --- a/lang/en.lua +++ b/lang/en.lua @@ -58,7 +58,7 @@ L.Binding_ToggleUltimateExchange = "Toggle Ultimate" -------------------------------- L.Settings_Ultimate_Header = "Ultimate Exchange (beta)" L.Settings_Ultimate_Description = "This feature allows you to send your ultimate to your teammates so they can see how close you are to casting it. It uses your cost based on whatever cost reduction you might have from sets or passives." --- Settings +-- Settings L.Settings_Ultimate_Enabled = "Enabled" L.Settings_Ultimate_Enabled_TT = "Enable the sharing and receiving of ultimate values. It is always disabled outside of trials." L.Settings_Ultimate_Hidden = "Hidden" @@ -155,7 +155,7 @@ L.Settings_Archive_Overcharge = "Mobs: Overcharge" L.Settings_Archive_Overcharge_TT = "Alerts you when an Overcharger targets you with his Overcharge ability." L.Settings_Archive_Call_Lightning = "Mobs: Call Lightning" L.Settings_Archive_Call_Lightning_TT = "Alerts you when an Overcharger targets you with his Call Lightning ability." --- Alerts +-- Alerts L.Alerts_Archive_StormAtro_ImpendingStorm = "Incoming |cFF0000Impending Storm|r!" L.Alerts_Archive_StormAtro_LightningStorm = "Incoming |cfef92eLightning Storm|r! Go into the light!" L.Alerts_Archive_StoneAtro_BoulderStorm = "Incoming |cFF0000Boulder Storm|r! Block to avoid knockback!" @@ -352,7 +352,7 @@ L.Settings_HallsFab_Scalded_Debuff_TT = "Displays a small status i L.Settings_HallsFab_Overcharge_Aura = "Committee: Overcharging Aura" L.Settings_HallsFab_Overcharge_Aura_TT = "Alerts you when reclaimer start overcharging aura." L.Settings_HallsFab_Overpower_Auras = "Committee: Overpowering Auras" -L.Settings_HallsFab_Overpower_Auras_TT = "Alerts you when the tanks need to swap the committee bosses" +L.Settings_HallsFab_Overpower_Auras_TT = "Alerts you when the tanks need to swap the committee bosses" L.Settings_HallsFab_Overpower_Auras_Duration = " - Countdown Duration" L.Settings_HallsFab_Overpower_Auras_Duration_TT = "The duration of the countdown in milliseconds." L.Settings_HallsFab_Overpower_Auras_Dynamic = " - Dynamic Countdown" @@ -605,7 +605,7 @@ function RaidNotifier:MissingLocale() d("Obviously not missing any english strings....") end ---if (GetCVar('language.2') == 'de') then +--if (GetCVar('language.2') == 'de') then -- local MissingL = {} -- for k, v in pairs(RaidNotifier:GetLocale()) do -- if (not L[k]) then @@ -613,10 +613,10 @@ end -- L[k] = v -- end -- end --- function RaidNotifier:GetLocale() +-- function RaidNotifier:GetLocale() -- return L -- end --- -- for debugging +-- -- for debugging -- function RaidNotifier:MissingLocale() -- df("Missing strings for '%s'", GetCVar('language.2')) -- d(MissingL)