diff --git a/.gitignore b/.gitignore index c4c4ffc..6f66c74 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -*.zip +*.zip \ No newline at end of file diff --git a/00_startup.lua b/00_startup.lua index b011a18..420711a 100644 --- a/00_startup.lua +++ b/00_startup.lua @@ -1,52 +1,44 @@ DailyAutoShare = DailyAutoShare or {} DAS = DailyAutoShare - DAS.name = "DailyAutoShare" -DAS.version = "3.61" +DAS.version = "3.7" DAS.author = "manavortex" DAS.settings = {} DAS.globalSettings = {} - DAS.shareables = {} DAS.bingo = {} DAS.bingoFallback = {} DAS.subzones = {} DAS.activeZoneQuests = {} - DAS.questFinisher = {} DAS.questStarter = {} DAS.questIds = {} DAS.activeBingoIndices = {} DAS.prequests = {} - +DAS.subLists = {} +DAS.QuestLists = {} +DAS.festivals = {} DAS.channelTypes = { - [CHAT_CHANNEL_PARTY] = true, - [CHAT_CHANNEL_SAY ] = false, - [CHAT_CHANNEL_YELL] = false, + [CHAT_CHANNEL_PARTY] = true, + [CHAT_CHANNEL_SAY ] = false, + [CHAT_CHANNEL_YELL] = false, [CHAT_CHANNEL_ZONE] = false, [CHAT_CHANNEL_WHISPER] = true, } - DAS.locale = GetCVar("language.2") DAS.autoInviting = false DAS.guildInviteText = nil - DAS_STATUS_COMPLETE = 0 DAS_STATUS_OPEN = 1 DAS_STATUS_ACTIVE = 2 DAS_STATUS_TRACKED = 3 - local activeInCurrentZone = false DAS.fullBingoString = "" local fullBingoString = DAS.fullBingoString - UNITTAG_PLAYER = UNITTAG_PLAYER or "player" - local defaults = { - debugging = false, keepInviteUpOnDegroup = false, - DasControl = { x = 0, y = 0, @@ -111,34 +103,25 @@ local defaults = { active = true, }, }, - questShareString = "I can give a DailyAutoShare for <<1>>, type <<2>> for an instant invite", - whisperString = "whisper + for an instant invite", + whisperString = "whisper + for an instant invite", guildInviteText, listenInGuilds, whisperOnly = false, - autoAcceptInvite = false, autoAcceptInviteInterval = 5, - autoAcceptQuest = true, autoAcceptShared = true, - autoDeclineShared = false, - autoHide = false, autoMinimize = false, - minimised = false, locked = false, hidden = false, - autoShare = true, autoInvite = false, autoLeave = false, - useGlobalSettings = true, - fontScale = 0.8, tooltipRight = false, upsideDown = false, @@ -150,21 +133,24 @@ local defaults = { groupInviteDelay = 500, questShareDelay = 500, mapMarkersVisible = true, - tracked = { [684] = true, [823] = true, [181] = true, -- Cyrodiil - [849] = true, -- Vvardenfell [980] = true, -- Clockwork [1011] = true, -- Summerset [726] = true, -- Murkmire }, + trackedLists = { + newLife = false, + guilds = false, + fg = false, + mg = false, + ud = false, + } } - local function pointerUpSubzones() - local settings = DAS.GetSettings() -- Summerset settings[1012] = settings[1011] @@ -183,19 +169,16 @@ local function pointerUpSubzones() settings.tracked[1017] = settings.tracked[1011] settings.tracked[1018] = settings.tracked[1011] settings.tracked[1019] = settings.tracked[1011] - -- Gold Coast settings[825] = settings[823] settings[826] = settings[823] settings.tracked[825] = settings.tracked[823] settings.tracked[826] = settings.tracked[823] - -- Capitals settings[19] = settings[57] settings[383] = settings[57] settings.tracked[19] = settings.tracked[57] settings.tracked[383] = settings.tracked[57] - -- Clockwork City settings[981] = settings[980] settings[981] = settings[980] @@ -203,7 +186,6 @@ local function pointerUpSubzones() settings.tracked[982] = settings.tracked[980] settings.tracked[983] = settings.tracked[980] settings.tracked[983] = settings.tracked[980] - -- Morrowind settings[921] = settings[849] settings[922] = settings[849] @@ -217,7 +199,6 @@ local function pointerUpSubzones() settings.tracked[924] = settings.tracked[849] settings.tracked[925] = settings.tracked[849] settings.tracked[961] = settings.tracked[849] - -- Wrothgar settings[689] = settings[684] settings[690] = settings[684] @@ -232,82 +213,67 @@ local function pointerUpSubzones() settings.tracked[693] = settings.tracked[684] settings.tracked[694] = settings.tracked[684] end - local characterName = zo_strformat(GetUnitName(UNITTAG_PLAYER)) - local em = EVENT_MANAGER - local function debugOut(p1, p2, p3, p4, p5, p6, p7, p8) if not DAS.GetDebugMode() then return end if (not p2) then d(p1); return; end if p8 then - d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>> <<6>> <<7>> <<8>>", p1, p2, p3, p4, p5, p6, p7, p8)) + d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>> <<6>> <<7>> <<8>>", p1, p2, p3, p4, p5, p6, p7, p8)) elseif p7 then - d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>> <<6>> <<7>>", p1, p2, p3, p4, p5, p6, p7)) - elseif p6 then - d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>> <<6>>", p1, p2, p3, p4, p5, p6)) + d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>> <<6>> <<7>>", p1, p2, p3, p4, p5, p6, p7)) + elseif p6 then + d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>> <<6>>", p1, p2, p3, p4, p5, p6)) elseif p5 then - d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>>", p1, p2, p3, p4, p5)) + d(zo_strformat("<<1>> <<2>> <<3>> <<4>> <<5>>", p1, p2, p3, p4, p5)) elseif p4 then - d(zo_strformat("<<1>> <<2>> <<3>> <<4>>", p1, p2, p3, p4)) + d(zo_strformat("<<1>> <<2>> <<3>> <<4>>", p1, p2, p3, p4)) elseif p3 then - d(zo_strformat("<<1>> <<2>> <<3>>", p1, p2, p3)) + d(zo_strformat("<<1>> <<2>> <<3>>", p1, p2, p3)) else - d(zo_strformat("<<1>> <<2>>", p1, p2)) + d(zo_strformat("<<1>> <<2>>", p1, p2)) end end DAS.DebugOut = debugOut local p = debugOut - function DAS.Report(text) - if not DAS.GetShutUp() then d(text) end + if not DAS.GetShutUp() then d(text) end end - --============================== --======= Event hooks ========= --============================== - local function OnGroupTypeChanged(eventCode, unitTag) if IsUnitGrouped(UNITTAG_PLAYER) then - if not DAS.GetAutoShare() and DAS.GetResetAutoShareOnNewGroup() then + if not DAS.GetAutoShare() and DAS.GetResetAutoShareOnNewGroup() then DAS.SetAutoShare(true) end return end - if DAS.GetStopInviteOnDegroup() then DAS.SetAutoInvite(false) end - end - local function forceRefreshControl() DAS.RefreshControl(true) end - local function OnQuestAdded(eventCode, journalIndex, questName, objectiveName) - local zoneId = DAS.GetZoneId() if not DAS.GetActiveIn(zoneId) then return end - if not GetIsQuestSharable(journalIndex) then return end - + if not GetIsQuestSharable(journalIndex) then return end local shareables = DAS.shareables[zoneId] or {} local bingoIndex = DAS.GetBingoIndexFromQuestName(questName) or 0 DAS.activeBingoIndices[bingoIndex] = true - if nil ~= shareables[questName] then DAS.LogQuest(questName, false) zo_callLater(forceRefreshControl, 700) - end + end end - local questSharePending = false local questLoopInterval = 500 local function stopAcceptQuestLoop(eventCode, journalIndex) - if not questSharePending then + if not questSharePending then ShareQuest(journalIndex) return end questSharePending = nil ~= GetOfferedQuestShareIds() questLoopInterval = 500 end - local function acceptQuestLoop() if not questSharePending then return end for id, _ in pairs(GetOfferedQuestShareIds()) do @@ -316,78 +282,61 @@ local function acceptQuestLoop() questLoopInterval = questLoopInterval + questLoopInterval*0.5 zo_callLater(acceptQuestLoop, questLoopInterval) end - local function OnQuestShared(eventCode, questId) - if not (DAS.GetActiveIn()) and DAS.settings.autoAcceptShared then return end - local questName = GetOfferedQuestShareInfo(questId) p(zo_strformat("<<1>> \t <<2>>", questId, questName)) local zoneQuestIds = DAS.questIds[DAS.GetZoneId()] or {} local zoneQuests = DAS.GetZoneQuests() or {} - - if not (zoneQuestIds[questName] or DAS_QUEST_IDS[questId] or ZO_IsElementInNumericallyIndexedTable(zoneQuests, questName)) then return end - + if not (zoneQuestIds[questName] or DAS_QUEST_IDS[questId] or ZO_IsElementInNumericallyIndexedTable(zoneQuests, questName)) then return end if zoneQuestIds[questId] then AcceptSharedQuest(questId) em:RegisterForEvent(DAS.name, EVENT_QUEST_ADDED, stopAcceptQuestLoop) zo_callLater(forceRefreshControl, 500) end end - local function OnChatMessage(...) DAS.OnChatMessage(...) end - local function OnPlayerActivated(eventCode) local active = DAS.GetActiveIn() DAS.SetHidden(not active) DAS.SetAutoInvite(DAS.GetAutoInvite()) -- disables if we aren't group lead DAS.SetChatListenerStatus(DAS.autoInviting) DAS.guildInviteText = DAS.GetGuildInviteText() - DAS.cacheChatterData() + DAS.cacheChatterData() end - local function OnUnitCreated(eventCode, unitTag) local unitZone = GetZoneId(GetUnitZoneIndex(unitTag)) if not DAS.GetActiveIn(unitZone) then return end if GetUnitDisplayName(unitTag) == cachedDisplayName then return end DAS.TryShareActiveDaily(unitZone) end - -local function OnQuestToolUpdate() +local function OnQuestToolUpdate() p("OnQuestToolUpdate") - forceRefreshControl() + forceRefreshControl() end - -local function OnQuestRemoved(eventCode, isCompleted, journalIndex, questName, zoneIndex, poiIndex, questId) - +local function OnQuestRemoved(eventCode, isCompleted, journalIndex, questName, zoneIndex, poiIndex, questId) -- p("OnQuestRemoved called: <<1>> (journalIndex <<2>>, questId <<3>>)", questName, journalIndex, questId) local zoneId = DAS.GetZoneId() local zoneIds = DAS.questIds[zoneId] or {} -- is it a daily quest, and are we logging? - if not ((zoneIds[questName] or DAS_QUEST_IDS[questId]) and DAS.GetActiveIn(zoneId)) then return end - + if not ((zoneIds[questName] or DAS_QUEST_IDS[questId]) and DAS.GetActiveIn(zoneId)) then return end DAS.LogQuest(questName, isCompleted) - -- set auto invite off until the questlog has refreshed local autoInvite = DAS.GetAutoInvite() DAS.SetAutoInvite(false) - local bingoIndex = DAS.GetBingoIndexFromQuestName(questName) or 0 DAS.activeBingoIndices[bingoIndex] = false - if DAS.trackedIndex == journalIndex then + if DAS.trackedIndex == journalIndex then DAS.trackedIndex = 99 end - zo_callLater(function() DAS.SetAutoInvite(autoInvite) forceRefreshControl() DAS.RefreshLabelsWithDelay() end, 5000) end - - local alreadyRefreshing = false local function questRefresh() alreadyRefreshing = false @@ -398,88 +347,60 @@ local function queueQuestRefresh() alreadyRefreshing = true zo_callLater(questRefresh, 600) end - local function hookQuestTracker() if FOCUSED_QUEST_TRACKER and FOCUSED_QUEST_TRACKER.ForceAssist then - ZO_PreHook(FOCUSED_QUEST_TRACKER, "ForceAssist", queueQuestRefresh) + ZO_PreHook(FOCUSED_QUEST_TRACKER, "ForceAssist", queueQuestRefresh) end - end - --============================== --= DailyAutoShare_Initialize == --============================== - local function RegisterEventHooks() - - DailyAutoShare.Fragment = ZO_HUDFadeSceneFragment:New(DasControl) - + DailyAutoShare.Fragment = ZO_HUDFadeSceneFragment:New(DasControl) SCENE_MANAGER:GetScene("hud" ):AddFragment(DailyAutoShare.Fragment) SCENE_MANAGER:GetScene("hudui"):AddFragment(DailyAutoShare.Fragment) hookQuestTracker() - em:RegisterForEvent(DAS.name, EVENT_PLAYER_ACTIVATED, OnPlayerActivated) - em:RegisterForEvent(DAS.name, EVENT_QUEST_ADDED, OnQuestToolUpdate) em:RegisterForEvent(DAS.name, EVENT_QUEST_REMOVED, OnQuestRemoved) - em:RegisterForEvent(DAS.name, EVENT_TRACKING_UPDATE, OnQuestToolUpdate) - + em:RegisterForEvent(DAS.name, EVENT_TRACKING_UPDATE, OnQuestToolUpdate) em:RegisterForEvent(DAS.name, EVENT_QUEST_ADDED, OnQuestAdded) em:RegisterForEvent(DAS.name, EVENT_QUEST_REMOVED, OnQuestRemoved) em:RegisterForEvent(DAS.name, EVENT_QUEST_SHARED, OnQuestShared) - em:RegisterForEvent(DAS.name, EVENT_GROUP_TYPE_CHANGED, OnGroupTypeChanged) em:RegisterForEvent(DAS.name, EVENT_UNIT_CREATED, OnUnitCreated) em:RegisterForEvent(DAS.name, EVENT_UNIT_DESTROYED, OnGroupTypeChanged) - em:RegisterForEvent(DAS.name, EVENT_CHAT_MESSAGE_CHANNEL, OnChatMessage) -- DasControl:OnMoveStop -- DailyAutoShare.SaveControlLocation(self) end - - -- has to be a local var, lua error if not -- Keep outside of function namespace so we can overwrite it for debugging -local afterEight = tonumber(GetTimeString():sub(0, 2)) >= 08 - - -local function minimiseOnStartup() - DAS.SetMinimized(DAS.GetSettings().startupMinimized) +local afterEight = tonumber(GetTimeString():sub(0, 2)) >= 08 +local function minimiseOnStartup() + DAS.SetMinimized(DAS.GetSettings().startupMinimized) end --============================== --===== Rise, my minion! ====== --============================== - function DailyAutoShare_Initialize(eventCode, addonName) - if addonName ~= DAS.name then return end - DAS.settings = ZO_SavedVars:New( "DAS_Settings", 2, "DAS_Settings", defaults) DAS.globalSettings = ZO_SavedVars:NewAccountWide( "DAS_Globals", 2, "DAS_Globals", defaults) DAS.globalSettings.completionLog = DAS.globalSettings.completionLog or {} - DAS.pdn = GetUnitDisplayName(UNITTAG_PLAYER) - - pointerUpSubzones() RegisterEventHooks() - DAS.CreateMenu(DAS.settings, defaults) DAS.CreateGui() - -- local timetoreset = (GetTimeStamp() - 60*60*7)%86400 -- zo_callLater(resetQuests, timetoreset) - - DAS.handleLog() zo_callLater(OnPlayerActivated, 5000) zo_callLater(minimiseOnStartup, 5500) DAS.CreateMapMarkers() EVENT_MANAGER:UnregisterForEvent("DailyAutoShare", EVENT_ADD_ON_LOADED) - end - - ZO_CreateStringId("SI_BINDING_NAME_TOGGLE_DAS_GUI", GetString(DAS_SI_TOGGLE)) ZO_CreateStringId("SI_BINDING_NAME_TOGGLE_DAS_LIST", GetString(DAS_SI_MINIMISE)) -EVENT_MANAGER:RegisterForEvent("DailyAutoShare", EVENT_ADD_ON_LOADED, DailyAutoShare_Initialize) +EVENT_MANAGER:RegisterForEvent("DailyAutoShare", EVENT_ADD_ON_LOADED, DailyAutoShare_Initialize) \ No newline at end of file diff --git a/DASContextMenu.lua b/DASContextMenu.lua index 14e31dd..e67d5ce 100644 --- a/DASContextMenu.lua +++ b/DASContextMenu.lua @@ -1,45 +1,36 @@ local guiHeight = GuiRoot:GetHeight() local guiWidth = GuiRoot:GetWidth() - local questName, journalIndex, bingoString, currentControl - - local function getAnchorPos(control) local menuWidth = ZO_Menu:GetWidth() local menuHeight = ZO_Menu:GetWidth() - local controlRight = control:GetRight() local controlLeft = control:GetLeft() local controlTop = control:GetTop() - - local isTooHigh = (controlTop + menuHeight) >= guiHeight - - if DAS.GetSettings().tooltipRight then - if (controlRight + menuWidth) >= guiWidth then + local isTooHigh = (controlTop + menuHeight) >= guiHeight + if DAS.GetSettings().tooltipRight then + if (controlRight + menuWidth) >= guiWidth then if isTooHigh then return BOTTOMRIGHT, TOPLEFT end - return TOPRIGHT, TOPLEFT - end + return TOPRIGHT, TOPLEFT + end else - if (controlLeft - menuHeight) <= 0 then + if (controlLeft - menuHeight) <= 0 then if isTooHigh then return TOPLEFT, TOPRIGHT end return TOPRIGHT, TOPLEFT end end return TOPLEFT, TOPRIGHT end - local function spamChat(questNameParam, bingoStringParam) if CHAT_SYSTEM.textEntry.editControl:HasFocus() then CHAT_SYSTEM.textEntry.editControl:Clear() end local chatInputString = bingoStringParam or bingoString if DAS.GetAutoInvite() then - chatInputString = zo_strformat(DAS.GetSettings().questShareString, questNames, bingoString) + chatInputString = zo_strformat(DAS.GetSettings().questShareString, questNames, bingoString) end StartChatInput(chatInputString, CHAT_CHANNEL_ZONE) end - - local function forceAssist() if nil == FOCUSED_QUEST_TRACKER then return end FOCUSED_QUEST_TRACKER:ForceAssist(journalIndex) @@ -51,77 +42,66 @@ local function abandonQuest() AbandonQuest(journalIndex) DAS.LogQuest(questName, false) DAS.questCacheNeedsRefresh = true - DAS.RefreshLabelsWithDelay() + DAS.RefreshLabelsWithDelay() end local function toggleQuest() DAS.ToggleQuest(currentControl) DAS.RefreshLabelsWithDelay() end -local function toggleSubList() - DasSubList:SetHidden(not DasSubList:IsHidden()) +local function toggleSubList() + DasSubList:SetHidden(not DasSubList:IsHidden()) end - function DAS.OnRightClick(control, verbose) - if nil == control then return end questName = control.dataQuestName journalIndex = control.dataJournalIndex bingoString = control.dataBingoString currentControl = control - local menuShowing = IsMenuVisisble() and GetMenuOwner() == control ClearMenu() - if not menuShowing then SetMenuSpacing(3) SetMenuPad(10) SetMenuMinimumWidth(185) - if nil ~= control.dataQuestList then - AddCustomMenuItem(GetString(DAS_TOGGLE_SUBLIST), - toggleSubList, + if nil ~= control.dataQuestList then + AddCustomMenuItem(GetString(DAS_TOGGLE_SUBLIST), + toggleSubList, MENU_ADD_OPTION_LABEL ) else if control.dataQuestState ~= DAS_STATUS_COMPLETE then - AddCustomMenuItem(GetString(DAS_SI_SPAM_SINGLE), - spamChat, + AddCustomMenuItem(GetString(DAS_SI_SPAM_SINGLE), + spamChat, MENU_ADD_OPTION_LABEL ) - end + end if IsValidQuestIndex(control.dataJournalIndex) then - AddCustomMenuItem(GetString(DAS_SI_SHARE), - shareQuest, + AddCustomMenuItem(GetString(DAS_SI_SHARE), + shareQuest, MENU_ADD_OPTION_LABEL ) - AddCustomMenuItem("* Focus", + AddCustomMenuItem("* Focus", forceAssist, MENU_ADD_OPTION_LABEL - ) - AddCustomMenuItem(GetString(DAS_SI_ABANDON), + ) + AddCustomMenuItem(GetString(DAS_SI_ABANDON), abandonQuest, MENU_ADD_OPTION_LABEL - ) + ) else local key = (control.dataQuestState == DAS_STATUS_OPEN and DAS_SI_SETOPEN_TRUE) or DAS_SI_SETOPEN_FALSE - AddCustomMenuItem(GetString(key), - toggleQuest, + AddCustomMenuItem(GetString(key), + toggleQuest, MENU_ADD_OPTION_LABEL ) end - end - local myAnchor, parentAnchor = getAnchorPos(control) - ZO_Menu:ClearAnchors() ZO_Menu:SetAnchor(myAnchor, control, parentAnchor, 0, 3) ShowMenu(control) - end - - end - function DAS.InitRightclickMenu() DAS_LinkHandlerBackup_OnLinkMouseUp = ZO_LinkHandler_OnLinkMouseUp ZO_LinkHandler_OnLinkMouseUp = function(itemLink, button, control) DAS_HandleClickEvent(itemLink, button, control) end diff --git a/DASData.lua b/DASData.lua index 57254c1..2b04d68 100644 --- a/DASData.lua +++ b/DASData.lua @@ -1,98 +1,103 @@ local DAS = DailyAutoShare -local p = DAS.debug - -DAS.festivals = { - [19 ] = "newLife", - [41 ] = "newLife", - [117] = "newLife", - [104] = "newLife", - [383] = "newLife", - [382] = "newLife", - [535] = "newLife", - [381] = "newLife", -} - - -function DAS.GetZoneId() return GetZoneId(GetUnitZoneIndex(UNITTAG_PLAYER)) or 0 end -function PrintZoneId() d(GetZoneId(GetUnitZoneIndex(UNITTAG_PLAYER))) end - +local p = DAS.DebugOut +function DAS.GetZoneId() return GetZoneId(GetUnitZoneIndex(UNITTAG_PLAYER)) or 0 end +function PrintZoneId() d(GetZoneId(GetUnitZoneIndex(UNITTAG_PLAYER))) end +local typeTable = "table" +local typeString = "string" +local function evaluateNestedLists(tbl) + + if not tbl or {} == tbl then return tbl end + + local addToRet = {} + for key, value in pairs(tbl) do + -- unpack sublists with string keys, because those are festival lists or so + if type(value) == typeTable and typeString == type(key) then + if DAS.GetActiveIn(key) then + for _, questName in pairs(value) do + table.insert(addToRet, questName) + end + end + else + table.insert(addToRet, value) + end + end + + local ret = {} + + for _, questName in pairs(addToRet) do + table.insert(ret, questName) + end + return ret +end function DAS.GetZoneQuests(zoneId) + -- check if we have an ID zoneId = zoneId or DAS.GetZoneId() - zoneId = DAS.subzones[zoneId] or zoneId - return DAS.shareables[zoneId] or {} + + -- check if we're someone's subzone + zoneId = DAS.subzones[zoneId] or zoneId + return evaluateNestedLists(DAS.shareables[zoneId] or {}) + end - function DAS.questCompleted(id) local questText, questType = GetCompletedQuestInfo(id) return nil ~= questText and #questText > 0 end - function DAS.RefreshFullBingoString() local ret = "" - for _, questName in ipairs(DAS.GetActiveQuestNames()) do + for _, questName in ipairs(DAS.GetActiveQuestNamesFromGui()) do local bingoString = DAS.GetBingoStringFromQuestName(questName) ret = ret .. bingoString .. " " end - if (#ret > 0) then + if (#ret > 0) then ret = ret .. "+any" end DAS.fullBingoString = ret end - function DAS.IsQuestActive(questName) - local zoneId = DAS.GetZoneId() + local zoneId = DAS.GetZoneId() local questList = DAS.QuestLists[zoneId] or {} - for questListName, questListData in pairs(questList) do - if questListData[questName] then + for questListName, questListData in pairs(questList) do + if questListData[questName] then return (DAS.GetQuestListItem(zoneId, questListName, "active")) end end return true - end - function DAS.GetBingoIndexFromQuestName(questName) for questIndex, checkQuestName in pairs(DAS.GetZoneQuests()) do if questName == checkQuestName then - return questIndex + return questIndex end - end + end return 99 end - function DAS.GetBingoStringFromQuestName(questName) local index = DAS.GetBingoIndexFromQuestName(questName) local ret = "" local zoneId = DAS.GetZoneId() if index == 99 then return ret end - local bingoArray = DAS.bingo[zoneId] or {} for bingoString, bingoIndex in pairs(bingoArray) do if bingoIndex == index then ret = bingoString end end local bingoFallback = DAS.bingoFallback[zoneId] or {} ret = bingoFallback[ret] or ret - - if ret ~= "" then + if ret ~= "" then if not(string.find(ret, "%+")) then ret = "+" .. ret end if (string.find(ret, "%+%+")) then ret.gsub("%+%+", "%+") end end - return ret, index - end - local zoneCloneDebug = "Couldn't copy zone <<1>> to zone <<2>>, one of the IDs was nil" function DAS.zoneHasAdditionalId(zoneId2, zoneId) - if not zoneId and zoneId2 then + if not zoneId and zoneId2 then d(zo_strformat(zoneCloneDebug, zoneId, zoneId2)) - return + return end - DAS.questIds[zoneId2] = DAS.questIds[zoneId] @@ -104,19 +109,16 @@ function DAS.zoneHasAdditionalId(zoneId2, zoneId) DAS.questStarter[zoneId2] = DAS.questStarter[zoneId] DAS.questFinisher[zoneId2] = DAS.questFinisher[zoneId] end - function DAS.GetQuestNameFromIndex(bingoIndex) return DAS.GetZoneQuests()[bingoIndex] end - function DAS.GetQuestNameFromBingoString(bingoString) local bingoIndex = GetBingoIndexFromMessage(bingoString) if nil == bingoIndex then return end return DAS.GetQuestNameFromIndex(bingoIndex) end - -function DAS.GetActiveQuestNames() - DAS.activeBingoIndices = {} +function DAS.GetActiveQuestNamesFromGui() + DAS.activeBingoIndices = {} local ret = {} local questLabel for i=1, #DAS.labels do @@ -128,8 +130,7 @@ function DAS.GetActiveQuestNames() end return ret end - -function DAS.GetOpenQuestNames() +function DAS.GetOpenQuestNamesFromGui() local ret = {} local questLabel for i=1, #DAS.labels do @@ -139,5 +140,4 @@ function DAS.GetOpenQuestNames() end end return ret -end - +end \ No newline at end of file diff --git a/DASHelper.lua b/DASHelper.lua index b41ec10..5ace77d 100644 --- a/DASHelper.lua +++ b/DASHelper.lua @@ -1,5 +1,4 @@ local DAS = DailyAutoShare - function DAS.GetArrayEntry(array, key) if nil == array or nil == key then return end if nil ~= array[key] then return array[key] end @@ -12,25 +11,21 @@ function DAS.SetChatListenerStatus(status) DAS.channelTypes[CHAT_CHANNEL_YELL] = status DAS.channelTypes[CHAT_CHANNEL_ZONE] = status and not DAS.GetWhisperOnly() end - --- DAS_STATUS_COMPLETE = 0, --- DAS_STATUS_OPEN = 1, --- DAS_STATUS_ACTIVE = 2, +-- DAS_STATUS_COMPLETE = 0, +-- DAS_STATUS_OPEN = 1, +-- DAS_STATUS_ACTIVE = 2, -- DAS_STATUS_TRACKED = 3 local refreshedRecently = false function refreshQuestLogs(forceOverride) - - forceOverride = forceOverride or DAS.questCacheNeedsRefresh or DAS.QuestIndexTable == {} or DAS.QuestNameTable == {} + forceOverride = forceOverride or DAS.questCacheNeedsRefresh or DAS.QuestIndexTable == {} or DAS.QuestNameTable == {} if forceOverride then refreshedRecently = false end if refreshedRecently then return end - DAS.questCacheNeedsRefresh = false - DAS.QuestIndexTable = {} DAS.QuestNameTable = {} for i=1, 25 do if IsValidQuestIndex(i) then - journalQuestName, _, _, _, _, _, tracked = GetJournalQuestInfo(i) + journalQuestName, _, _, _, _, _, tracked = GetJournalQuestInfo(i) journalQuestName = zo_strformat(journalQuestName) DAS.QuestIndexTable[i] = journalQuestName DAS.QuestNameTable[journalQuestName] = i @@ -38,10 +33,8 @@ function refreshQuestLogs(forceOverride) end DAS.RefreshFullBingoString() zo_callLater(function() refreshedRecently = false end, 5000) - end DAS.RefreshQuestLogs = refreshQuestLogs - function DAS.TryDisableAutoShare(fromName, messageText) if type(messageText) ~= "string" then return false end if (DAS.IsMatch(messageText, GetUnitName(UNITTAG_PLAYER)) @@ -51,7 +44,6 @@ function DAS.TryDisableAutoShare(fromName, messageText) DAS.SetAutoShare(false) end end - local typeTable = "table" local function hookupKeyValuePair(zoneId, key, value, best) if type(key) == typeTable then @@ -66,33 +58,29 @@ local function hookupKeyValuePair(zoneId, key, value, best) else DAS.bingo[zoneId][value] = key if not best then return end - DAS.bingoFallback[zoneId][value] = best + DAS.bingoFallback[zoneId][value] = best end end - - -function DAS.makeBingoTable(zoneId, tbl) - DAS.bingo[zoneId] = {} +function DAS.makeBingoTable(zoneId, tbl) + DAS.bingo[zoneId] = {} DAS.bingoFallback[zoneId] = {} for key, value in pairs(tbl) do hookupKeyValuePair(zoneId, key, value) end return DAS.bingo[zoneId] end - local alreadySharing = false local questQueue = {} local function shareQuestQueue() - if #questQueue == 0 then + if #questQueue == 0 then alreadySharing = false - return + return end alreadySharing = true local questIndex = table.remove(questQueue, 1) ShareQuest(questIndex) zo_callLater(shareQuestQueue, DAS.GetQuestShareDelay()) end - function DAS.TryShareActiveDaily() if not DAS.GetAutoShare() then return end for _, journalIndex in pairs(DAS.activeZoneQuests) do @@ -100,7 +88,7 @@ function DAS.TryShareActiveDaily() table.insert(questQueue, journalIndex) end end - if not alreadySharing then + if not alreadySharing then shareQuestQueue() end -- local zoneQuests = DAS.GetZoneQuests(zoneId) @@ -113,16 +101,14 @@ function DAS.TryShareActiveDaily() -- end -- end -- for _, questIndex in ipairs(activeQuestIndices) do - -- if IsValidQuestIndex(questIndex) and not table.contains(questQueue, questIndex) then + -- if IsValidQuestIndex(questIndex) and not table.contains(questQueue, questIndex) then -- table.insert(questQueue, questIndex) -- end -- end - -- if not alreadySharing then + -- if not alreadySharing then -- shareQuestQueue() -- end end - - local function EscapeString(text) if nil == text then return "" end -- escape brackets @@ -136,51 +122,35 @@ local function EscapeString(text) text = text:gsub("-", "") return text or "" end - function DAS.IsMatch(param1, param2) - string1 = EscapeString(tostring(param1):lower()) string2 = EscapeString(tostring(param2):lower()) - if #string1 == 0 or #string2 == 0 then return false end - return string.match(string1, string2) or string.match(string2, string2) or string1 == string2 - - end - function DAS.FindInList(array, item) if nil == item then return false end for _,v in pairs(array) do if v == item then return true end if tostring(v):match(tostring(item)) then return true end - end return false end - function DAS.TryTriggerAutoAcceptInvite() if DAS.GetAutoAcceptInviteInterval() > 0 then DAS.SetAutoAcceptInvite(true) zo_callLater(DAS.SetAutoAcceptInvite, DAS.GetAutoAcceptInviteInterval()*1000) end end - function DAS.OpenDailyPresent() - local numCompleted = NonContiguousCount(DAS.GetShareableLog()) local numOpen = NonContiguousCount(DAS.GetZoneQuests()) - if (numCompleted < numOpen) then return true end - for entry, data in pairs(DAS.GetShareableLog()) do if not data["completed"] then return true end end - return false end - function DAS.HasActiveDaily() - return #DAS.GetActiveQuestNames() > 0 -end - + return #DAS.GetActiveQuestNamesFromGui() > 0 +end \ No newline at end of file diff --git a/DASMenu.lua b/DASMenu.lua index faab815..ceca885 100644 --- a/DASMenu.lua +++ b/DASMenu.lua @@ -1,12 +1,8 @@ local DAS = DailyAutoShare - local optionsData local questShareDefault - local GetSettings = DAS.GetSettings - function DAS.CreateMenu(savedVars, defaults) - questShareDefault = defaults.questShareString local LAM = LibStub:GetLibrary("LibAddonMenu-2.0") local panelData = { @@ -17,17 +13,14 @@ function DAS.CreateMenu(savedVars, defaults) version = DAS.version, slashCommand = "/das_menu", } - LAM:RegisterAddonPanel("DailyAutoShare_OptionsPanel", panelData) - optionsData = { -- optionsData { -- Use global configuration? type = "checkbox", - name = "Turn on debugging?", + name = "Turn on debugging?", getFunc = function() return DAS.GetDebugMode() end, setFunc = function(value) DAS.SetDebugMode(value) end - }, - + }, { -- header: Use global variables? type = "header", name = "Use global variables?" @@ -39,7 +32,7 @@ function DAS.CreateMenu(savedVars, defaults) width = "half", getFunc = function() return DAS.GetUseGlobalSettings() end, setFunc = function(value) DAS.SetUseGlobalSettings(value) end - }, + }, { -- checkbox: Hide UI window type = "checkbox", name = "Hide UI window", @@ -47,29 +40,28 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetHidden() end, setFunc = function(value) DAS.SetHidden(value) end }, - { -- header: be elaborate? type = "header", name = "Throttle" - }, + }, { -- slider: group invite delay type = "slider", name = "Group invite delay (in ms)", tooltip = ("adjust this if you encounter disconnects when trying to create a group.\n" .."1000 ms are one second.") , min = 250, - step = 10, + step = 10, max = 2500, getFunc = function() return DAS.GetGroupInviteDelay() end, setFunc = function(value) DAS.SetGroupInviteDelay(value) end - }, + }, { -- slider: group invite delay type = "slider", name = "Quest share delay (in ms)", tooltip = ("adjust this if you encounter disconnects when new group members join.\n" .."1000 ms are one second.") , min = 250, - step = 10, + step = 10, max = 2500, getFunc = function() return DAS.GetQuestShareDelay() end, setFunc = function(value) DAS.SetQuestShareDelay(value) end @@ -79,17 +71,13 @@ function DAS.CreateMenu(savedVars, defaults) title = "Activate auto quest stuff in...", text = GetString(DAS_MENU_ACTIV_EXPLAIN), }, - { -- header: activate add-on in... type = "submenu", name = "Activate", controls = { - - - { -- submenu: Murkmire type = "submenu", - name = "Murkmire", + name = "Murkmire", controls = { { -- header: Boss dailies type = "header", @@ -141,7 +129,7 @@ function DAS.CreateMenu(savedVars, defaults) { -- checkbox: Root Whisper type = "checkbox", name = "Hide?", - tooltip = "Don't show Root Whisper dailies on UI list", + tooltip = "Don't show Root Whisper dailies on UI list", getFunc = function() return DAS.GetQuestListItem(726, "root", "invisible") end, setFunc = function(value) DAS.SetQuestListItem(726, "root", "invisible", value) end }, @@ -154,7 +142,6 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetActiveIn(726) end, setFunc = function(value) DAS.SetActiveIn(726, value) end }, - { type = "header", title = "Summerset", @@ -166,10 +153,9 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetActiveIn(1011) end, setFunc = function(value) DAS.SetActiveIn(1011, value) end }, - { -- submenu: Clockwork City type = "submenu", - name = "Clockwork City", + name = "Clockwork City", controls = { { -- header: CC Worldbosses type = "header", @@ -222,7 +208,6 @@ function DAS.CreateMenu(savedVars, defaults) type = "checkbox", name = "Hide?", tooltip = "Don't show Clockwork City delve dailies on UI list", - getFunc = function() return DAS.GetQuestListItem(980, "delve", "invisible") end, setFunc = function(value) DAS.SetQuestListItem(980, "delve", "invisible", value) end }, @@ -251,17 +236,15 @@ function DAS.CreateMenu(savedVars, defaults) tooltip = "activate", name = "Activate in Clockwork City?", getFunc = function() return DAS.GetActiveIn(980) end, - setFunc = function(value) - DAS.SetActiveIn(980, value) - DAS.SetActiveIn(981, value) - DAS.SetActiveIn(983, value) + setFunc = function(value) + DAS.SetActiveIn(980, value) + DAS.SetActiveIn(981, value) + DAS.SetActiveIn(983, value) end }, - - { -- submenu: Morrowind type = "submenu", - name = "Vvardenfell", + name = "Vvardenfell", controls = { { -- header: Ashlander: Relics type = "header", @@ -313,7 +296,7 @@ function DAS.CreateMenu(savedVars, defaults) { -- checkbox: Vivec: Delves type = "checkbox", name = "Hide?", - tooltip = "Don't show Hall of Justice delve dailies on UI list", + tooltip = "Don't show Hall of Justice delve dailies on UI list", getFunc = function() return DAS.GetQuestListItem(849, "delve", "invisible") end, setFunc = function(value) DAS.SetQuestListItem(849, "delve", "invisible", value) end }, @@ -344,7 +327,6 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetActiveIn(849) end, setFunc = function(value) DAS.SetActiveIn(849, value) end }, - { -- checkbox: Wrothgar type = "checkbox", tooltip = "Wrothgar?", @@ -374,35 +356,31 @@ function DAS.CreateMenu(savedVars, defaults) type = "checkbox", tooltip = "Fighters/Mages Guild and Undaunted dailies? This is work in progress.", name = "Guild quests?", - getFunc = function() return DAS.GetActiveIn(57) end, - setFunc = function(value) - DAS.SetActiveIn(57, value) - end + getFunc = function() return DAS.GetActiveIn("guilds") end, + setFunc = function(value) DAS.SetActiveFor("guilds", value) end }, { -- checkbox: Fighters' Guild type = "checkbox", tooltip = "Enable Fighters' Guild dailies", name = "Fighters' Guild", - getFunc = function() return DAS.GetQuestListItem(57, "fg", "active") end, - setFunc = function(value) DAS.SetQuestListItem(57, "fg", "active", value) end + getFunc = function() return DAS.GetActiveIn("fg") end, + setFunc = function(value) DAS.SetActiveFor("fg", value) end }, { -- checkbox: Mages' Guild type = "checkbox", tooltip = "Enable Mages' Guild dailies", name = "Mages Guild", - getFunc = function() return DAS.GetQuestListItem(57, "mg", "active") end, - setFunc = function(value) DAS.SetQuestListItem(57, "mg", "active", value) end + getFunc = function() return DAS.GetActiveIn("mg") end, + setFunc = function(value) DAS.SetActiveFor("mg", value) end }, { -- checkbox: Fighters' Guild type = "checkbox", tooltip = "Enable Undaunted dailies", name = "Undaunted", - getFunc = function() return DAS.GetQuestListItem(57, "ud", "active") end, - setFunc = function(value) DAS.SetQuestListItem(57, "ud", "active", value) end + getFunc = function() return DAS.GetActiveIn("ud") end, + setFunc = function(value) DAS.SetActiveFor("ud", value) end }, }, - - }, { -- checkbox: Cyro type = "checkbox", @@ -410,22 +388,19 @@ function DAS.CreateMenu(savedVars, defaults) name = "Cyrodiil", getFunc = function() return DAS.GetActiveIn(181) end, setFunc = function(value) - DAS.SetActiveIn(181, value) + DAS.SetActiveIn(181, value) end }, - { type = "submenu", - name = "Festivals", - controls = { + name = "Festivals", + controls = { { -- checkbox: relic type = "checkbox", name = "New Life", tooltip = "Enable New Life festival", getFunc = function() return DAS.GetActiveIn(101) end, - setFunc = function(value) - DAS.SetActiveFor("newLife", value) - end + setFunc = function(value) DAS.SetActiveFor("newLife", value) end }, }, }, @@ -438,51 +413,47 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetWhisperOnly() end, setFunc = function(value) GetSettings().whisperOnly = value end }, - { -- header: Use global variables? type = "header", name = "User UI settings" }, - { -- submenu: User UI settings type = "submenu", name = "Look and feel and behavior", - controls = { - + controls = { { -- checkbox: Lock UI window type = "checkbox", name = "Show Map markers?", getFunc = function() return DAS.GetMarkerVisibility() end, setFunc = function(value) DAS.SetMarkerVisibility(value) end }, - { -- editbox: Quest share text - type = "editbox", - isExtraWide = true, + type = "editbox", + isExtraWide = true, name = "Quest share text", - tooltip = ("Text to generate when you spam quest shares.\n" + tooltip = ("Text to generate when you spam quest shares.\n" .. "<<1>> will be replaced with the quest names, <<2>> with the bingo codes.\n" .. "Omit either to remove parameter. Include neither and sound like a fool."), getFunc = function() return DAS.GetSettings().questShareString end, setFunc = function(value) DAS.GetSettings().questShareString = value end, }, { -- editbox: Quest share text - type = "editbox", - isExtraWide = true, + type = "editbox", + isExtraWide = true, name = "Whisper only text", disabled = not DAS.GetWhisperOnly(), - tooltip = "Will replace everything after <<1>>, in the string above", + tooltip = "Will replace everything after <<1>>, in the string above", getFunc = function() return DAS.GetSettings().whisperString end, setFunc = function(value) DAS.GetSettings().whisperString = value end, - }, + }, { -- editbox: Quest share text - type = "button", + type = "button", name = "Reset", tooltip = "Reset quest share text to default value", getFunc = function() return questShareDefault end, setFunc = function(value) DAS.GetSettings().questShareString = questShareDefault end, reference = "qsButton", - }, + }, { -- checkbox: Lock UI window type = "checkbox", name = "Lock UI window", @@ -536,12 +507,11 @@ function DAS.CreateMenu(savedVars, defaults) name = "Font size", tooltip = "adjust font size", min = 50, - step = 5, + step = 5, max = 250, getFunc = function() return DAS.GetFontSize()*100 end, setFunc = function(value) DAS.SetFontSize(value/100) end }, - }, }, -- submenu UI settings end { -- behavior if hidden @@ -555,7 +525,7 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetHiddenInInactiveZones() end, setFunc = function(value) DAS.SetHiddenInInactiveZones(value) end }, - } + } }, { -- submenu: Guild settings type = "submenu", @@ -583,10 +553,8 @@ function DAS.CreateMenu(savedVars, defaults) getFunc = function() return DAS.GetListenInGuilds() end, setFunc = function(value) DAS.SetListenInGuilds(value) end }, - }, }, -- submenu UI settings end - { -- header: automatically type = "header", name = "automatically..." @@ -628,8 +596,8 @@ function DAS.CreateMenu(savedVars, defaults) }, { -- auto-accept interval type = "slider", - tooltip = ("After you've been looking for quest share, " - .. "how long do you want to automatically accept group-invites?\n" + tooltip = ("After you've been looking for quest share, " + .. "how long do you want to automatically accept group-invites?\n" .. "Set to 0 to disable"), name = "Accept auto-invite after +bingo in zone for ... seconds", min = 0, @@ -638,7 +606,5 @@ function DAS.CreateMenu(savedVars, defaults) setFunc = function(value) DAS.SetAutoAcceptInviteInterval(value) end }, } -- optionsData end - LAM:RegisterOptionControls("DailyAutoShare_OptionsPanel", optionsData) - -end +end \ No newline at end of file diff --git a/DASUserSettingsAdapter.lua b/DASUserSettingsAdapter.lua index 1a8e4eb..0e86599 100644 --- a/DASUserSettingsAdapter.lua +++ b/DASUserSettingsAdapter.lua @@ -1,6 +1,7 @@ local DAS = DailyAutoShare local groupTagPlayer = UNITTAG_PLAYER - +local p = DAS.DebugOut +local typeString = "string" -- called from settings function DAS.GetUseGlobalSettings() return DAS.settings.useGlobalSettings @@ -8,7 +9,6 @@ end function DAS.SetUseGlobalSettings(value) DAS.settings.useGlobalSettings = value end - -- called internally a lot local function GetSettings() if DAS.GetUseGlobalSettings() then @@ -18,7 +18,6 @@ local function GetSettings() end end DAS.GetSettings = GetSettings - local function CanInvite(unitTag, unitName) if (nil == unitTag) and (nil == unitName) then return ((not IsUnitGrouped(groupTagPlayer) or (IsUnitGroupLeader(groupTagPlayer) and GetGroupSize() < GROUP_SIZE_MAX))) @@ -29,14 +28,12 @@ local function CanInvite(unitTag, unitName) end return true end - function DAS.GetDebugMode() return GetSettings().debugging end function DAS.SetDebugMode(value) GetSettings().debugging = value end - -- called from settings: GUI function DAS.GetShutUp() return GetSettings().shutUp @@ -44,7 +41,6 @@ end function DAS.SetShutUp(value) GetSettings().shutUp = value end - function DAS.GetLocked() return GetSettings().locked end @@ -52,7 +48,6 @@ function DAS.SetLocked(value) GetSettings().locked = value DAS.RefreshGui() end - function DAS.GetHidden() return GetSettings().hidden end @@ -61,11 +56,11 @@ function DAS.SetHidden(hidden) DasControl:SetHidden(hidden) if hidden then SCENE_MANAGER:GetScene("hud" ):RemoveFragment(DAS.Fragment) - SCENE_MANAGER:GetScene("hudui"):RemoveFragment(DAS.Fragment) + SCENE_MANAGER:GetScene("hudui"):RemoveFragment(DAS.Fragment) else SCENE_MANAGER:GetScene("hud" ):AddFragment(DAS.Fragment) - SCENE_MANAGER:GetScene("hudui"):AddFragment(DAS.Fragment) - end + SCENE_MANAGER:GetScene("hudui"):AddFragment(DAS.Fragment) + end if not hidden then DAS.RefreshControl(true) end end function DAS.GetQuestShareDelay() @@ -80,7 +75,6 @@ end function DAS.SetGroupInviteDelay(value) GetSettings().groupInviteDelay = value end - function DAS.GetAutoAcceptInvite() return DAS.settings.autoAcceptInvite end @@ -88,22 +82,19 @@ function DAS.SetAutoAcceptInvite(value) DAS.settings.autoAcceptInvite = value if value then EVENT_MANAGER:RegisterForEvent("DailyAutoshare", EVENT_GROUP_INVITE_RECEIVED, AcceptGroupInvite) - else + else EVENT_MANAGER:UnregisterForEvent("DailyAutoshare", EVENT_GROUP_INVITE_RECEIVED, AcceptGroupInvite) end end - function DAS.GetWhisperOnly() - return GetSettings().whisperOnly + return GetSettings().whisperOnly end - function DAS.GetMinimized() return DAS.settings.minimised end function DAS.SetMinimized(value) DAS.settings.minimised = value end - function DAS.GetAutoAcceptShared() return DAS.settings.autoAcceptShared end @@ -111,7 +102,6 @@ function DAS.SetAutoAcceptShared(value) DAS.settings.autoAcceptShared = value DAS.SetButtonStates() end - function DAS.GetStopInviteOnDegroup() return GetSettings().keepInviteUpOnDegroup end @@ -124,55 +114,47 @@ end function DAS.SetAutoAcceptInviteInterval(value) GetSettings().autoAcceptInviteInterval = value end - function DAS.GetAutoInvite() return GetSettings().autoInvite end function DAS.SetAutoInvite(value) - value = value and IsUnitSoloOrGroupLeader(UNITTAG_PLAYER) and DAS.HasActiveDaily() - GetSettings().autoInvite = value DAS.autoInviting = value DAS.SetButtonStates() DAS.SetChatListenerStatus(value) end - -- called from settings and from internal helper function DAS.GetActiveIn(zoneIndex) zoneIndex = zoneIndex or DAS.GetZoneId() if not zoneIndex then return end zoneIndex = DAS.subzones[zoneIndex] or zoneIndex + if type(zoneIndex) == typeString then + return GetSettings().trackedLists[zoneIndex] + end return GetSettings().tracked[zoneIndex] end -function DAS.SetActiveIn(zoneIndex, value) +DAS.IsActiveIn = DAS.GetActiveIn -- have alias because I keep fucking this up +function DAS.SetActiveIn(zoneIndex, value) zoneIndex = zoneIndex or DAS.GetZoneId() if not zoneIndex then return end - GetSettings()["tracked"][zoneIndex] = value + GetSettings().tracked[zoneIndex] = value zo_callLater(function() DailyAutoShare.RefreshGui(not DAS.GetActiveIn()) end, 200) end -local nestedLists = { - ["newLife"] = { - 19 , - 41 , - 117, - 104, - 383, - 382, - 535, - 381, - 381, - } -} +local typeTable = "table" function DAS.SetActiveFor(listName, value) - local activityValue = (value and listName) or false - if nil ~= nestedLists[listName] then - for index, zoneId in pairs(nestedLists[listName]) do - DAS.SetActiveIn(zoneId, activityValue) - end + if not listName then return end + for index, zoneId in pairs(DAS.subLists[listName]) do + if type(zoneId) == typeTable then + for _, id in pairs(zoneId) do + DAS.SetActiveIn(id, value) + end + else + DAS.SetActiveIn(zoneId, value) + end end - + GetSettings().trackedLists[listName] = value end function DAS.GetAutoShare() @@ -181,21 +163,18 @@ end function DAS.SetAutoShare(value) DAS.settings.autoShare = value end - function DAS.GetAutoLeave() return GetSettings().autoLeave end function DAS.SetAutoLeave(value) GetSettings().autoLeave = value end - function DAS.GetResetAutoShareOnNewGroup() return GetSettings().resetAutoShareOnNewGroup end function DAS.SetResetAutoShareOnNewGroup(value) GetSettings().resetAutoShareOnNewGroup = value end - function DAS.GetUpsideDown() return GetSettings().upsideDown end @@ -203,7 +182,6 @@ function DAS.SetUpsideDown(value) GetSettings().upsideDown = value DAS.AnchorList() end - function DAS.GetAutoHide() return GetSettings().autoHide end @@ -211,7 +189,6 @@ function DAS.SetAutoHide(value) GetSettings().autoHide = value DAS.RefreshGui() end - function DAS.GetAutoMinimize() return GetSettings().autoMinimize end @@ -219,27 +196,21 @@ function DAS.SetAutoMinimize(value) GetSettings().autoMinimize = value DAS.RefreshGui() end - function DAS.GetHiddenInInactiveZones() return GetSettings().inactiveZones.hide end - function DAS.SetHiddenInInactiveZones(value) GetSettings().inactiveZones.hide = value - DasControl:SetHidden(value and DAS.GetActiveIn()) + DasControl:SetHidden(value and DAS.GetActiveIn()) end - - function DAS.GetFontSize() return GetSettings().fontScale or 1.0 end - function DAS.SetFontSize(value) GetSettings().fontScale = value - DAS.SetLabelFontSize() + DAS.SetLabelFontSize() DAS.RefreshLabelsWithDelay() end - -- called from GUI function DAS.GetX(controlname) controlname = controlname or "DasControl" @@ -257,7 +228,6 @@ function DAS.SetY(controlname, value) controlname = controlname or "DasControl" GetSettings()[controlname]["y"] = value end - function DAS.GetGuildInviteNumber() return (tonumber(GetSettings().guildInviteNumber) or 0) end @@ -265,7 +235,6 @@ function DAS.SetGuildInviteNumber(value) GetSettings().guildInviteNumber = value DAS.channelTypes[value+11] = true end - function DAS.GetListenInGuilds() return GetSettings().listenInGuilds end @@ -277,7 +246,6 @@ function DAS.SetListenInGuilds(value) DAS.channelTypes[CHAT_CHANNEL_GUILD_4] = value DAS.channelTypes[CHAT_CHANNEL_GUILD_5] = value end - function DAS.GetGuildInviteText() local ret = GetSettings().guildInviteText or "" if #ret == 0 then return end @@ -287,47 +255,36 @@ function DAS.SetGuildInviteText(value) GetSettings().guildInviteText = value DAS.guildInviteText = value end - function DAS.SaveControlLocation(control) local controlName = control:GetName() DAS.SetX(controlName, control:GetLeft()) DAS.SetY(controlName, control:GetTop()) end - function DAS.LoadControlLocation(control) - local controlName = control:GetName() local x = DAS.GetX(controlName) or 0 local y = DAS.GetY(controlName) or 0 - control:ClearAnchors() control:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, x, y) - DAS.GetSettings().tooltipRight = DAS.GetSettings().tooltipRight or x < 200 - end - function DAS.GetHideCompleted() return GetSettings().hideCompleted end function DAS.SetHideCompleted(value) GetSettings().hideCompleted = value end - function DAS.GetUserMinimised() return GetSettings().userMinimised end function DAS.SetUserMinimised(value) GetSettings().userMinimised = value end - local characterName = GetUnitName(UNITTAG_PLAYER) local dateNumber = tonumber(GetDate()) local timeStringNumber = tonumber(GetTimeString():sub(1,2)) - DAS.todaysCharacterLog = nil - function DAS.GetQuestListItem(zoneId, listName, listKey) if nil == zoneId or nil == listName or nil == listKey then return false end if nil == DAS.settings[zoneId] or nil == DAS.settings[zoneId][listName] then return false end @@ -340,12 +297,9 @@ function DAS.SetQuestListItem(zoneId, listName, listKey, value) DAS.settings[zoneId][listName][listKey] = value zo_callLater(function() DAS.RefreshControl() end, 500) end - - function DAS.GetMarkerVisibility() return GetSettings().mapMarkersVisible end function DAS.SetMarkerVisibility(value) GetSettings().mapMarkersVisible = value -end - +end \ No newline at end of file diff --git a/DAS_xml.xml b/DAS_xml.xml index 05e745d..82fe19b 100644 --- a/DAS_xml.xml +++ b/DAS_xml.xml @@ -1,26 +1,20 @@ <GuiXml> - <Controls> - + <Controls> <TopLevelControl name="DasControl" movable="true" mouseEnabled="true"> <Dimensions x="330" minY="45" y="45" /> <Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT" /> <OnMoveStop>DailyAutoShare.SaveControlLocation(self)</OnMoveStop> <Controls> - - <Control name="DasHandle" clampedToScreen="true"> <Anchor point="TOPLEFT" relativeTo="DasControl" relativePoint="TOPLEFT"/> - <Anchor point="BOTTOMRIGHT" relativeTo="DasControl" relativePoint="TOPRIGHT" offsetY="45"/> - - - <Controls> + <Anchor point="BOTTOMRIGHT" relativeTo="DasControl" relativePoint="TOPRIGHT" offsetY="45"/> + <Controls> <Backdrop name="$(parent)_BG" edgeColor="000000" centerColor="969696" alpha="0.5" drawLayer="0"> <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/> - <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT"/> - </Backdrop> - - <Button name="DasButtonLock" > - <Dimensions x="16" y="16" /> + <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT"/> + </Backdrop> + <Button name="DasButtonLock" > + <Dimensions x="16" y="16" /> <Anchor point="TOPLEFT" relativeTo="DasHandle" relativePoint="TOPLEFT" offsetX="15" offsetY="15"/> <OnMouseUp> DailyAutoShare.SetLocked(not DailyAutoShare.GetLocked()) </OnMouseUp> <Textures @@ -29,55 +23,49 @@ mouseOver ="esoui/art/miscellaneous/locked_over.dds" /> </Button> - <Button name="DasButtonHide" > + <Button name="DasButtonHide" > <Dimensions x="15" y="15" /> <Anchor point="LEFT" relativeTo="DasButtonLock" relativePoint="RIGHT" offsetX="10" offsetY="1"/> - <Textures normal ="/esoui/art/buttons/decline_up.dds" pressed ="/esoui/art/buttons/decline_down.dds" mouseOver ="/esoui/art/buttons/decline_over.dds" - /> + /> <OnMouseUp> DasControl:SetHidden(true) </OnMouseUp> </Button> - - <Button name="DasButtonMinmax" > - <Dimensions x="16" y="16" /> + <Button name="DasButtonMinmax" > + <Dimensions x="16" y="16" /> <Anchor point="TOPRIGHT" relativeTo="DasHandle" relativePoint="TOPRIGHT" offsetX="-20" offsetY="15"/> - <Textures + <Textures normal ="/esoui/art/buttons/minus_up.dds" pressed ="/esoui/art/buttons/minus_down.dds" mouseOver ="/esoui/art/buttons/minus_over.dds" /> - <OnMouseUp>DailyAutoShare.MinMaxButton()</OnMouseUp> + <OnMouseUp>DailyAutoShare.MinMaxButton()</OnMouseUp> </Button> - - <Button name="DasButtonRefresh"> + <Button name="DasButtonRefresh"> <Anchor point="RIGHT" relativeTo="DasHandle" relativePoint="RIGHT" offsetX="-40" offsetY="1"/> - <Dimensions x="30" y="30" /> - <Textures + <Dimensions x="30" y="30" /> + <Textures normal ="/esoui/art/help/help_tabicon_feedback_up.dds" pressed ="/esoui/art/help/help_tabicon_feedback_down.dds " mouseOver ="/esoui/art/help/help_tabicon_feedback_over.dds" /> <OnMouseEnter> DailyAutoShare.CreateControlTooltip(self) </OnMouseEnter> - <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> + <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> <OnMouseUp> DailyAutoShare.RefreshLabels(true, true) </OnMouseUp> </Button> - - <Label name="$(parent)_Label" font="ZoFontWinH2" color="ffffff" text="DailyAutoShare" + <Label name="$(parent)_Label" font="ZoFontWinH2" color="ffffff" text="DailyAutoShare" verticalAlignment="CENTER" horizontalAlignment="LEFT" alpha="0.85"> <Dimensions x="350" y="50" /> <Anchor point="TOPLEFT" relativeTo="DasHandle" relativePoint="TOPLEFT" offsetX="80" offsetY="-2"/> </Label> - </Controls> - </Control> + </Control> <Tooltip name="DailyAutoShare_Tooltip" inherits="ZO_BaseTooltip" tier="1"> <Anchor point="TOPLEFT" relativeTo="DasList" relativePoint="TOPLEFT" offsetX="0" offsetY="-50"/> </Tooltip> - - <Control name="DasList" resizeToFitDescendents="true" > + <Control name="DasList" resizeToFitDescendents="true" > <Dimensions x="330" /> <Anchor point="TOPLEFT" relativeTo="DasHandle" relativePoint="BOTTOMLEFT" offsetX="0" offsetY="0" /> <Controls> @@ -86,132 +74,109 @@ <Anchor point="TOPLEFT" relativeTo="DasList_Backdrop" relativePoint="TOPLEFT" offsetX="20" offsetY="15"/> <Anchor point="BOTTOMRIGHT" relativeTo="DasList_Backdrop" relativePoint="TOPLEFT" offsetX="310" offsetY="30" /> <Controls> - <Button name="DasButtonInvite"> - <Dimensions x="20" y="20" /> + <Button name="DasButtonInvite"> + <Dimensions x="20" y="20" /> <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" /> <Textures normal="/DailyAutoShare/textures/invite_up.dds" pressed="/DailyAutoShare/textures/invite_down.dds" mouseOver="/DailyAutoShare/textures/invite_down.dds" - /> - + /> <OnMouseEnter> DailyAutoShare.CreateControlTooltip(self) </OnMouseEnter> - <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> + <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> <OnMouseUp> DailyAutoShare.SettingsButton(self, button) </OnMouseUp> - </Button> - - <Button name="DasButtonAccept" > + <Button name="DasButtonAccept" > <Dimensions x="20" y="20" /> <Anchor point="TOPLEFT" relativeTo="DasButtonInvite" relativePoint="TOPRIGHT" offsetX="10" /> - <Textures normal="DailyAutoShare/textures/accept_up.dds" pressed="DailyAutoShare/textures/accept_down.dds" mouseOver="DailyAutoShare/textures/accept_down.dds" - /> + /> <OnMouseEnter> DailyAutoShare.CreateControlTooltip(self) </OnMouseEnter> - <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> + <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> <OnMouseUp> DailyAutoShare.SettingsButton(self, button) </OnMouseUp> </Button> - - <Button name="DasButtonShare" > - <Dimensions x="20" y="20" /> + <Button name="DasButtonShare" > + <Dimensions x="20" y="20" /> <Anchor point="TOPLEFT" relativeTo="DasButtonAccept" relativePoint="TOPRIGHT" offsetX="10" /> - <Textures normal="DailyAutoShare/textures/share_up.dds" pressed="DailyAutoShare/textures/share_down.dds" mouseOver="DailyAutoShare/textures/share_down.dds" - /> + /> <OnMouseEnter> DailyAutoShare.CreateControlTooltip(self) </OnMouseEnter> - <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> + <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> <OnMouseUp> DailyAutoShare.SettingsButton(self, button) </OnMouseUp> - </Button> - - <Button name="DasButtonSpam"> + <Button name="DasButtonSpam"> <Anchor point="TOPLEFT" relativeTo="DasButtonShare" relativePoint="TOPRIGHT" offsetX="50" /> - <Dimensions x="20" y="20" /> + <Dimensions x="20" y="20" /> <Textures normal="DailyAutoShare/textures/speaker_up.dds" pressed="DailyAutoShare/textures/speaker_down.dds" mouseOver="DailyAutoShare/textures/speaker_down.dds" - /> + /> <OnMouseEnter> DailyAutoShare.CreateControlTooltip(self) </OnMouseEnter> - <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> + <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> <OnMouseUp> DailyAutoShare.SettingsButton(self, button) </OnMouseUp> </Button> - - - <Button name="DasButtonDonate" alpha="0.6"> + <Button name="DasButtonDonate" alpha="0.6"> <Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetY="-4" /> <Dimensions x="30" y="30" /> <Textures normal="esoui/art/chatwindow/chat_mail_up.dds" pressed="esoui/art/chatwindow/chat_mail_down.dds" mouseOver="esoui/art/chatwindow/chat_mail_over.dds" - /> - + /> <OnMouseEnter> DailyAutoShare.CreateControlTooltip(self) </OnMouseEnter> - <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> + <OnMouseExit> DailyAutoShare.HideTooltip(self) </OnMouseExit> <OnMouseUp> DailyAutoShare.Donate(self, button) </OnMouseUp> - </Button> - - - + </Button> </Controls> - </Control> - + </Control> <Control name="DasInvisibleFooterSpacer" mouseEnabled="false" > <Dimensions y="15" /> </Control> </Controls> - </Control> - <Control name="DasSubList" hidden="true" resizeToFitDescendents="true"> <Dimensions x="310" /> <Anchor point="LEFT" relativeTo="DasList" relativePoint="RIGHT" offsetX="10" offsetY="10" /> <Controls> <Backdrop name="$(parent)_BG" inherits="ZO_DefaultBackdrop"><AnchorFill/></Backdrop> - <Button name="DasButtonHideSublist" > + <Button name="DasButtonHideSublist" > <Dimensions x="20" y="20" /> <Anchor point="TOPRIGHT" relativeTo="DasSubList" relativePoint="TOPRIGHT" offsetX="-8" offsetY="5"/> - <Textures normal ="/esoui/art/buttons/decline_up.dds" pressed ="/esoui/art/buttons/decline_down.dds" mouseOver ="/esoui/art/buttons/decline_over.dds" - /> + /> <OnMouseUp> DasSubList:SetHidden(true)</OnMouseUp> </Button> - </Controls> - </Control> + </Control> </Controls> </TopLevelControl> - - <Button name="Das_Label" font="ZoFontChat" text="" wrapMode="TRUNCATE" - verticalAlignment="CENTER" horizontalAlignment="LEFT" alpha="0.85" hidden="true" - disabled="true" virtual="true" + <Button name="Das_Label" font="ZoFontChat" text="" wrapMode="TRUNCATE" + verticalAlignment="CENTER" horizontalAlignment="LEFT" alpha="0.85" hidden="true" + disabled="true" virtual="true" drawLayer="1"> - <Dimensions x="350" y="30" /> + <Dimensions x="350" y="30" /> <FontColors normalColor="INTERFACE_COLOR_TYPE_TEXT_COLORS:INTERFACE_TEXT_COLOR_NORMAL" pressedColor="INTERFACE_COLOR_TYPE_TEXT_COLORS:INTERFACE_TEXT_COLOR_SELECTED" mouseOverColor="INTERFACE_COLOR_TYPE_TEXT_COLORS:INTERFACE_TEXT_COLOR_HIGHLIGHT" disabledColor="INTERFACE_COLOR_TYPE_TEXT_COLORS:INTERFACE_TEXT_COLOR_DISABLED" /> - - <OnMouseEnter>DailyAutoShare.CreateLabelTooltip(self)</OnMouseEnter> <OnMouseExit>DailyAutoShare.HideTooltip(self)</OnMouseExit> <OnMouseUp>DailyAutoShare.QuestLabelClicked(self, button)</OnMouseUp> - </Button> + </Button> <Control name="DasInvisibleFooterSpacer" mouseEnabled="false" virtual="true"> <Dimensions y="15" /> - </Control> + </Control> </Controls> - </GuiXml> \ No newline at end of file diff --git a/DailyAutoShare.txt b/DailyAutoShare.txt index ced1372..5679603 100644 --- a/DailyAutoShare.txt +++ b/DailyAutoShare.txt @@ -1,28 +1,21 @@ ## Title: DailyAutoShare ## Author: manavortex -## Version: 3.61 +## Version: 3.7 ## APIVersion: 100025 ## SavedVariables: DAS_Settings DAS_Globals ## DependsOn: LibStub LibCustomMenu LibAddonMenu-2.0 ## OptionalDependsOn: pchat - - libs\LibCustomTitles\LibCustomTitles.lua - xml/VirtualButtons.xml DAS_xml.xml - questData/00_ids.lua questData/01_subzones.lua - locale/en.lua locale/$(language).lua - 00_startup.lua xml/Bindings.xml DASHelper.lua DASData.lua - questData/BingoClean.lua questData/GuildQuests.lua questData/Festival.lua @@ -34,10 +27,8 @@ questData/Cyrodiil.lua questData/ClockworkCity.lua questData/Summerset.lua questData/Murkmire.lua - DASUserSettingsAdapter.lua DasChatMessage.lua - DASContextMenu.lua DasGui.lua DasQuestAccept.lua @@ -45,5 +36,4 @@ DasGuiStringBuilder.lua DasTooltip.lua DasMapMarker.lua DASMenu.lua - DasLog.lua \ No newline at end of file diff --git a/DasChatMessage.lua b/DasChatMessage.lua index 98c68c9..7d927a6 100644 --- a/DasChatMessage.lua +++ b/DasChatMessage.lua @@ -2,21 +2,19 @@ local messageQueue = {} local unittagplayer = UNITTAG_PLAYER local share = "share" local stopsharing = "stop sharing" - local inviteQueue = {} local alreadyInviting = false local function popInviteQueue() -- d("popInviteQueue called with " .. tostring(#inviteQueue) .. " entries") if #inviteQueue == 0 then alreadyInviting = false - return + return end local playerName = table.remove(inviteQueue, 1) -- d("inviting " .. playerName) GroupInviteByName(playerName) zo_callLater(popInviteQueue, 500) end - function table.contains(tbl, element) for _, value in pairs(tbl) do if value == element then @@ -25,88 +23,70 @@ function table.contains(tbl, element) end return false end - local function hasBingoQuestActive(bingoIndex) if not bingoIndex then return end local activeQuests = DAS.activeZoneQuests or {} - for _, value in pairs(activeQuests) do + for _, value in pairs(activeQuests) do if value == bingoIndex then return true end end return false - end - local channelTypes = DAS.channelTypes local stringPlus = "+" local stringAny = "+any" local function HandleChatMessage(messageText, fromDisplayName, calledRecursively) - if not DAS.autoInviting then return end - local found = stringAny == messageText -- it's +any - -- lower case regex local _, bingoCode = pcall(string.match, messageText, "[%+/]+%s*(%w+)%s?[%+/]?") if not found and not bingoCode then return end local bingoIndex = DAS.bingo[DAS.GetZoneId()][bingoCode] found = found or DAS.activeBingoIndices[bingoIndex] - if not found then return HandleChatMessage(messageText:gsub(bingoCode, ""), fromDisplayName, true) end if found and not table.contains(inviteQueue, fromDisplayName) then -- d("found bingo " .. tostring(bingoCode) .. " (" .. tostring(bingoIndex) .. "), inviting " .. tostring(fromDisplayName)) table.insert(inviteQueue, fromDisplayName) - if not alreadyInviting then + if not alreadyInviting then popInviteQueue() end end end - local stringShare = "share" local stringQuest = "quest" local stringPlusRegex = "%+" function DAS.OnChatMessage(eventCode, channelType, fromName, messageText, _, fromDisplayName) - -- ignore all chat channels that aren't set if nil == channelTypes[channelType] then return end - local isPlayerName = fromDisplayName:find(DAS.pdn) - -- if we aren't listening, or if we are listening and the message's from us, ignore it if not (channelTypes[channelType] or isPlayerName) then return end - -- if it's a group message, react to the group message if (channelType == CHAT_CHANNEL_PARTY) and (messageText:find(stringShare) or messageText:find(stringQuest)) then return DAS.TryShareActiveDaily() - elseif channelType == CHAT_CHANNEL_WHISPER and messageText:find(stringPlusRegex) then + elseif channelType == CHAT_CHANNEL_WHISPER and messageText:find(stringPlusRegex) then return HandleChatMessage("+any", fromDisplayName, false) end - -- d(zo_strformat("[OnChatMessage] <<1>>: <<2>>, isPlayerName: <<3>>", fromDisplayName, messageText, tostring(isPlayerName))) - local _, result = pcall(string.find, messageText, stringPlusRegex) if not (result or #messageText <= 3) then return end - - if result and isPlayerName then - local groupStatus = IsUnitGrouped(unittagplayer) + if result and isPlayerName then + local groupStatus = IsUnitGrouped(unittagplayer) -- needs to be == false, ignore channels that aren't on the list if groupStatus and (channelTypes[channelType] == false) then -- NO DON'T REFACTOR MANA if not DAS.GetAutoLeave() then return end GroupLeave() zo_callLater(DAS.TryTriggerAutoAcceptInvite, 5000) elseif not groupStatus then - DAS.TryTriggerAutoAcceptInvite() - end + DAS.TryTriggerAutoAcceptInvite() + end return end - - -- we're not auto inviting, nothing to do + -- we're not auto inviting, nothing to do if not DAS.autoInviting then return end - - if #messageText == 1 and messageText == stringPlus then + if #messageText == 1 and messageText == stringPlus then table.insert(inviteQueue, fromDisplayName) if not alreadyInviting then popInviteQueue() end return end - HandleChatMessage(messageText:lower(), fromDisplayName) end \ No newline at end of file diff --git a/DasGui.lua b/DasGui.lua index bd181ba..c6ebe0d 100644 --- a/DasGui.lua +++ b/DasGui.lua @@ -6,38 +6,28 @@ local visibleButtonIndex = 0 DAS.sublabels = {} DAS.labels = {} local numLabels = 0 - - local labelTexts = {} - local p = DAS.DebugOut - local function isHidden() return (not DAS.GetActiveIn()) or DAS.GetHidden() or (DAS.GetAutoHide() and (not DAS.OpenDailyPresent())) end - local function isMinimised() return DAS.GetUserMinimised() or (not isHidden()) and (DAS.GetAutoMinimize() and (not DAS.OpenDailyPresent())) end - local function cacheVisibilityStatus(forceOverride) stateIsHidden = isHidden() stateIsMinimised = isMinimised() end - function DAS.RefreshControl(refreshQuestCache) - -- p("DAS.RefreshControl(" .. tostring(refreshQuestCache).. ")") - if not DAS.HasActiveDaily() then + if not DAS.HasActiveDaily() then DAS.SetAutoInvite(false) end - cacheVisibilityStatus() DasHandle:SetHidden( stateIsHidden) DasControl:SetHidden( stateIsHidden) - DasList:SetHidden( stateIsMinimised or stateIsHidden) + DasList:SetHidden( stateIsMinimised or stateIsHidden) DAS.RefreshLabelsWithDelay() - end local function SetAlpha(control, value) if not control then return end @@ -47,7 +37,6 @@ local function SetAlpha(control, value) control:SetAlpha(0.3) end end - local function SetAutoInviteButton(value) if value then DasButtonInvite:SetAlpha(1) @@ -58,9 +47,7 @@ local function SetAutoInviteButton(value) DasButtonInvite:SetNormalTexture("/DailyAutoShare/textures/invite_up.dds") DasList_BG:SetEdgeColor(ZO_DEFAULT_TEXT:UnpackRGBA()) end - end - local function SetLockedButton(value) if value then DasButtonLock:SetNormalTexture("/esoui/art/miscellaneous/locked_up.dds") @@ -74,66 +61,51 @@ local function SetLockedButton(value) DasControl:SetMovable(true) end end - local function SetMinimizedButton(value) - local minimizedTex = "/esoui/art/buttons/plus" local maximizedTex = "/esoui/art/buttons/minus" local tex = (value and minimizedTex) or maximizedTex DasButtonMinmax:SetNormalTexture(tex.. "_up.dds") DasButtonMinmax:SetMouseOverTexture(tex.. "_over.dds") DasButtonMinmax:SetPressedTexture(tex.. "_down.dds") - end - - local function setButtonStates() SetAutoInviteButton(DAS.GetAutoInvite()) SetLockedButton(DAS.GetLocked()) - SetAlpha(DasButtonAccept, DAS.GetAutoAcceptShared()) SetAlpha(DasButtonShare, DAS.GetAutoShare()) - DasButtonSpam:SetAlpha(0.7) end DAS.SetButtonStates = setButtonStates - function DAS.QuestLabelClicked(control, mouseButton) - DAS.SetSubLabels(control.dataQuestList) - if mouseButton == MOUSE_BUTTON_INDEX_RIGHT then -- and isValidJournalIndex then - return DAS.OnRightClick(control) + return DAS.OnRightClick(control) end - - local journalIndex = control.dataJournalIndex or 99 - + local journalIndex = control.dataJournalIndex or 99 if IsValidQuestIndex(journalIndex) then if journalIndex ~= DAS.trackedIndex then FOCUSED_QUEST_TRACKER:ForceAssist(journalIndex) else ShareQuest(journalIndex) end - end + end end - function DAS.Donate(control, mouseButton) local amount = 2000 - if mouseButton == 2 then + if mouseButton == 2 then amount = 1000 elseif mouseButton == 3 then amount = 25000 end - SCENE_MANAGER:Show('mailSend') zo_callLater(function() ZO_MailSendToField:SetText("@manavortex") ZO_MailSendSubjectField:SetText("Thank you for DailyAutoShare!") QueueMoneyAttachment(amount) - ZO_MailSendBodyField:TakeFocus() + ZO_MailSendBodyField:TakeFocus() end, 200) end - function DAS.MinMaxButton() local newMinimisedValue = not (isMinimised()) SetMinimizedButton(newMinimisedValue) @@ -141,68 +113,58 @@ function DAS.MinMaxButton() local stateIsMinimised = newMinimisedValue DAS.RefreshControl() end - local function shouldHideLabel(questName, zoneId) local questLists = DAS.GetZoneQuests(zoneId) or {} -- d(zo_strformat("should <<1>> be hidden?", questName)) - for questListName, questListData in pairs(questLists) do - if questListData[questName] then + for questListName, questListData in pairs(questLists) do + if questListData[questName] then -- d(questName) -- d("active: " .. tostring(DAS.GetQuestListItem(zoneId, questListName, "active"))) -- d("hidden: " .. tostring(DAS.GetQuestListItem(zoneId, questListName, "invisible"))) - return ( + return ( (not DAS.GetQuestListItem(zoneId, questListName, "active")) or - DAS.GetQuestListItem(zoneId, questListName, "invisible")) + DAS.GetQuestListItem(zoneId, questListName, "invisible")) end end return false end - local function setControlText(label, hidden) local state = label.dataQuestState if label.dataJournalIndex == DAS.trackedIndex then label:SetText("* " .. label.dataTitle) - elseif hideLabel then + elseif hideLabel then label:SetText("") label:SetVisible(false) return else label:SetText(label.dataTitle) end - if label.dataQuestState == DAS_STATUS_COMPLETE then label:SetState(BSTATE_DISABLED) elseif label.dataQuestState == DAS_STATUS_ACTIVE then - label:SetState(BSTATE_PRESSED) + label:SetState(BSTATE_PRESSED) else --if label.dataQuestState == DAS_STATUS_OPEN then label:SetState(BSTATE_NORMAL) end - end - function setLabelTable(questTable) - local status = DAS_STATUS_COMPLETE local index = 1 local questName, tmpStatus = nil - for idx, tmpQuestName in pairs(questTable) do - labelTexts[tmpQuestName] = true questName = questName or tmpQuestName tmpStatus = DAS.GetQuestStatus(tmpQuestName) - if tmpStatus == DAS_STATUS_ACTIVE then + if tmpStatus == DAS_STATUS_ACTIVE then status = tmpStatus questName = tmpQuestName - elseif status ~= DAS_STATUS_ACTIVE and status ~= DAS_STATUS_OPEN then - status = tmpStatus - end + elseif status ~= DAS_STATUS_ACTIVE and status ~= DAS_STATUS_OPEN then + status = tmpStatus + end end questName = questName or "" return questName, status end - - local sep = "%s%w%w%s" local function makeSubLabelTitle(str, str2) if not str then return end @@ -210,17 +172,14 @@ local function makeSubLabelTitle(str, str2) if nil == idx then return str end return string.sub(str, 0, idx+3) .. "..." end - function DAS.SetSubLabels(questTable) DasSubList:SetHidden(nil == questTable or {} == questTable) if DasSubList:IsHidden() then return end - local status = DAS_STATUS_COMPLETE local index = 1 for idx, questName in pairs(questTable) do index = idx local label = DAS.sublabels[idx] - label.dataJournalIndex = DAS.GetLogIndex(questName) local bingoString, bingoIndex = DAS.GetBingoStringFromQuestName(questName) label.dataBingoString = bingoString @@ -232,9 +191,9 @@ function DAS.SetSubLabels(questTable) if label.dataQuestState == DAS_STATUS_ACTIVE then table.insert(activeZoneQuests, label.dataJournalIndex) status = label.dataQuestState - elseif status ~= DAS_STATUS_ACTIVE and status ~= DAS_STATUS_OPEN then - status = label.dataQuestState - end + elseif status ~= DAS_STATUS_ACTIVE and status ~= DAS_STATUS_OPEN then + status = label.dataQuestState + end setControlText(label) end for idx=index, #DAS.sublabels do @@ -246,45 +205,35 @@ function DAS.SetSubLabels(questTable) label:SetText("") label:SetHidden(true) end - DAS.SetLabelFontSize() return status end local typeTable = "table" - function DAS.setLabels(zoneQuests) - zoneQuests = zoneQuests or DAS.GetZoneQuests() labelTexts = {} - -- p("DAS.setLabels") DAS.activeZoneQuests = {} numLabels = 1 - local questName + local questName for index, questNameOrTable in pairs(zoneQuests) do - - if not labelTexts[questNameOrTable] then + if not labelTexts[questNameOrTable] then label = DAS.labels[numLabels] -- despite the name these are actually buttons - if nil ~= label then - local status = DAS_STATUS_OPEN + local status = DAS_STATUS_OPEN visibleButtonIndex = visibleButtonIndex +1 - - if type(questNameOrTable) == typeTable then + if type(questNameOrTable) == typeTable then label.dataQuestList = ZO_DeepTableCopy(questNameOrTable, {}) label.dataQuestName, status = setLabelTable(questNameOrTable) label.dataQuestState = status or DAS_STATUS_OPEN label.dataTitle = makeSubLabelTitle(label.dataQuestList[1], label.dataQuestList[2]) or questName - else label.dataQuestList = nil label.dataTitle = questNameOrTable label.dataQuestName = questNameOrTable label.dataQuestState = DAS.GetQuestStatus(label.dataQuestName) end - local hideLabel = (hideCompleted and label.dataQuestState == DAS_STATUS_COMPLETE) or shouldHideLabel(label.dataQuestName, zoneId) - -- d(zo_strformat("DAS: <<1>> state <<2>>", label.dataQuestName, label.dataQuestState)) label:SetHidden(hideLabel) label.dataJournalIndex = DAS.GetLogIndex(label.dataQuestName) @@ -292,52 +241,36 @@ function DAS.setLabels(zoneQuests) label.dataBingoString = bingoString label.dataBingoIndex = bingoIndex label.dataTitle = label.dataTitle or "" - if label.dataQuestState == DAS_STATUS_ACTIVE then table.insert(DAS.activeZoneQuests, label.dataJournalIndex) end - - labelTexts[label.dataQuestName] = true setControlText(label, hideLabel) - numLabels = numLabels + 1 - - end -- nil check end end end -- for loop end - return numLabels end - function DAS.RefreshLabelsWithDelay() zo_callLater(DAS.RefreshLabels, 500) end - function DAS.RefreshLabels(forceQuestRefresh, forceSkipQuestRefresh) - - forceQuestRefresh = forceQuestRefresh or DAS.questCacheNeedsRefresh p("DAS.RefreshLabels(" .. tostring(forceQuestRefresh) .. ", " .. tostring(forceSkipQuestRefresh) .. ")") -- error("RefreshLabels called") - cacheVisibilityStatus() setButtonStates() - local hideCompleted = DAS.GetHideCompleted() local hidden = DasList:IsHidden() local label, questIndex, tracked - if not forceSkipQuestRefresh then - DAS.RefreshQuestLogs(forceQuestRefresh) + if not forceSkipQuestRefresh then + DAS.RefreshQuestLogs(forceQuestRefresh) if FOCUSED_QUEST_TRACKER and FOCUSED_QUEST_TRACKER.assistedData then DAS.trackedIndex = FOCUSED_QUEST_TRACKER.assistedData.arg1 end end - local questList = DAS.QuestLists[DAS.GetZoneId()] local zoneQuests = DAS.GetZoneQuests() - - DAS.setLabels(zoneQuests) - + DAS.setLabels(zoneQuests) for bIndex=#DAS.GetZoneQuests()+1, #DAS.labels do if DAS.labels[bIndex] then DAS.labels[bIndex]:SetHidden(true) @@ -347,14 +280,12 @@ function DAS.RefreshLabels(forceQuestRefresh, forceSkipQuestRefresh) DAS.RefreshFullBingoString() DAS.SetLabelFontSize() end - function DAS.RefreshGui(hidden) -- p("DAS.RefreshGui") if not DAS.GetActiveIn() then DasControl:SetHidden(true) - return + return end - hidden = hidden or (DAS.GetHidden() or (DAS.GetAutoHide() and not DAS.OpenDailyPresent()) or #DAS.GetZoneQuests(zoneId) == 0) local minmaxed = stateIsMinimised SetMinimizedButton(minmaxed) @@ -363,7 +294,6 @@ function DAS.RefreshGui(hidden) DasHandle:SetMovable(not DAS.GetLocked()) DAS.RefreshLabelsWithDelay() end - function DAS.AnchorList() DasList:ClearAnchors() if DAS.GetUpsideDown() then @@ -378,17 +308,14 @@ function DAS.AnchorList() DasSubList:SetAnchor(RIGHT, DasList, LEFT) end end - local function setFontSize(labelList) local labelHeight = 30 local fontScale = DAS.GetFontSize() - local totalHeight = 0 local hidden = false local parent = nil local maxWidth = DasHandle:GetWidth() - - for index, control in pairs(labelList) do + for index, control in pairs(labelList) do parent = parent or control:GetParent() maxWidth = math.max(maxWidth, control:GetWidth()) control:SetScale(fontScale) @@ -402,44 +329,33 @@ local function setFontSize(labelList) parent:SetWidth(maxWidth) end DAS.setFontSize = setFontSize - local function setGuiHeight() local buttonIndex = numLabels or 0 local listHeight = DasHeader:GetHeight() + buttonIndex*(DAS.labels[1]:GetHeight() + 2) DasList:SetHeight(listHeight) - DasControl:SetHeight(listHeight + DasHandle:GetHeight()) + DasControl:SetHeight(listHeight + DasHandle:GetHeight()) end DAS.SetGuiHeight = setGuiHeight - function DAS.SetLabelFontSize() - setFontSize(DAS.labels) setFontSize(DAS.sublabels) - DAS.SetGuiHeight() + DAS.SetGuiHeight() end - - function DAS.CreateGui() - local function setupGuiLabels() - - local predecessor = DasHeader + local predecessor = DasHeader local offsetX, offsetY = 10, 10 - for i=1, 28 do local button = WINDOW_MANAGER:CreateControlFromVirtual("Das_Label_"..tostring(i), DasList, "Das_Label") button:SetAnchor(TOPLEFT, predecessor, BOTTOMLEFT, 0, offsetY) predecessor = button - offsetY = 0 + offsetY = 0 table.insert(DAS.labels, button) end - local spacer = WINDOW_MANAGER:CreateControlFromVirtual("Das_Spacer_1", DasList, "DasInvisibleFooterSpacer") spacer:SetAnchor(TOPLEFT, predecessor, BOTTOMLEFT, 0, offsetY) - - predecessor = DasSubList + predecessor = DasSubList offsetY = 10 - local anchor = TOPLEFT for i=1, 15 do local button = WINDOW_MANAGER:CreateControlFromVirtual("Das_Sublabel_"..tostring(i), DasSubList, "Das_Label") @@ -448,23 +364,17 @@ function DAS.CreateGui() offsetY = 0 offsetX = 0 anchor = BOTTOMLEFT - table.insert(DAS.sublabels, button) end local spacer = WINDOW_MANAGER:CreateControlFromVirtual("Das_Spacer_2", DasSubList, "DasInvisibleFooterSpacer") spacer:SetAnchor(TOPLEFT, predecessor, BOTTOMLEFT, 0, offsetY) - DAS.SetLabelFontSize() end - setupGuiLabels() DAS.LoadControlLocation(DasControl) -- DAS.LoadControlLocation(DasButton) - - DAS.AnchorList() + DAS.AnchorList() SetMinimizedButton(DAS.GetMinimized()) - DAS.RefreshGui() zo_callLater(function() DAS.SetLabelFontSize() end, 2000) -end - +end \ No newline at end of file diff --git a/DasGuiStringBuilder.lua b/DasGuiStringBuilder.lua index 9aa7be2..9c18c6f 100644 --- a/DasGuiStringBuilder.lua +++ b/DasGuiStringBuilder.lua @@ -1,164 +1,135 @@ local DAS = DailyAutoShare - DAS.QuestIndexTable = {} DAS.QuestNameTable = {} - local p = DAS.DebugOut - local en = "en" -local function getEnglishQuestNames(activeQuestNames) +local function getEnglishQuestNames(activeQuestNames) activeQuestNames = activeQuestNames or DAS.GetZoneQuests() if DAS.locale == en or not DAS_STRINGS_LOCALE or not DAS.locale then - return activeQuestNames - end + return activeQuestNames + end local ret = {} for _, questName in ipairs(activeQuestNames) do - for key, value in pairs(DAS_STRINGS_LOCALE[DAS.locale]) do + for key, value in pairs(DAS_STRINGS_LOCALE[DAS.locale]) do if value == questName then table.insert(ret, DAS_STRINGS_LOCALE.en[key]) end - end + end end - if ret == {} then return activeQuestNames end return ret end DAS.getEnglishQuestNames = getEnglishQuestNames - local function askForQuest(questNames) local ret = "" - for _, questName in ipairs(questNames) do - if "" ~= questName then + for _, questName in ipairs(questNames) do + if "" ~= questName then ret = ret .. questName .. ", " - end + end end if ret == "" then return ret end return ret:sub(1, -3) end local function generateQuestSpam(questNames) local ret = "" - for _, questName in ipairs(questNames) do - bingoString = DAS.GetBingoStringFromQuestName(questName) - if not ret:find(bingoString) then + for _, questName in ipairs(questNames) do + bingoString = DAS.GetBingoStringFromQuestName(questName) + if not ret:find(bingoString) then ret = ret .. ((("" == bingoString) and "") or bingoString .. " ") end end return ret -end - - +end local empty = "" local comma = ", " local space = " " local any = "+any" local eitherof = "either of " - local function getQuestNames(activeQuestNames) - activeQuestNames = activeQuestNames or (questName and {[1] = questName,}) or DAS.GetActiveQuestNames() + activeQuestNames = activeQuestNames or (questName and {[1] = questName,}) or DAS.GetActiveQuestNamesFromGui() local questNames = empty - for _, questName in pairs(activeQuestNames) do + for _, questName in pairs(activeQuestNames) do questNames = questNames .. questName .. comma end - return questNames - end - local varargOne, varargTwo, varargAny = "<<1>>", "<<2>>", "%+any" local function whisperify(qsString) - local beginIndex, endIndex = string.find(qsString, varargOne) - if endIndex then - qsString = qsString:sub(0, endIndex+2) + local beginIndex, endIndex = string.find(qsString, varargOne) + if endIndex then + qsString = qsString:sub(0, endIndex+2) end return qsString .. space .. varargTwo end - - local function GenerateBingoString(activeQuestNames) - - activeQuestNames = activeQuestNames or (questName and {[1] = questName,}) or DAS.GetActiveQuestNames() + activeQuestNames = activeQuestNames or (questName and {[1] = questName,}) or DAS.GetActiveQuestNamesFromGui() activeQuestNames = DAS.getEnglishQuestNames(activeQuestNames) - local qsString = DAS.GetSettings().questShareString local bingoCodes = {} local bingo, questNames = empty, empty local bingoString = (DAS.fullBingoString or empty):gsub(varargAny, empty) if DAS.GetAutoInvite() then - local questNames = getQuestNames(activeQuestNames) - + local questNames = getQuestNames(activeQuestNames) -- if we're listening for whisper only, adjust spam accordingly - if DAS.GetWhisperOnly() then + if DAS.GetWhisperOnly() then qsString = whisperify(qsString) bingoString = DAS.GetSettings().whisperString else - -- if we have more than one, insert either of - if #bingoString > 0 then + if #bingoString > 0 then bingo = ((#activeQuestNames > 1 and eitherof) or empty) .. bingoString end - end - return zo_strformat(qsString, questNames, bingoString) + end + return zo_strformat(qsString, questNames, bingoString) end if #bingoString > 0 then return bingoString end - if NonContiguousCount(DAS.GetShareableLog()) == 0 and #activeQuestNames == 0 then return any end - activeQuestNames = DAS.GetOpenQuestNames() + activeQuestNames = DAS.GetOpenQuestNamesFromGui() return generateQuestSpam(activeQuestNames) - end DAS.GenerateBingoString = GenerateBingoString - local function SpamChat(questName) if CHAT_SYSTEM.textEntry.editControl:HasFocus() then CHAT_SYSTEM.textEntry.editControl:Clear() end - local activeQuestNames = (questName and {[1] = questName,}) or DAS.GetActiveQuestNames() - if nil == questName then - activeQuestNames = DAS.GetActiveQuestNames() + local activeQuestNames = (questName and {[1] = questName,}) or DAS.GetActiveQuestNamesFromGui() + if nil == questName then + activeQuestNames = DAS.GetActiveQuestNamesFromGui() else table.insert(activeQuestNames, questName) end - if #activeQuestNames == 0 then + if #activeQuestNames == 0 then DAS.SetAutoInvite(false) - end + end StartChatInput(DAS.GenerateBingoString(activeQuestNames), CHAT_CHANNEL_ZONE) - end DAS.SpamChat = SpamChat - function DAS.SpamForSingle(questName, bingoString) if nil == questName and nil == bingoString then return end questName = questName or DAS.GetQuestNameFromBingoString(bingoString) bingoString = bingoString or GetBingoStringFromQuestName(questName) - local lftext = bingoString - end - -- called from XML function DAS.SettingsButton(control, mouseButton) - local name = control:GetName():gsub("DasButton", "") if name == "Spam" then return SpamChat() end if name == "Invite" then return DAS.SetAutoInvite(not DAS.GetAutoInvite()) end if name == "Accept" then return DAS.SetAutoAcceptShared(not DAS.GetAutoAcceptShared()) end - if name == "Share" then + if name == "Share" then if mouseButton == 2 then return DAS.TryShareActiveDaily() end - DAS.SetAutoShare(not DAS.GetAutoShare()) + DAS.SetAutoShare(not DAS.GetAutoShare()) end - end - function DAS.ToggleQuest(control) local questName = control["dataQuestName"] or control:GetText() local completed = DAS.GetCompleted(questName) - local newQuestState = (completed and DAS_STATUS_OPEN) or DAS_STATUS_COMPLETE - if not completed then + if not completed then control.dataIsTracked = false - end + end control.dataQuestState = newQuestState DAS.LogQuest(questName, newQuestState) -end +end \ No newline at end of file diff --git a/DasLog.lua b/DasLog.lua index ddfab5c..8c4cdb6 100644 --- a/DasLog.lua +++ b/DasLog.lua @@ -1,94 +1,66 @@ -- local currentDate = tonumber(GetDate()) currentDate = tonumber(GetDate()) - characterName = DAS.pdn or GetUnitName(UNITTAG_PLAYER) -- local characterName = DAS.pdn or GetUnitName(UNITTAG_PLAYER) - - local function getSettingsArray() - currentDate = currentDate or tonumber(GetDate()) characterName = characterName or GetUnitName(UNITTAG_PLAYER) - local settings = DAS.globalSettings.completionLog[currentDate] or {} - -- initialize if empty - + -- initialize if empty settings = DAS.globalSettings.completionLog[currentDate] or {} settings[characterName] = settings[characterName] or {} - - -- make sure it's set DAS.globalSettings.completionLog[currentDate] = settings - DAS.todaysLog = DAS.globalSettings.completionLog[currentDate] DAS.todaysCharacterLog = DAS.globalSettings.completionLog[currentDate][characterName] - - return DAS.globalSettings.completionLog[currentDate][characterName] end DAS.GetShareableLog = getSettingsArray - local typeString = "string" function DAS.GetCompleted(questName) - if nil == questName or "" == questName or typeString ~= type(questName) then return false end - local settings = getSettingsArray() local logEntry = settings[zo_strformat(questName)] or {} return logEntry.completed - end - - function DAS.LogQuest(questName, completed) if not questName then return end - local timeStringNumber = timeStringNumber or tonumber(GetTimeString():sub(1,2)) local settings = getSettingsArray() - local afterEight = (timeStringNumber >= 8) -- 08:17:02 - reset is at 8 - local afterEightHasChanged = false + local afterEightHasChanged = false for questId, questData in pairs(settings) do - afterEightHasChanged = afterEightHasChanged or questData.afterEight ~= afterEight + afterEightHasChanged = afterEightHasChanged or questData.afterEight ~= afterEight end - if afterEightHasChanged then + if afterEightHasChanged then for questId, questData in pairs(settings) do - if questData.afterEight ~= afterEight then + if questData.afterEight ~= afterEight then settings[questId] = nil end end end - settings[questName] = {} settings[questName].completed = completed settings[questName].afterEight = afterEight - -- DAS.globalSettings.completionLog[currentDate][characterName][questName] = settings[questName] end - - local function deleteYesterdaysLog() -- kill yesterday's log, we don't need it - if (nil ~= DAS.globalSettings and nil ~= DAS.globalSettings.lastLogDate) and (DAS.globalSettings.lastLogDate < currentDate) then + if (nil ~= DAS.globalSettings and nil ~= DAS.globalSettings.lastLogDate) and (DAS.globalSettings.lastLogDate < currentDate) then if nil == DAS.Log then DAS.Log = {} end DAS.Log[DAS.globalSettings.lastLogDate] = nil DAS.globalSettings.lastLogDate = currentDate end end DAS.deleteYesterdaysLog = deleteYesterdaysLog - function DAS.GetQuestStatus(questName) if nil == questName then return end - if nil ~= DAS.QuestNameTable[questName] then return DAS_STATUS_ACTIVE end - if DAS.GetCompleted(questName) then + if DAS.GetCompleted(questName) then return DAS_STATUS_COMPLETE end - return DAS_STATUS_OPEN end - - local typeTable = "table" local function isEmpty(tbl) if not tbl then return true end @@ -98,42 +70,35 @@ local function isEmpty(tbl) ret = ret and ({} == value or isEmpty(value)) else ret = false - end + end end return ret end - function DAS.GetLogIndex(questName) return DAS.QuestNameTable[questName] or 0 end - local function handleLog(forceNoAfterEight) - local todaysLog = DAS.GetShareableLog() - if todaysLog and {} ~= todaysLog then - todaysLog = ZO_DeepTableCopy(todaysLog, {}) + if todaysLog and {} ~= todaysLog then + todaysLog = ZO_DeepTableCopy(todaysLog, {}) end - local allLogs = DAS.globalSettings.completionLog allLogs[currentDate] = allLogs[currentDate] or {} - local logSize, lastDate = NonContiguousCount(DAS.globalSettings.completionLog) - - local counter = 0 + local counter = 0 for currentDate, dateLog in pairs(DAS.globalSettings.completionLog) do counter = counter + 1 - if nil ~= currentDate and currentDate < currentDate then + if nil ~= currentDate and currentDate < currentDate then lastDate = currentDate end - if counter < logSize-2 then - DAS.globalSettings.completionLog[currentDate] = nil + if counter < logSize-2 then + DAS.globalSettings.completionLog[currentDate] = nil end end - local afterEight = not forceNoAfterEight and tonumber(GetTimeString():sub(0, 2)) >= 08 -- has to be a local var, lua error if not - if (not afterEight) and isEmpty(DAS.todaysLog) and lastDate ~= currentDate then local lastLog = DAS.globalSettings.completionLog[lastDate] + if not lastLog then return end DAS.globalSettings.completionLog[currentDate] = ZO_DeepTableCopy(lastLog, {}) -- d(DAS.globalSettings.completionLog[currentDate]) for charName, charLog in pairs(DAS.globalSettings.completionLog[currentDate]) do diff --git a/DasMapMarker.lua b/DasMapMarker.lua index ac9e861..2e01ef1 100644 --- a/DasMapMarker.lua +++ b/DasMapMarker.lua @@ -1,16 +1,9 @@ local DAS = DAS or {} - local mapMarkers = {} DAS.mapMarkers = mapMarkers - local markerControls = {} - - function DAS.SetMarkerVisibility() local hidden = not DAS.GetMapMarkerVisible() - end - function DAS.CreateMapMarkers() - end \ No newline at end of file diff --git a/DasQuestAccept.lua b/DasQuestAccept.lua index 3446c82..13970c5 100644 --- a/DasQuestAccept.lua +++ b/DasQuestAccept.lua @@ -1,15 +1,12 @@ local chattering, wasQuestAccepted = false, false local optionString, optionCount, wasQuestAccepted - local questStarter, questFinisher local unitInteract = "interact" - function DAS.cacheChatterData() local zoneId = DAS.GetZoneId() questStarter = DAS.questStarter[zoneId] or {} - questFinisher = DAS.questFinisher[zoneId] or {} + questFinisher = DAS.questFinisher[zoneId] or {} end - local function HandleQuestAccepted() -- Accept the quest wasQuestAccepted = true @@ -18,15 +15,12 @@ local function HandleQuestAccepted() EndInteraction(INTERACTION_CONVERSATION) wasQuestAccepted = nil end - -- Handles the dialogue where we actually accept the quest local function HandleEventQuestOffered(eventCode) -- Stop listening for quest offering EVENT_MANAGER:RegisterForEvent("DAS_Chatter", EVENT_QUEST_ADDED, HandleQuestAccepted) AcceptOfferedQuest() end - - -- Handles the dialogue where we actually complete the quest local function HandleQuestCompleteDialog(eventCode, journalIndex) if not GetJournalQuestIsComplete(journalIndex) then return end @@ -34,9 +28,7 @@ local function HandleQuestCompleteDialog(eventCode, journalIndex) EVENT_MANAGER:UnregisterForEvent("DAS_Chatter", EVENT_QUEST_COMPLETE_DIALOG) CompleteQuest() end - local function HandleChatterBegin(eventCode, optionCount) - wasQuestAccepted = nil if not DAS.GetSettings().autoAcceptQuest or not DAS.GetActiveIn() then return end -- Ignore interactions with no options @@ -46,16 +38,12 @@ local function HandleChatterBegin(eventCode, optionCount) if optionCount == 0 then return end local npcName = GetUnitName(unitInteract) if not questStarter[npcName] and not questFinisher[npcName] then return end - for i = 1, optionCount do - -- Get details of option optionString, optionType = GetChatterOption(i) - -- If it is a daily quest option... if optionType == CHATTER_START_NEW_QUEST_BESTOWAL and questStarter[npcName] then - - EVENT_MANAGER:RegisterForEvent("DAS_Chatter", EVENT_QUEST_OFFERED, HandleEventQuestOffered) + EVENT_MANAGER:RegisterForEvent("DAS_Chatter", EVENT_QUEST_OFFERED, HandleEventQuestOffered) if not wasQuestAccepted then -- Listen for the quest offering - Select the first option SelectChatterOption(i) @@ -68,29 +56,22 @@ local function HandleChatterBegin(eventCode, optionCount) end -- If it is a writ quest completion option elseif optionType == CHATTER_START_ADVANCE_COMPLETABLE_QUEST_CONDITIONS and questFinisher[npcName] then - - -- Listen for the quest complete dialog EVENT_MANAGER:RegisterForEvent("DAS_Chatter", EVENT_QUEST_COMPLETE_DIALOG, HandleQuestCompleteDialog) - -- Select the first option to complete the quest SelectChatterOption(1) - -- If the goods were already placed, then complete the quest elseif optionType == CHATTER_START_COMPLETE_QUEST and questFinisher[npcName] then - -- Listen for the quest complete dialog EVENT_MANAGER:RegisterForEvent("DAS_Chatter", EVENT_QUEST_COMPLETE_DIALOG, HandleQuestCompleteDialog) -- Select the first option to place goods and/or sign the manifest SelectChatterOption(1) - -- Select the first option to complete the quest SelectChatterOption(1) end end chattering = false end - local function HandleChatterEnd() chattering = false end diff --git a/DasTooltip.lua b/DasTooltip.lua index ca686bb..ecf83f1 100644 --- a/DasTooltip.lua +++ b/DasTooltip.lua @@ -1,98 +1,74 @@ local DAS = DailyAutoShare - local function GenerateTooltipText(control) - local key = control:GetName() - if string.match(key, "Invite") then return GetString((DAS.GetAutoInvite() and DAS_SI_INVITE_TRUE) or DAS_SI_INVITE_FALSE) elseif string.match(key, "Accept") then return GetString((DAS.GetAutoAcceptShared() and DAS_SI_ACCEPT_TRUE) or DAS_SI_ACCEPT_FALSE) - elseif string.match(key, "Share") then return GetString((DAS.GetAutoShare() and DAS_SI_SHARE_TRUE) or DAS_SI_SHARE_FALSE) + elseif string.match(key, "Share") then return GetString((DAS.GetAutoShare() and DAS_SI_SHARE_TRUE) or DAS_SI_SHARE_FALSE) elseif string.match(key, "Spam") then return GetString(DAS_SI_SPAM) - elseif string.match(key, "Donate") then return GetString(DAS_SI_DONATE) - elseif string.match(key, "Refresh") then return GetString(DAS_SI_REFRESH) - end - -end - - + elseif string.match(key, "Donate") then return GetString(DAS_SI_DONATE) + elseif string.match(key, "Refresh") then return GetString(DAS_SI_REFRESH) + end +end local function SetTooltipText(control) - DailyAutoShare_Tooltip:ClearLines() + DailyAutoShare_Tooltip:ClearLines() local tooltipText = GenerateTooltipText(control) if not tooltipText then return end DailyAutoShare_Tooltip:AddLine(tooltipText) DailyAutoShare_Tooltip:SetHidden(false) - return tooltipText end function DAS.SetTooltipText(control) SetTooltipText(control) end - - local function setTooltipOffset(control) local offsetY = control:GetTop() - control:GetParent():GetTop() local isTooltipRight = DAS.GetSettings().tooltipRight local myAnchorPos = (isTooltipRight and TOPLEFT) or TOPRIGHT - local parentAnchorPos = (isTooltipRight and TOPRIGHT) or TOPLEFT - - DailyAutoShare_Tooltip:ClearAnchors() + local parentAnchorPos = (isTooltipRight and TOPRIGHT) or TOPLEFT + DailyAutoShare_Tooltip:ClearAnchors() DailyAutoShare_Tooltip:SetAnchor(myAnchorPos, control:GetParent(), parentAnchorPos, 0, offsetY) end - function DAS.CreateControlTooltip(control) - SetTooltipText(control) setTooltipOffset(DasHeader) - end - -function DAS.CreateTooltip(control) - setTooltipOffset(control) - SetTooltipText(control, isButton) +function DAS.CreateTooltip(control) + setTooltipOffset(control) + SetTooltipText(control, isButton) end - local questStateColors = { [DAS_STATUS_ACTIVE] = ZO_HIGHLIGHT_TEXT:UnpackRGBA(), [DAS_STATUS_OPEN] = ZO_NORMAL_TEXT:UnpackRGBA(), [DAS_STATUS_COMPLETE] = ZO_DISABLED_TEXT:UnpackRGBA(), } - local dotDotDot = "%.%.%." - local questStates = { [DAS_STATUS_COMPLETE] = " completed today", [DAS_STATUS_ACTIVE] = " is acive", [DAS_STATUS_OPEN] = " still open", } - local prequestString = GetString(DAS_SI_PREQUEST) local completedString = GetString(DAS_SI_COMPLETED) local openString = GetString(DAS_SI_OPEN) local questCompleted = DAS.questCompleted - - local function getPrequestTooltipData(questName) local prequestData = DAS.prequests[questName] if not prequestData then return end local prequestStatus = (questCompleted(prequestData.prequestId) and completedString) or openString return zo_strformat(prequestString, prequestData.prequestName, prequestStatus) end - local bingoCodeIs = GetString(DAS_BINGO_CODE_IS) -function DAS.CreateLabelTooltip(control) - +function DAS.CreateLabelTooltip(control) setTooltipOffset(control) local tooltipText = "" - local questName = control.dataTitle or control.dataQuestName - if nil == questName then return end - if nil ~= questName:find(dotDotDot) then + if nil ~= questName:find(dotDotDot) then tooltipText = GetString(DAS_TOGGLE_SUBLIST) else local bingoString = control.dataBingoString or "" local questState = control.dataQuestState - if questState == DAS_STATUS_COMPLETE then + if questState == DAS_STATUS_COMPLETE then tooltipText = bingoString .. questStates[questState] elseif DAS_STATUS_ACTIVE == questState or DAS_STATUS_OPEN == questState then tooltipText = (questName .. questStates[questState] .. bingoCodeIs .. bingoString) @@ -101,13 +77,10 @@ function DAS.CreateLabelTooltip(control) return end end - DailyAutoShare_Tooltip:AddLine(tooltipText) DailyAutoShare_Tooltip:AddLine(getPrequestTooltipData(questName)) DailyAutoShare_Tooltip:SetHidden(false) - end - function DAS.HideTooltip(control) DailyAutoShare_Tooltip:ClearLines() DailyAutoShare_Tooltip:SetHidden(true) diff --git a/libs/LibAddonMenu-2.0.txt b/libs/LibAddonMenu-2.0.txt index 891e536..5eb4ce6 100644 --- a/libs/LibAddonMenu-2.0.txt +++ b/libs/LibAddonMenu-2.0.txt @@ -6,16 +6,13 @@ ## Contributors: votan, merlight, Garkin, Randactyl, KuroiLight, silvereyes333, Baertram, kyoma ## Description: A library to aid in the creation of option panels. ## -## This Add-on is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. -## The Elder Scrolls® and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. +## This Add-on is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. +## The Elder Scrolls® and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. ## All rights reserved ## ## You can read the full terms at https://account.elderscrollsonline.com/add-on-terms - LibStub\LibStub.lua - LibAddonMenu-2.0\LibAddonMenu-2.0.lua - LibAddonMenu-2.0\controls\panel.lua LibAddonMenu-2.0\controls\submenu.lua LibAddonMenu-2.0\controls\button.lua @@ -29,4 +26,4 @@ LibAddonMenu-2.0\controls\header.lua LibAddonMenu-2.0\controls\slider.lua LibAddonMenu-2.0\controls\texture.lua LibAddonMenu-2.0\controls\iconpicker.lua -LibAddonMenu-2.0\controls\divider.lua +LibAddonMenu-2.0\controls\divider.lua \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/LICENSE b/libs/LibAddonMenu-2.0/LICENSE index f69cbd4..274a1dc 100644 --- a/libs/LibAddonMenu-2.0/LICENSE +++ b/libs/LibAddonMenu-2.0/LICENSE @@ -1,116 +1,84 @@ The Artistic License 2.0 - Copyright (c) 2016 Ryan Lakanen (Seerah) - Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble - This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. - You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. - Definitions - "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. - "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. - "You" and "your" means any person who would like to copy, distribute, or modify the Package. - "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. - "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. - "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. - "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. - "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. - "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. - "Source" form means the source code, documentation source, and configuration files for the Package. - "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. - - Permission for Use and Modification Without Distribution - (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. - - Permissions for Redistribution of the Standard Version - (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. - (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. - - Distribution of Modified Versions of the Package as Source - (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: - (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. - (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. - (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under - (i) the Original License or - (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee @@ -118,11 +86,8 @@ you do at least ONE of the following: Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. - - Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source - (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be @@ -132,14 +97,10 @@ must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. - (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. - - Aggregating or Linking the Package - (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the @@ -147,39 +108,29 @@ Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. - (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. - - Items That are Not Considered Part of a Modified Version - (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. - - General Provisions - (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. - (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. - (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. - (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any @@ -189,7 +140,6 @@ infringed by the Package. If you institute patent litigation that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. - (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED @@ -198,4 +148,4 @@ NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua b/libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua index 7a88896..01461de 100644 --- a/libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua +++ b/libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua @@ -1,13 +1,10 @@ -- LibAddonMenu-2.0 & its files © Ryan Lakanen (Seerah) -- -- Distributed under The Artistic License 2.0 (see LICENSE) -- ------------------------------------------------------------------ - - --Register LAM with LibStub local MAJOR, MINOR = "LibAddonMenu-2.0", 26 local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not lam then return end --the same or newer version of this lib is already loaded into memory - local messages = {} local MESSAGE_PREFIX = "[LAM2] " local function PrintLater(msg) @@ -17,19 +14,16 @@ local function PrintLater(msg) messages[#messages + 1] = msg end end - local function FlushMessages() for i = 1, #messages do d(MESSAGE_PREFIX .. messages[i]) end messages = {} end - if LAMSettingsPanelCreated and not LAMCompatibilityWarning then PrintLater("An old version of LibAddonMenu with compatibility issues was detected. For more information on how to proceed search for LibAddonMenu on esoui.com") LAMCompatibilityWarning = true end - --UPVALUES-- local wm = WINDOW_MANAGER local em = EVENT_MANAGER @@ -37,7 +31,6 @@ local sm = SCENE_MANAGER local cm = CALLBACK_MANAGER local tconcat = table.concat local tinsert = table.insert - local MIN_HEIGHT = 26 local HALF_WIDTH_LINE_SPACING = 2 local OPTIONS_CREATION_RUNNING = 1 @@ -45,7 +38,6 @@ local OPTIONS_CREATED = 2 local LAM_CONFIRM_DIALOG = "LAM_CONFIRM_DIALOG" local LAM_DEFAULTS_DIALOG = "LAM_DEFAULTS" local LAM_RELOAD_DIALOG = "LAM_RELOAD_DIALOG" - local addonsForList = {} local addonToOptionsMap = {} local optionsState = {} @@ -55,14 +47,12 @@ lam.util = lam.util or {} local util = lam.util lam.controlsForReload = lam.controlsForReload or {} local controlsForReload = lam.controlsForReload - local function GetDefaultValue(default) if type(default) == "function" then return default() end return default end - local function GetStringFromValue(value) if type(value) == "function" then return value() @@ -71,34 +61,28 @@ local function GetStringFromValue(value) end return value end - local function CreateBaseControl(parent, controlData, controlName) local control = wm:CreateControl(controlName or controlData.reference, parent.scroll or parent, CT_CONTROL) control.panel = parent.panel or parent -- if this is in a submenu, panel is the submenu's parent control.data = controlData - control.isHalfWidth = controlData.width == "half" local width = 510 -- set default width in case a custom parent object is passed if control.panel.GetWidth ~= nil then width = control.panel:GetWidth() - 60 end control:SetWidth(width) return control end - local function CreateLabelAndContainerControl(parent, controlData, controlName) local control = CreateBaseControl(parent, controlData, controlName) local width = control:GetWidth() - local container = wm:CreateControl(nil, control, CT_CONTROL) container:SetDimensions(width / 3, MIN_HEIGHT) control.container = container - local label = wm:CreateControl(nil, control, CT_LABEL) label:SetFont("ZoFontWinH4") label:SetHeight(MIN_HEIGHT) label:SetWrapMode(TEXT_WRAP_MODE_ELLIPSIS) label:SetText(GetStringFromValue(controlData.name)) control.label = label - if control.isHalfWidth then control:SetDimensions(width / 2, MIN_HEIGHT * 2 + HALF_WIDTH_LINE_SPACING) label:SetAnchor(TOPLEFT, control, TOPLEFT, 0, 0) @@ -110,21 +94,18 @@ local function CreateLabelAndContainerControl(parent, controlData, controlName) label:SetAnchor(TOPLEFT, control, TOPLEFT, 0, 0) label:SetAnchor(TOPRIGHT, container, TOPLEFT, 5, 0) end - control.data.tooltipText = GetStringFromValue(control.data.tooltip) control:SetMouseEnabled(true) control:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter) control:SetHandler("OnMouseExit", ZO_Options_OnMouseExit) return control end - local function GetTopPanel(panel) while panel.panel and panel.panel ~= panel do panel = panel.panel end return panel end - local function IsSame(objA, objB) if #objA ~= #objB then return false end for i = 1, #objA do @@ -132,10 +113,8 @@ local function IsSame(objA, objB) end return true end - local function RefreshReloadUIButton() lam.requiresReload = false - for i = 1, #controlsForReload do local reloadControl = controlsForReload[i] if not IsSame(reloadControl.startValue, {reloadControl.data.getFunc()}) then @@ -143,10 +122,8 @@ local function RefreshReloadUIButton() break end end - lam.applyButton:SetHidden(not lam.requiresReload) end - local function RequestRefreshIfNeeded(control) -- if our parent window wants to refresh controls, then fire the callback local panel = GetTopPanel(control.panel) @@ -156,7 +133,6 @@ local function RequestRefreshIfNeeded(control) end RefreshReloadUIButton() end - local function RegisterForRefreshIfNeeded(control) -- if our parent window wants to refresh controls, then add this to the list local panel = GetTopPanel(control.panel) @@ -165,14 +141,12 @@ local function RegisterForRefreshIfNeeded(control) tinsert(panel.controlsToRefresh or {}, control) -- prevent errors on custom panels end end - local function RegisterForReloadIfNeeded(control) if control.data.requiresReload then tinsert(controlsForReload, control) control.startValue = {control.data.getFunc()} end end - local function GetConfirmDialog() if(not ESO_Dialogs[LAM_CONFIRM_DIALOG]) then ESO_Dialogs[LAM_CONFIRM_DIALOG] = { @@ -196,7 +170,6 @@ local function GetConfirmDialog() end return ESO_Dialogs[LAM_CONFIRM_DIALOG] end - local function ShowConfirmationDialog(title, body, callback) local dialog = GetConfirmDialog() dialog.title.text = title @@ -204,7 +177,6 @@ local function ShowConfirmationDialog(title, body, callback) dialog.buttons[1].callback = callback ZO_Dialogs_ShowDialog(LAM_CONFIRM_DIALOG) end - local function GetDefaultsDialog() if(not ESO_Dialogs[LAM_DEFAULTS_DIALOG]) then ESO_Dialogs[LAM_DEFAULTS_DIALOG] = { @@ -228,7 +200,6 @@ local function GetDefaultsDialog() end return ESO_Dialogs[LAM_DEFAULTS_DIALOG] end - local function ShowDefaultsDialog(panel) local dialog = GetDefaultsDialog() dialog.buttons[1].callback = function() @@ -237,7 +208,6 @@ local function ShowDefaultsDialog(panel) end ZO_Dialogs_ShowDialog(LAM_DEFAULTS_DIALOG) end - local function DiscardChangesOnReloadControls() for i = 1, #controlsForReload do local reloadControl = controlsForReload[i] @@ -248,13 +218,11 @@ local function DiscardChangesOnReloadControls() lam.requiresReload = false lam.applyButton:SetHidden(true) end - local function StorePanelForReopening() local saveData = ZO_Ingame_SavedVariables["LAM"] or {} saveData.reopenPanel = lam.currentAddonPanel:GetName() ZO_Ingame_SavedVariables["LAM"] = saveData end - local function RetrievePanelForReopening() local saveData = ZO_Ingame_SavedVariables["LAM"] if(saveData) then @@ -262,16 +230,13 @@ local function RetrievePanelForReopening() return _G[saveData.reopenPanel] end end - local function HandleReloadUIPressed() StorePanelForReopening() ReloadUI() end - local function HandleLoadDefaultsPressed() ShowDefaultsDialog(lam.currentAddonPanel) end - local function GetReloadDialog() if(not ESO_Dialogs[LAM_RELOAD_DIALOG]) then ESO_Dialogs[LAM_RELOAD_DIALOG] = { @@ -297,20 +262,17 @@ local function GetReloadDialog() end return ESO_Dialogs[LAM_CONFIRM_DIALOG] end - local function ShowReloadDialogIfNeeded() if lam.requiresReload then local dialog = GetReloadDialog() ZO_Dialogs_ShowDialog(LAM_RELOAD_DIALOG) end end - local function UpdateWarning(control) local warning if control.data.warning ~= nil then warning = util.GetStringFromValue(control.data.warning) end - if control.data.requiresReload then if not warning then warning = string.format("|cff0000%s", util.L["RELOAD_UI_WARNING"]) @@ -318,7 +280,6 @@ local function UpdateWarning(control) warning = string.format("%s\n\n|cff0000%s", warning, util.L["RELOAD_UI_WARNING"]) end end - if not warning then control.warning:SetHidden(true) else @@ -326,7 +287,6 @@ local function UpdateWarning(control) control.warning:SetHidden(false) end end - local localization = { en = { PANEL_NAME = "Addons", @@ -432,7 +392,6 @@ local localization = { RELOAD_DIALOG_DISCARD_BUTTON = "Descarta", }, } - util.L = ZO_ShallowTableCopy(localization[GetCVar("Language.2")] or {}, localization["en"]) util.GetTooltipText = GetStringFromValue -- deprecated, use util.GetStringFromValue instead util.GetStringFromValue = GetStringFromValue @@ -445,12 +404,9 @@ util.RegisterForReloadIfNeeded = RegisterForReloadIfNeeded util.GetTopPanel = GetTopPanel util.ShowConfirmationDialog = ShowConfirmationDialog util.UpdateWarning = UpdateWarning - local ADDON_DATA_TYPE = 1 local RESELECTING_DURING_REBUILD = true local USER_REQUESTED_OPEN = true - - --INTERNAL FUNCTION --scrolls ZO_ScrollList `list` to move the row corresponding to `data` -- into view (does nothing if there is no such row in the list) @@ -460,27 +416,22 @@ local USER_REQUESTED_OPEN = true local function ScrollDataIntoView(list, data) local targetIndex = data.sortIndex if not targetIndex then return end - local scrollMin, scrollMax = list.scrollbar:GetMinMax() local scrollTop = list.scrollbar:GetValue() local controlHeight = list.uniformControlHeight or list.controlHeight local targetMin = controlHeight * (targetIndex - 1) - 64 -- subtracting 64 ain't arbitrary, it's the maximum fading height -- (libraries/zo_templates/scrolltemplates.lua/UpdateScrollFade) - if targetMin < scrollTop then ZO_ScrollList_ScrollAbsolute(list, zo_max(targetMin, scrollMin)) else local listHeight = ZO_ScrollList_GetHeight(list) local targetMax = controlHeight * targetIndex + 64 - listHeight - if targetMax > scrollTop then ZO_ScrollList_ScrollAbsolute(list, zo_min(targetMax, scrollMax)) end end end - - --INTERNAL FUNCTION --constructs a string pattern from the text in `searchEdit` control -- * metacharacters are escaped, losing their special meaning @@ -491,23 +442,17 @@ end local function GetSearchFilterFunc(searchEdit) local text = searchEdit:GetText():lower() local pattern = text:match("(%S+.-)%s*$") - if not pattern then -- nothing but whitespace return nil end - -- escape metacharacters, e.g. "ESO-Datenbank.de" => "ESO%-Datenbank%.de" pattern = pattern:gsub("[-*+?^$().[%]%%]", "%%%0") - -- replace whitespace with "match shortest anything" pattern = pattern:gsub("%s+", ".-") - return function(data) return data.filterText:lower():find(pattern) ~= nil end end - - --INTERNAL FUNCTION --populates `addonList` with entries from `addonsForList` -- addonList = ZO_ScrollList control @@ -517,9 +462,7 @@ local function PopulateAddonList(addonList, filter) local numEntries = 0 local selectedData = nil local selectionIsFinal = false - ZO_ScrollList_Clear(addonList) - for i, data in ipairs(addonsForList) do if not filter or filter(data) then local dataEntry = ZO_ScrollList_CreateDataEntry(ADDON_DATA_TYPE, data) @@ -541,9 +484,7 @@ local function PopulateAddonList(addonList, filter) data.sortIndex = nil end end - ZO_ScrollList_Commit(addonList) - if selectedData then if selectedData.panel == lam.currentAddonPanel then ZO_ScrollList_SelectData(addonList, selectedData, nil, RESELECTING_DURING_REBUILD) @@ -553,8 +494,6 @@ local function PopulateAddonList(addonList, filter) ScrollDataIntoView(addonList, selectedData) end end - - --METHOD: REGISTER WIDGET-- --each widget has its version checked before loading, --so we only have the most recent one in memory @@ -563,7 +502,6 @@ end -- widgetVersion = integer; the widget's version number LAMCreateControl = LAMCreateControl or {} local lamcc = LAMCreateControl - function lam:RegisterWidget(widgetType, widgetVersion) if widgets[widgetType] and widgets[widgetType] >= widgetVersion then return false @@ -572,7 +510,6 @@ function lam:RegisterWidget(widgetType, widgetVersion) return true end end - -- INTERNAL METHOD: hijacks the handlers for the actions in the OptionsWindow layer if not already done local function InitKeybindActions() if not lam.keybindsInitialized then @@ -595,7 +532,6 @@ local function InitKeybindActions() end) end end - -- INTERNAL METHOD: fires the LAM-PanelOpened callback if not already done local function OpenCurrentPanel() if lam.currentAddonPanel and not lam.currentPanelOpened then @@ -604,7 +540,6 @@ local function OpenCurrentPanel() cm:FireCallbacks("LAM-PanelOpened", lam.currentAddonPanel) end end - -- INTERNAL METHOD: fires the LAM-PanelClosed callback if not already done local function CloseCurrentPanel() if lam.currentAddonPanel and lam.currentPanelOpened then @@ -612,19 +547,15 @@ local function CloseCurrentPanel() cm:FireCallbacks("LAM-PanelClosed", lam.currentAddonPanel) end end - --METHOD: OPEN TO ADDON PANEL-- --opens to a specific addon's option panel --Usage: -- panel = userdata; the panel returned by the :RegisterOptionsPanel method local locSettings = GetString(SI_GAME_MENU_SETTINGS) function lam:OpenToPanel(panel) - -- find and select the panel's row in addon list - local addonList = lam.addonList local selectedData = nil - for _, addonData in ipairs(addonsForList) do if addonData.panel == panel then selectedData = addonData @@ -633,21 +564,16 @@ function lam:OpenToPanel(panel) break end end - ZO_ScrollList_SelectData(addonList, selectedData) ZO_ScrollList_RefreshVisible(addonList, selectedData) - local srchEdit = LAMAddonSettingsWindow:GetNamedChild("SearchFilterEdit") srchEdit:Clear() - -- note that ZO_ScrollList doesn't require `selectedData` to be actually -- present in the list, and that the list will only be populated once LAM -- "Addon Settings" menu entry is selected for the first time - local function openAddonSettingsMenu() local gameMenu = ZO_GameMenu_InGame.gameMenu local settingsMenu = gameMenu.headerControls[locSettings] - if settingsMenu then -- an instance of ZO_TreeNode local children = settingsMenu:GetChildren() for i = 1, (children and #children or 0) do @@ -661,7 +587,6 @@ function lam:OpenToPanel(panel) end end end - if sm:GetScene("gameMenuInGame"):GetState() == SCENE_SHOWN then openAddonSettingsMenu() else @@ -669,7 +594,6 @@ function lam:OpenToPanel(panel) sm:Show("gameMenuInGame") end end - local TwinOptionsContainer_Index = 0 local function TwinOptionsContainer(parent, leftWidget, rightWidget) TwinOptionsContainer_Index = TwinOptionsContainer_Index + 1 @@ -679,22 +603,17 @@ local function TwinOptionsContainer(parent, leftWidget, rightWidget) cParent, CT_CONTROL) container:SetResizeToFitDescendents(true) container:SetAnchor(select(2, leftWidget:GetAnchor(0) )) - leftWidget:ClearAnchors() leftWidget:SetAnchor(TOPLEFT, container, TOPLEFT) rightWidget:SetAnchor(TOPLEFT, leftWidget, TOPRIGHT, 5, 0) - leftWidget:SetWidth( leftWidget:GetWidth() - 2.5 ) -- fixes bad alignment with 'full' controls rightWidget:SetWidth( rightWidget:GetWidth() - 2.5 ) - leftWidget:SetParent(container) rightWidget:SetParent(container) - container.data = {type = "container"} container.panel = panel return container end - --INTERNAL FUNCTION --creates controls when options panel is first shown --controls anchoring of these controls in the panel @@ -706,13 +625,11 @@ local function CreateOptionsControls(panel) return true end optionsState[addonID] = OPTIONS_CREATION_RUNNING - local function CreationFinished() optionsState[addonID] = OPTIONS_CREATED cm:FireCallbacks("LAM-PanelControlsCreated", panel) OpenCurrentPanel() end - local optionsTable = addonToOptionsMap[addonID] if optionsTable then local function CreateAndAnchorWidget(parent, widgetData, offsetX, offsetY, anchorTarget, wasHalf) @@ -738,16 +655,13 @@ local function CreateOptionsControls(panel) return false, offsetY, anchorTarget, isHalf end end - local THROTTLE_TIMEOUT, THROTTLE_COUNT = 10, 20 local fifo = {} local anchorOffset, lastAddedControl, wasHalf local CreateWidgetsInPanel, err - local function PrepareForNextPanel() anchorOffset, lastAddedControl, wasHalf = 0, nil, false end - local function SetupCreationCalls(parent, widgetDataTable) fifo[#fifo + 1] = PrepareForNextPanel local count = #widgetDataTable @@ -758,7 +672,6 @@ local function CreateOptionsControls(panel) end return count ~= NonContiguousCount(widgetDataTable) end - CreateWidgetsInPanel = function(parent, widgetDataTable, startIndex, endIndex) for i=startIndex,endIndex do local widgetData = widgetDataTable[i] @@ -772,12 +685,10 @@ local function CreateOptionsControls(panel) wasHalf = false offsetX = 5 end - err, anchorOffset, lastAddedControl, wasHalf = CreateAndAnchorWidget(parent, widgetData, offsetX, anchorOffset, lastAddedControl, wasHalf) if err then PrintLater(("Could not create %s '%s' of %s."):format(widgetData.type, GetStringFromValue(widgetData.name or "unnamed"), addonID)) end - if isSubmenu then if SetupCreationCalls(lastAddedControl, widgetData.controls) then PrintLater(("The sub menu '%s' of %s is missing some entries."):format(GetStringFromValue(widgetData.name or "unnamed"), addonID)) @@ -786,7 +697,6 @@ local function CreateOptionsControls(panel) end end end - local function DoCreateSettings() if #fifo > 0 then local nextCall = table.remove(fifo, 1) @@ -800,7 +710,6 @@ local function CreateOptionsControls(panel) CreationFinished() end end - if SetupCreationCalls(panel, optionsTable) then PrintLater(("The settings menu of %s is missing some entries."):format(addonID)) end @@ -808,10 +717,8 @@ local function CreateOptionsControls(panel) else CreationFinished() end - return true end - --INTERNAL FUNCTION --handles switching between panels local function ToggleAddonPanels(panel) --called in OnShow of newly shown panel @@ -821,19 +728,14 @@ local function ToggleAddonPanels(panel) --called in OnShow of newly shown panel CloseCurrentPanel() end lam.currentAddonPanel = panel - -- refresh visible rows to reflect panel IsHidden status ZO_ScrollList_RefreshVisible(lam.addonList) - if not CreateOptionsControls(panel) then OpenCurrentPanel() end - cm:FireCallbacks("LAM-RefreshPanel", panel) end - local CheckSafetyAndInitialize - --METHOD: REGISTER ADDON PANEL --registers your addon with LibAddonMenu and creates a panel --Usage: @@ -846,34 +748,26 @@ function lam:RegisterAddonPanel(addonID, panelData) panel:SetHidden(true) panel:SetAnchorFill(container) panel:SetHandler("OnShow", ToggleAddonPanels) - local function stripMarkup(str) return str:gsub("|[Cc]%x%x%x%x%x%x", ""):gsub("|[Rr]", "") end - local filterParts = {panelData.name, nil, nil} -- append keywords and author separately, the may be nil filterParts[#filterParts + 1] = panelData.keywords filterParts[#filterParts + 1] = panelData.author - local addonData = { panel = panel, name = stripMarkup(panelData.name), filterText = stripMarkup(tconcat(filterParts, "\t")):lower(), } - tinsert(addonsForList, addonData) - if panelData.slashCommand then SLASH_COMMANDS[panelData.slashCommand] = function() lam:OpenToPanel(panel) end end - return panel --return for authors creating options manually end - - --METHOD: REGISTER OPTION CONTROLS --registers the options you want shown for your addon --these are stored in a table where each key-value pair is the order @@ -886,7 +780,6 @@ end function lam:RegisterOptionControls(addonID, optionsTable) --optionsTable = {sliderData, buttonData, etc} addonToOptionsMap[addonID] = optionsTable end - --INTERNAL FUNCTION --creates LAM's Addon Settings entry in ZO_GameMenu local function CreateAddonSettingsMenuEntry() @@ -894,21 +787,15 @@ local function CreateAddonSettingsMenuEntry() id = KEYBOARD_OPTIONS.currentPanelId, name = util.L["PANEL_NAME"], } - KEYBOARD_OPTIONS.currentPanelId = panelData.id + 1 KEYBOARD_OPTIONS.panelNames[panelData.id] = panelData.name - lam.panelId = panelData.id - local addonListSorted = false - function panelData.callback() sm:AddFragment(lam:GetAddonSettingsFragment()) KEYBOARD_OPTIONS:ChangePanels(lam.panelId) - local title = LAMAddonSettingsWindow:GetNamedChild("Title") title:SetText(panelData.name) - if not addonListSorted and #addonsForList > 0 then local searchEdit = LAMAddonSettingsWindow:GetNamedChild("SearchFilterEdit") --we're about to show our list for the first time - let's sort it @@ -917,38 +804,30 @@ local function CreateAddonSettingsMenuEntry() addonListSorted = true end end - function panelData.unselectedCallback() sm:RemoveFragment(lam:GetAddonSettingsFragment()) if SetCameraOptionsPreviewModeEnabled then -- available since API version 100011 SetCameraOptionsPreviewModeEnabled(false) end end - ZO_GameMenu_AddSettingPanel(panelData) end - - --INTERNAL FUNCTION --creates the left-hand menu in LAM's window local function CreateAddonList(name, parent) local addonList = wm:CreateControlFromVirtual(name, parent, "ZO_ScrollList") - local function addonListRow_OnMouseDown(control, button) if button == 1 then local data = ZO_ScrollList_GetData(control) ZO_ScrollList_SelectData(addonList, data, control) end end - local function addonListRow_OnMouseEnter(control) ZO_ScrollList_MouseEnter(addonList, control) end - local function addonListRow_OnMouseExit(control) ZO_ScrollList_MouseExit(addonList, control) end - local function addonListRow_Select(previouslySelectedData, selectedData, reselectingDuringRebuild) if not reselectingDuringRebuild then if previouslySelectedData then @@ -960,21 +839,17 @@ local function CreateAddonList(name, parent) end end end - local function addonListRow_Setup(control, data) control:SetText(data.name) control:SetSelected(not data.panel:IsHidden()) end - ZO_ScrollList_AddDataType(addonList, ADDON_DATA_TYPE, "ZO_SelectableLabel", 28, addonListRow_Setup) -- I don't know how to make highlights clear properly; they often -- get stuck and after a while the list is full of highlighted rows --ZO_ScrollList_EnableHighlight(addonList, "ZO_ThinListHighlight") ZO_ScrollList_EnableSelection(addonList, "ZO_ThinListHighlight", addonListRow_Select) - local addonDataType = ZO_ScrollList_GetDataTypeTable(addonList, ADDON_DATA_TYPE) local addonListRow_CreateRaw = addonDataType.pool.m_Factory - local function addonListRow_Create(pool) local control = addonListRow_CreateRaw(pool) control:SetHandler("OnMouseDown", addonListRow_OnMouseDown) @@ -987,44 +862,34 @@ local function CreateAddonList(name, parent) control:SetWrapMode(TEXT_WRAP_MODE_ELLIPSIS) return control end - addonDataType.pool.m_Factory = addonListRow_Create - return addonList end - - --INTERNAL FUNCTION local function CreateSearchFilterBox(name, parent) local boxControl = wm:CreateControl(name, parent, CT_CONTROL) - local srchButton = wm:CreateControl("$(parent)Button", boxControl, CT_BUTTON) srchButton:SetDimensions(32, 32) srchButton:SetAnchor(LEFT, nil, LEFT, 2, 0) srchButton:SetNormalTexture("EsoUI/Art/LFG/LFG_tabIcon_groupTools_up.dds") srchButton:SetPressedTexture("EsoUI/Art/LFG/LFG_tabIcon_groupTools_down.dds") srchButton:SetMouseOverTexture("EsoUI/Art/LFG/LFG_tabIcon_groupTools_over.dds") - local srchEdit = wm:CreateControlFromVirtual("$(parent)Edit", boxControl, "ZO_DefaultEdit") srchEdit:SetAnchor(LEFT, srchButton, RIGHT, 4, 1) srchEdit:SetAnchor(RIGHT, nil, RIGHT, -4, 1) srchEdit:SetColor(ZO_NORMAL_TEXT:UnpackRGBA()) - local srchBg = wm:CreateControl("$(parent)Bg", boxControl, CT_BACKDROP) srchBg:SetAnchorFill() srchBg:SetAlpha(0) srchBg:SetCenterColor(0, 0, 0, 0.5) srchBg:SetEdgeColor(ZO_DISABLED_TEXT:UnpackRGBA()) srchBg:SetEdgeTexture("", 1, 1, 0, 0) - -- search backdrop should appear whenever you hover over either -- the magnifying glass button or the edit field (which is only -- visible when it contains some text), and also while the edit -- field has keyboard focus - local srchActive = false local srchHover = false - local function srchBgUpdateAlpha() if srchActive or srchEdit:HasFocus() then srchBg:SetAlpha(srchHover and 0.8 or 0.6) @@ -1032,27 +897,21 @@ local function CreateSearchFilterBox(name, parent) srchBg:SetAlpha(srchHover and 0.6 or 0.0) end end - local function srchMouseEnter(control) srchHover = true srchBgUpdateAlpha() end - local function srchMouseExit(control) srchHover = false srchBgUpdateAlpha() end - boxControl:SetMouseEnabled(true) boxControl:SetHitInsets(1, 1, -1, -1) boxControl:SetHandler("OnMouseEnter", srchMouseEnter) boxControl:SetHandler("OnMouseExit", srchMouseExit) - srchButton:SetHandler("OnMouseEnter", srchMouseEnter) srchButton:SetHandler("OnMouseExit", srchMouseExit) - local focusLostTime = 0 - srchButton:SetHandler("OnClicked", function(self) srchEdit:Clear() if GetFrameTimeMilliseconds() - focusLostTime < 100 then @@ -1062,21 +921,17 @@ local function CreateSearchFilterBox(name, parent) srchEdit:TakeFocus() end end) - srchEdit:SetHandler("OnMouseEnter", srchMouseEnter) srchEdit:SetHandler("OnMouseExit", srchMouseExit) srchEdit:SetHandler("OnFocusGained", srchBgUpdateAlpha) - srchEdit:SetHandler("OnFocusLost", function() focusLostTime = GetFrameTimeMilliseconds() srchBgUpdateAlpha() end) - srchEdit:SetHandler("OnEscape", function(self) self:Clear() self:LoseFocus() end) - srchEdit:SetHandler("OnTextChanged", function(self) local filterFunc = GetSearchFilterFunc(self) if filterFunc then @@ -1092,101 +947,75 @@ local function CreateSearchFilterBox(name, parent) PopulateAddonList(lam.addonList, filterFunc) PlaySound(SOUNDS.SPINNER_DOWN) end) - return boxControl end - - --INTERNAL FUNCTION --creates LAM's Addon Settings top-level window local function CreateAddonSettingsWindow() local tlw = wm:CreateTopLevelWindow("LAMAddonSettingsWindow") tlw:SetHidden(true) tlw:SetDimensions(1010, 914) -- same height as ZO_OptionsWindow - ZO_ReanchorControlForLeftSidePanel(tlw) - -- create black background for the window (mimic ZO_RightFootPrintBackground) - local bgLeft = wm:CreateControl("$(parent)BackgroundLeft", tlw, CT_TEXTURE) bgLeft:SetTexture("EsoUI/Art/Miscellaneous/centerscreen_left.dds") bgLeft:SetDimensions(1024, 1024) bgLeft:SetAnchor(TOPLEFT, nil, TOPLEFT) bgLeft:SetDrawLayer(DL_BACKGROUND) bgLeft:SetExcludeFromResizeToFitExtents(true) - local bgRight = wm:CreateControl("$(parent)BackgroundRight", tlw, CT_TEXTURE) bgRight:SetTexture("EsoUI/Art/Miscellaneous/centerscreen_right.dds") bgRight:SetDimensions(64, 1024) bgRight:SetAnchor(TOPLEFT, bgLeft, TOPRIGHT) bgRight:SetDrawLayer(DL_BACKGROUND) bgRight:SetExcludeFromResizeToFitExtents(true) - -- create gray background for addon list (mimic ZO_TreeUnderlay) - local underlayLeft = wm:CreateControl("$(parent)UnderlayLeft", tlw, CT_TEXTURE) underlayLeft:SetTexture("EsoUI/Art/Miscellaneous/centerscreen_indexArea_left.dds") underlayLeft:SetDimensions(256, 1024) underlayLeft:SetAnchor(TOPLEFT, bgLeft, TOPLEFT) underlayLeft:SetDrawLayer(DL_BACKGROUND) underlayLeft:SetExcludeFromResizeToFitExtents(true) - local underlayRight = wm:CreateControl("$(parent)UnderlayRight", tlw, CT_TEXTURE) underlayRight:SetTexture("EsoUI/Art/Miscellaneous/centerscreen_indexArea_right.dds") underlayRight:SetDimensions(128, 1024) underlayRight:SetAnchor(TOPLEFT, underlayLeft, TOPRIGHT) underlayRight:SetDrawLayer(DL_BACKGROUND) underlayRight:SetExcludeFromResizeToFitExtents(true) - -- create title bar (mimic ZO_OptionsWindow) - local title = wm:CreateControl("$(parent)Title", tlw, CT_LABEL) title:SetAnchor(TOPLEFT, nil, TOPLEFT, 65, 70) title:SetFont("ZoFontWinH1") title:SetModifyTextType(MODIFY_TEXT_TYPE_UPPERCASE) - local divider = wm:CreateControlFromVirtual("$(parent)Divider", tlw, "ZO_Options_Divider") divider:SetAnchor(TOPLEFT, nil, TOPLEFT, 65, 108) - -- create search filter box - local srchBox = CreateSearchFilterBox("$(parent)SearchFilter", tlw) srchBox:SetAnchor(TOPLEFT, nil, TOPLEFT, 63, 120) srchBox:SetDimensions(260, 30) - -- create scrollable addon list - local addonList = CreateAddonList("$(parent)AddonList", tlw) addonList:SetAnchor(TOPLEFT, nil, TOPLEFT, 65, 160) addonList:SetDimensions(285, 665) - lam.addonList = addonList -- for easy access from elsewhere - -- create container for option panels - local panelContainer = wm:CreateControl("$(parent)PanelContainer", tlw, CT_CONTROL) panelContainer:SetAnchor(TOPLEFT, nil, TOPLEFT, 365, 120) panelContainer:SetDimensions(645, 675) - local defaultButton = wm:CreateControlFromVirtual("$(parent)ResetToDefaultButton", tlw, "ZO_DialogButton") ZO_KeybindButtonTemplate_Setup(defaultButton, "OPTIONS_LOAD_DEFAULTS", HandleLoadDefaultsPressed, GetString(SI_OPTIONS_DEFAULTS)) defaultButton:SetAnchor(TOPLEFT, panelContainer, BOTTOMLEFT, 0, 2) lam.defaultButton = defaultButton - local applyButton = wm:CreateControlFromVirtual("$(parent)ApplyButton", tlw, "ZO_DialogButton") ZO_KeybindButtonTemplate_Setup(applyButton, "OPTIONS_APPLY_CHANGES", HandleReloadUIPressed, GetString(SI_ADDON_MANAGER_RELOAD)) applyButton:SetAnchor(TOPRIGHT, panelContainer, BOTTOMRIGHT, 0, 2) applyButton:SetHidden(true) lam.applyButton = applyButton - return tlw end - - --INITIALIZING local safeToInitialize = false local hasInitialized = false - local eventHandle = table.concat({MAJOR, MINOR}, "r") local function OnLoad(_, addonName) -- wait for the first loaded event @@ -1194,18 +1023,15 @@ local function OnLoad(_, addonName) safeToInitialize = true end em:RegisterForEvent(eventHandle, EVENT_ADD_ON_LOADED, OnLoad) - local function OnActivated(_, initial) em:UnregisterForEvent(eventHandle, EVENT_PLAYER_ACTIVATED) FlushMessages() - local reopenPanel = RetrievePanelForReopening() if not initial and reopenPanel then lam:OpenToPanel(reopenPanel) end end em:RegisterForEvent(eventHandle, EVENT_PLAYER_ACTIVATED, OnActivated) - function CheckSafetyAndInitialize(addonID) if not safeToInitialize then local msg = string.format("The panel with id '%s' was registered before addon loading has completed. This might break the AddOn Settings menu.", addonID) @@ -1215,16 +1041,12 @@ function CheckSafetyAndInitialize(addonID) hasInitialized = true end end - - --TODO documentation function lam:GetAddonPanelContainer() local fragment = lam:GetAddonSettingsFragment() local window = fragment:GetControl() return window:GetNamedChild("PanelContainer") end - - --TODO documentation function lam:GetAddonSettingsFragment() assert(hasInitialized or safeToInitialize) @@ -1245,4 +1067,4 @@ function lam:GetAddonSettingsFragment() CreateAddonSettingsMenuEntry() end return LAMAddonSettingsFragment -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/button.lua b/libs/LibAddonMenu-2.0/controls/button.lua index 82b5032..23cd283 100644 --- a/libs/LibAddonMenu-2.0/controls/button.lua +++ b/libs/LibAddonMenu-2.0/controls/button.lua @@ -10,13 +10,10 @@ warning = "Will need to reload the UI.", --(optional) reference = "MyAddonButton", -- unique global reference to control (optional) } ]] - local widgetVersion = 11 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("button", widgetVersion) then return end - local wm = WINDOW_MANAGER - local function UpdateDisabled(control) local disable = control.data.disabled if type(disable) == "function" then @@ -24,21 +21,18 @@ local function UpdateDisabled(control) end control.button:SetEnabled(not disable) end - --controlName is optional local MIN_HEIGHT = 28 -- default_button height local HALF_WIDTH_LINE_SPACING = 2 function LAMCreateControl.button(parent, buttonData, controlName) local control = LAM.util.CreateBaseControl(parent, buttonData, controlName) control:SetMouseEnabled(true) - local width = control:GetWidth() if control.isHalfWidth then control:SetDimensions(width / 2, MIN_HEIGHT * 2 + HALF_WIDTH_LINE_SPACING) else control:SetDimensions(width, MIN_HEIGHT) end - if buttonData.icon then control.button = wm:CreateControl(nil, control, CT_BUTTON) control.button:SetDimensions(26, 26) @@ -63,7 +57,6 @@ function LAMCreateControl.button(parent, buttonData, controlName) buttonData.func(unpack(args)) LAM.util.RequestRefreshIfNeeded(control) end - if(buttonData.isDangerous) then local title = LAM.util.GetStringFromValue(buttonData.name) local body = LAM.util.GetStringFromValue(buttonData.warning) @@ -72,20 +65,16 @@ function LAMCreateControl.button(parent, buttonData, controlName) callback() end end) - if buttonData.warning ~= nil then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") control.warning:SetAnchor(RIGHT, button, LEFT, -5, 0) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - if buttonData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/checkbox.lua b/libs/LibAddonMenu-2.0/controls/checkbox.lua index 6696dd7..707c2df 100644 --- a/libs/LibAddonMenu-2.0/controls/checkbox.lua +++ b/libs/LibAddonMenu-2.0/controls/checkbox.lua @@ -11,14 +11,10 @@ default = defaults.var, -- a boolean or function that returns a boolean (optional) reference = "MyAddonCheckbox", -- unique global reference to control (optional) } ]] - - local widgetVersion = 14 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("checkbox", widgetVersion) then return end - local wm = WINDOW_MANAGER - --label local enabledColor = ZO_DEFAULT_ENABLED_COLOR local enabledHLcolor = ZO_HIGHLIGHT_TEXT @@ -27,8 +23,6 @@ local disabledHLcolor = ZO_DEFAULT_DISABLED_MOUSEOVER_COLOR --checkbox local checkboxColor = ZO_NORMAL_TEXT local checkboxHLcolor = ZO_HIGHLIGHT_TEXT - - local function UpdateDisabled(control) local disable if type(control.data.disabled) == "function" then @@ -36,15 +30,12 @@ local function UpdateDisabled(control) else disable = control.data.disabled end - control.label:SetColor((disable and ZO_DEFAULT_DISABLED_COLOR or control.value and ZO_DEFAULT_ENABLED_COLOR or ZO_DEFAULT_DISABLED_COLOR):UnpackRGBA()) control.checkbox:SetColor((disable and ZO_DEFAULT_DISABLED_COLOR or ZO_NORMAL_TEXT):UnpackRGBA()) --control:SetMouseEnabled(not disable) --control:SetMouseEnabled(true) - control.isDisabled = disable end - local function ToggleCheckbox(control) if control.value then control.label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) @@ -54,7 +45,6 @@ local function ToggleCheckbox(control) control.checkbox:SetText(control.uncheckedText) end end - local function UpdateValue(control, forceDefault, value) if forceDefault then --if we are forcing defaults value = LAM.util.GetDefaultValue(control.data.default) @@ -67,15 +57,11 @@ local function UpdateValue(control, forceDefault, value) value = control.data.getFunc() end control.value = value - ToggleCheckbox(control) end - local function OnMouseEnter(control) ZO_Options_OnMouseEnter(control) - if control.isDisabled then return end - local label = control.label if control.value then label:SetColor(ZO_HIGHLIGHT_TEXT:UnpackRGBA()) @@ -84,12 +70,9 @@ local function OnMouseEnter(control) end control.checkbox:SetColor(ZO_HIGHLIGHT_TEXT:UnpackRGBA()) end - local function OnMouseExit(control) ZO_Options_OnMouseExit(control) - if control.isDisabled then return end - local label = control.label if control.value then label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) @@ -98,7 +81,6 @@ local function OnMouseExit(control) end control.checkbox:SetColor(ZO_NORMAL_TEXT:UnpackRGBA()) end - --controlName is optional function LAMCreateControl.checkbox(parent, checkboxData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, checkboxData, controlName) @@ -110,7 +92,6 @@ function LAMCreateControl.checkbox(parent, checkboxData, controlName) control.value = not control.value control:UpdateValue(false, control.value) end) - control.checkbox = wm:CreateControl(nil, control.container, CT_LABEL) local checkbox = control.checkbox checkbox:SetAnchor(LEFT, control.container, LEFT, 0, 0) @@ -118,25 +99,20 @@ function LAMCreateControl.checkbox(parent, checkboxData, controlName) checkbox:SetColor(ZO_NORMAL_TEXT:UnpackRGBA()) control.checkedText = GetString(SI_CHECK_BUTTON_ON):upper() control.uncheckedText = GetString(SI_CHECK_BUTTON_OFF):upper() - if checkboxData.warning ~= nil or checkboxData.requiresReload then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") control.warning:SetAnchor(RIGHT, checkbox, LEFT, -5, 0) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - control.data.tooltipText = LAM.util.GetStringFromValue(checkboxData.tooltip) - control.UpdateValue = UpdateValue control:UpdateValue() if checkboxData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) LAM.util.RegisterForReloadIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/colorpicker.lua b/libs/LibAddonMenu-2.0/controls/colorpicker.lua index a57aab0..637eef8 100644 --- a/libs/LibAddonMenu-2.0/controls/colorpicker.lua +++ b/libs/LibAddonMenu-2.0/controls/colorpicker.lua @@ -11,14 +11,10 @@ default = {r = defaults.r, g = defaults.g, b = defaults.b, a = defaults.a}, --(optional) table of default color values (or default = defaultColor, where defaultColor is a table with keys of r, g, b[, a]) or a function that returns the color reference = "MyAddonColorpicker" -- unique global reference to control (optional) } ]] - - local widgetVersion = 13 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("colorpicker", widgetVersion) then return end - local wm = WINDOW_MANAGER - local function UpdateDisabled(control) local disable if type(control.data.disabled) == "function" then @@ -26,16 +22,13 @@ local function UpdateDisabled(control) else disable = control.data.disabled end - if disable then control.label:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) else control.label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) end - control.isDisabled = disable end - local function UpdateValue(control, forceDefault, valueR, valueG, valueB, valueA) if forceDefault then --if we are forcing defaults local color = LAM.util.GetDefaultValue(control.data.default) @@ -48,59 +41,46 @@ local function UpdateValue(control, forceDefault, valueR, valueG, valueB, valueA else valueR, valueG, valueB, valueA = control.data.getFunc() end - control.thumb:SetColor(valueR, valueG, valueB, valueA or 1) end - function LAMCreateControl.colorpicker(parent, colorpickerData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, colorpickerData, controlName) - control.color = control.container local color = control.color - control.thumb = wm:CreateControl(nil, color, CT_TEXTURE) local thumb = control.thumb thumb:SetDimensions(36, 18) thumb:SetAnchor(LEFT, color, LEFT, 4, 0) - color.border = wm:CreateControl(nil, color, CT_TEXTURE) local border = color.border border:SetTexture("EsoUI\\Art\\ChatWindow\\chatOptions_bgColSwatch_frame.dds") border:SetTextureCoords(0, .625, 0, .8125) border:SetDimensions(40, 22) border:SetAnchor(CENTER, thumb, CENTER, 0, 0) - local function ColorPickerCallback(r, g, b, a) control:UpdateValue(false, r, g, b, a) end - control:SetHandler("OnMouseUp", function(self, btn, upInside) if self.isDisabled then return end - if upInside then local r, g, b, a = colorpickerData.getFunc() COLOR_PICKER:Show(ColorPickerCallback, r, g, b, a, LAM.util.GetStringFromValue(colorpickerData.name)) end end) - if colorpickerData.warning ~= nil or colorpickerData.requiresReload then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") control.warning:SetAnchor(RIGHT, control.color, LEFT, -5, 0) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - control.data.tooltipText = LAM.util.GetStringFromValue(colorpickerData.tooltip) - control.UpdateValue = UpdateValue control:UpdateValue() if colorpickerData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) LAM.util.RegisterForReloadIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/custom.lua b/libs/LibAddonMenu-2.0/controls/custom.lua index 40a7c42..bd4b7db 100644 --- a/libs/LibAddonMenu-2.0/controls/custom.lua +++ b/libs/LibAddonMenu-2.0/controls/custom.lua @@ -4,32 +4,25 @@ refreshFunc = function(customControl) end, --(optional) function to call when panel/controls refresh width = "full", --or "half" (optional) } ]] - local widgetVersion = 7 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("custom", widgetVersion) then return end - local function UpdateValue(control) if control.data.refreshFunc then control.data.refreshFunc(control) end end - local MIN_HEIGHT = 26 function LAMCreateControl.custom(parent, customData, controlName) local control = LAM.util.CreateBaseControl(parent, customData, controlName) local width = control:GetWidth() control:SetResizeToFitDescendents(true) - if control.isHalfWidth then --note these restrictions control:SetDimensionConstraints(width / 2, MIN_HEIGHT, width / 2, MIN_HEIGHT * 4) else control:SetDimensionConstraints(width, MIN_HEIGHT, width, MIN_HEIGHT * 4) end - control.UpdateValue = UpdateValue - LAM.util.RegisterForRefreshIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/description.lua b/libs/LibAddonMenu-2.0/controls/description.lua index da207a0..73514c7 100644 --- a/libs/LibAddonMenu-2.0/controls/description.lua +++ b/libs/LibAddonMenu-2.0/controls/description.lua @@ -5,40 +5,32 @@ width = "full", --or "half" (optional) reference = "MyAddonDescription" -- unique global reference to control (optional) } ]] - - local widgetVersion = 8 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("description", widgetVersion) then return end - local wm = WINDOW_MANAGER - local function UpdateValue(control) if control.title then control.title:SetText(LAM.util.GetStringFromValue(control.data.title)) end control.desc:SetText(LAM.util.GetStringFromValue(control.data.text)) end - function LAMCreateControl.description(parent, descriptionData, controlName) local control = LAM.util.CreateBaseControl(parent, descriptionData, controlName) local isHalfWidth = control.isHalfWidth local width = control:GetWidth() control:SetResizeToFitDescendents(true) - if isHalfWidth then control:SetDimensionConstraints(width / 2, 0, width / 2, 0) else control:SetDimensionConstraints(width, 0, width, 0) end - control.desc = wm:CreateControl(nil, control, CT_LABEL) local desc = control.desc desc:SetVerticalAlignment(TEXT_ALIGN_TOP) desc:SetFont("ZoFontGame") desc:SetText(LAM.util.GetStringFromValue(descriptionData.text)) desc:SetWidth(isHalfWidth and width / 2 or width) - if descriptionData.title then control.title = wm:CreateControl(nil, control, CT_LABEL) local title = control.title @@ -50,11 +42,7 @@ function LAMCreateControl.description(parent, descriptionData, controlName) else desc:SetAnchor(TOPLEFT) end - control.UpdateValue = UpdateValue - LAM.util.RegisterForRefreshIfNeeded(control) - return control - -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/desktop.ini b/libs/LibAddonMenu-2.0/controls/desktop.ini index df8fdc8..34efc9d 100644 Binary files a/libs/LibAddonMenu-2.0/controls/desktop.ini and b/libs/LibAddonMenu-2.0/controls/desktop.ini differ diff --git a/libs/LibAddonMenu-2.0/controls/divider.lua b/libs/LibAddonMenu-2.0/controls/divider.lua index 8089539..bdf8467 100644 --- a/libs/LibAddonMenu-2.0/controls/divider.lua +++ b/libs/LibAddonMenu-2.0/controls/divider.lua @@ -5,41 +5,32 @@ alpha = 0.25, (optional) reference = "MyAddonDivider" -- unique global reference to control (optional) } ]] - - local widgetVersion = 2 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("divider", widgetVersion) then return end - local wm = WINDOW_MANAGER - local MIN_HEIGHT = 10 local MAX_HEIGHT = 50 local MIN_ALPHA = 0 local MAX_ALPHA = 1 local DEFAULT_ALPHA = 0.25 - local function GetValueInRange(value, min, max, default) if not value or type(value) ~= "number" then return default end return math.min(math.max(min, value), max) end - function LAMCreateControl.divider(parent, dividerData, controlName) local control = LAM.util.CreateBaseControl(parent, dividerData, controlName) local isHalfWidth = control.isHalfWidth local width = control:GetWidth() local height = GetValueInRange(dividerData.height, MIN_HEIGHT, MAX_HEIGHT, MIN_HEIGHT) local alpha = GetValueInRange(dividerData.alpha, MIN_ALPHA, MAX_ALPHA, DEFAULT_ALPHA) - control:SetDimensions(isHalfWidth and width / 2 or width, height) - control.divider = wm:CreateControlFromVirtual(nil, control, "ZO_Options_Divider") local divider = control.divider divider:SetWidth(isHalfWidth and width / 2 or width) divider:SetAnchor(TOPLEFT) divider:SetAlpha(alpha) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/dropdown.lua b/libs/LibAddonMenu-2.0/controls/dropdown.lua index 70e23bb..b93be86 100644 --- a/libs/LibAddonMenu-2.0/controls/dropdown.lua +++ b/libs/LibAddonMenu-2.0/controls/dropdown.lua @@ -16,14 +16,11 @@ default = defaults.var, -- default value or function that returns the default value (optional) reference = "MyAddonDropdown" -- unique global reference to control (optional) } ]] - - local widgetVersion = 18 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("dropdown", widgetVersion) then return end - local wm = WINDOW_MANAGER -local SORT_BY_VALUE = { ["value"] = {} } +local SORT_BY_VALUE = { ["value"] = {} } local SORT_BY_VALUE_NUMERIC = { ["value"] = { isNumeric = true } } local SORT_TYPES = { name = ZO_SORT_BY_NAME, @@ -35,7 +32,6 @@ local SORT_ORDERS = { up = ZO_SORT_ORDER_UP, down = ZO_SORT_ORDER_DOWN, } - local function UpdateDisabled(control) local disable if type(control.data.disabled) == "function" then @@ -43,7 +39,6 @@ local function UpdateDisabled(control) else disable = control.data.disabled end - control.dropdown:SetEnabled(not disable) if disable then control.label:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) @@ -51,7 +46,6 @@ local function UpdateDisabled(control) control.label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) end end - local function UpdateValue(control, forceDefault, value) if forceDefault then --if we are forcing defaults value = LAM.util.GetDefaultValue(control.data.default) @@ -66,11 +60,9 @@ local function UpdateValue(control, forceDefault, value) control.dropdown:SetSelectedItem(control.choices[value]) end end - local function DropdownCallback(control, choiceText, choice) choice.control:UpdateValue(false, choice.value or choiceText) end - local function SetupTooltips(comboBox, choicesTooltips) local function ShowTooltip(control) InitializeTooltip(InformationTooltip, control, TOPLEFT, 0, 0, BOTTOMRIGHT) @@ -80,7 +72,6 @@ local function SetupTooltips(comboBox, choicesTooltips) local function HideTooltip(control) ClearTooltip(InformationTooltip) end - -- allow for tooltips on the drop down entries local originalShow = comboBox.ShowDropdownInternal comboBox.ShowDropdownInternal = function(comboBox) @@ -96,7 +87,6 @@ local function SetupTooltips(comboBox, choicesTooltips) ZO_PreHookHandler(control, "OnMouseExit", HideTooltip) end end - local originalHide = comboBox.HideDropdownInternal comboBox.HideDropdownInternal = function(self) local entries = ZO_Menu.items @@ -110,27 +100,22 @@ local function SetupTooltips(comboBox, choicesTooltips) originalHide(self) end end - local function UpdateChoices(control, choices, choicesValues, choicesTooltips) control.dropdown:ClearItems() --remove previous choices --(need to call :SetSelectedItem()?) ZO_ClearTable(control.choices) - --build new list of choices local choices = choices or control.data.choices local choicesValues = choicesValues or control.data.choicesValues local choicesTooltips = choicesTooltips or control.data.choicesTooltips - if choicesValues then assert(#choices == #choicesValues, "choices and choicesValues need to have the same size") end - if choicesTooltips then assert(#choices == #choicesTooltips, "choices and choicesTooltips need to have the same size") if not control.scrollHelper then -- only do this for non-scrollable SetupTooltips(control.dropdown, choicesTooltips) end end - for i = 1, #choices do local entry = control.dropdown:CreateItemEntry(choices[i], DropdownCallback) entry.control = control @@ -144,17 +129,14 @@ local function UpdateChoices(control, choices, choicesValues, choicesTooltips) control.dropdown:AddItem(entry, not control.data.sort and ZO_COMBOBOX_SUPRESS_UPDATE) --if sort type/order isn't specified, then don't sort end end - local function GrabSortingInfo(sortInfo) local t, i = {}, 1 for info in string.gmatch(sortInfo, "([^%-]+)") do t[i] = info i = i + 1 end - return t end - local DEFAULT_VISIBLE_ROWS = 10 local SCROLLABLE_ENTRY_TEMPLATE_HEIGHT = 25 -- same as in zo_combobox.lua local CONTENT_PADDING = 24 @@ -162,13 +144,11 @@ local SCROLLBAR_PADDING = 16 local PADDING = GetMenuPadding() / 2 -- half the amount looks closer to the regular dropdown local ROUNDING_MARGIN = 0.01 -- needed to avoid rare issue with too many anchors processed local ScrollableDropdownHelper = ZO_Object:Subclass() - function ScrollableDropdownHelper:New(...) local object = ZO_Object.New(self) object:Initialize(...) return object end - function ScrollableDropdownHelper:Initialize(parent, control, visibleRows) local combobox = control.combobox local dropdown = control.dropdown @@ -177,21 +157,17 @@ function ScrollableDropdownHelper:Initialize(parent, control, visibleRows) self.combobox = combobox self.dropdown = dropdown self.visibleRows = visibleRows - -- clear anchors so we can adjust the width dynamically dropdown.m_dropdown:ClearAnchors() dropdown.m_dropdown:SetAnchor(TOPLEFT, combobox, BOTTOMLEFT) - -- handle dropdown or settingsmenu opening/closing local function onShow() self:OnShow() end local function onHide() self:OnHide() end local function doHide() self:DoHide() end - ZO_PreHook(dropdown, "ShowDropdownOnMouseUp", onShow) ZO_PreHook(dropdown, "HideDropdownInternal", onHide) combobox:SetHandler("OnEffectivelyHidden", onHide) parent:SetHandler("OnEffectivelyHidden", doHide) - -- dont fade entries near the edges local scrollList = dropdown.m_scroll scrollList.selectionTemplate = nil @@ -199,7 +175,6 @@ function ScrollableDropdownHelper:Initialize(parent, control, visibleRows) ZO_ScrollList_EnableSelection(scrollList, "ZO_SelectionHighlight") ZO_ScrollList_EnableHighlight(scrollList, "ZO_SelectionHighlight") ZO_Scroll_SetUseFadeGradient(scrollList, false) - -- adjust scroll content anchor to mimic menu padding local scroll = dropdown.m_dropdown:GetNamedChild("Scroll") local anchor1 = {scroll:GetAnchor(0)} @@ -208,11 +183,9 @@ function ScrollableDropdownHelper:Initialize(parent, control, visibleRows) scroll:SetAnchor(anchor1[2], anchor1[3], anchor1[4], anchor1[5] + PADDING, anchor1[6] + PADDING) scroll:SetAnchor(anchor2[2], anchor2[3], anchor2[4], anchor2[5] - PADDING, anchor2[6] - PADDING) ZO_ScrollList_Commit(scrollList) - -- hook mouse enter/exit local function onMouseEnter(control) self:OnMouseEnter(control) end local function onMouseExit(control) self:OnMouseExit(control) end - -- adjust row setup to mimic the highlight padding local dataType1 = ZO_ScrollList_GetDataTypeTable(dropdown.m_scroll, 1) local dataType2 = ZO_ScrollList_GetDataTypeTable(dropdown.m_scroll, 2) @@ -232,7 +205,6 @@ function ScrollableDropdownHelper:Initialize(parent, control, visibleRows) end dataType1.setupCallback = SetupEntry dataType2.setupCallback = SetupEntry - -- adjust dimensions based on entries local scrollContent = scroll:GetNamedChild("Contents") ZO_PreHook(dropdown, "AddMenuItems", function() @@ -250,7 +222,6 @@ function ScrollableDropdownHelper:Initialize(parent, control, visibleRows) dropdown.m_dropdown:SetHeight(height) end) end - function ScrollableDropdownHelper:OnShow() local dropdown = self.dropdown if dropdown.m_lastParent ~= ZO_Menus then @@ -259,32 +230,27 @@ function ScrollableDropdownHelper:OnShow() ZO_Menus:BringWindowToTop() end end - function ScrollableDropdownHelper:OnHide() local dropdown = self.dropdown - if dropdown.m_lastParent then + if dropdown.m_lastParent then dropdown.m_dropdown:SetParent(dropdown.m_lastParent) dropdown.m_lastParent = nil end end - function ScrollableDropdownHelper:DoHide() local dropdown = self.dropdown if dropdown:IsDropdownVisible() then dropdown:HideDropdown() end end - function ScrollableDropdownHelper:GetMaxWidth() local dropdown = self.dropdown - local dataType = ZO_ScrollList_GetDataTypeTable(dropdown.m_scroll, 1) - + local dataType = ZO_ScrollList_GetDataTypeTable(dropdown.m_scroll, 1) local dummy = dataType.pool:AcquireObject() dataType.setupCallback(dummy, { m_owner = dropdown, name = "Dummy" }, dropdown) - local maxWidth = 0 local label = dummy.m_label local entries = dropdown.m_sortedItems @@ -296,11 +262,9 @@ function ScrollableDropdownHelper:GetMaxWidth() maxWidth = width end end - dataType.pool:ReleaseObject(dummy.key) return maxWidth end - function ScrollableDropdownHelper:OnMouseEnter(control) -- call original code if we replace instead of hook the handler --ZO_ScrollableComboBox_Entry_OnMouseEnter(control) @@ -319,11 +283,9 @@ function ScrollableDropdownHelper:OnMouseExit(control) ClearTooltip(InformationTooltip) end end - function LAMCreateControl.dropdown(parent, dropdownData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, dropdownData, controlName) control.choices = {} - local countControl = parent local name = parent:GetName() if not name or #name == 0 then @@ -333,7 +295,6 @@ function LAMCreateControl.dropdown(parent, dropdownData, controlName) local comboboxCount = (countControl.comboboxCount or 0) + 1 countControl.comboboxCount = comboboxCount control.combobox = wm:CreateControlFromVirtual(zo_strjoin(nil, name, "Combobox", comboboxCount), control.container, dropdownData.scrollable and "ZO_ScrollableComboBox" or "ZO_ComboBox") - local combobox = control.combobox combobox:SetAnchor(TOPLEFT) combobox:SetDimensions(control.container:GetDimensions()) @@ -342,12 +303,10 @@ function LAMCreateControl.dropdown(parent, dropdownData, controlName) control.dropdown = ZO_ComboBox_ObjectFromContainer(combobox) local dropdown = control.dropdown dropdown:SetSortsItems(false) -- need to sort ourselves in order to be able to sort by value - if dropdownData.scrollable then - local visibleRows = type(dropdownData.scrollable) == "number" and dropdownData.scrollable or DEFAULT_VISIBLE_ROWS + local visibleRows = type(dropdownData.scrollable) == "number" and dropdownData.scrollable or DEFAULT_VISIBLE_ROWS control.scrollHelper = ScrollableDropdownHelper:New(parent, control, visibleRows) end - ZO_PreHook(dropdown, "UpdateItems", function(self) assert(not self.m_sortsItems, "built-in dropdown sorting was reactivated, sorting is handled by LAM") if control.m_sortOrder ~= nil and control.m_sortType then @@ -356,21 +315,18 @@ function LAMCreateControl.dropdown(parent, dropdownData, controlName) table.sort(self.m_sortedItems, sortFunc) end end) - if dropdownData.sort then local sortInfo = GrabSortingInfo(dropdownData.sort) control.m_sortType, control.m_sortOrder = SORT_TYPES[sortInfo[1]], SORT_ORDERS[sortInfo[2]] elseif dropdownData.choicesValues then control.m_sortType, control.m_sortOrder = ZO_SORT_ORDER_UP, SORT_BY_VALUE end - if dropdownData.warning ~= nil or dropdownData.requiresReload then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") control.warning:SetAnchor(RIGHT, combobox, LEFT, -5, 0) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - control.UpdateChoices = UpdateChoices control:UpdateChoices(dropdownData.choices, dropdownData.choicesValues) control.UpdateValue = UpdateValue @@ -379,9 +335,7 @@ function LAMCreateControl.dropdown(parent, dropdownData, controlName) control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) LAM.util.RegisterForReloadIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/editbox.lua b/libs/LibAddonMenu-2.0/controls/editbox.lua index d6baf11..cc507e3 100644 --- a/libs/LibAddonMenu-2.0/controls/editbox.lua +++ b/libs/LibAddonMenu-2.0/controls/editbox.lua @@ -13,14 +13,10 @@ default = defaults.text, -- default value or function that returns the default value (optional) reference = "MyAddonEditbox" -- unique global reference to control (optional) } ]] - - local widgetVersion = 14 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("editbox", widgetVersion) then return end - local wm = WINDOW_MANAGER - local function UpdateDisabled(control) local disable if type(control.data.disabled) == "function" then @@ -28,7 +24,6 @@ local function UpdateDisabled(control) else disable = control.data.disabled end - if disable then control.label:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) control.editbox:SetColor(ZO_DEFAULT_DISABLED_MOUSEOVER_COLOR:UnpackRGBA()) @@ -39,7 +34,6 @@ local function UpdateDisabled(control) --control.editbox:SetEditEnabled(not disable) control.editbox:SetMouseEnabled(not disable) end - local function UpdateValue(control, forceDefault, value) if forceDefault then --if we are forcing defaults value = LAM.util.GetDefaultValue(control.data.default) @@ -54,17 +48,14 @@ local function UpdateValue(control, forceDefault, value) control.editbox:SetText(value) end end - local MIN_HEIGHT = 24 local HALF_WIDTH_LINE_SPACING = 2 function LAMCreateControl.editbox(parent, editboxData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, editboxData, controlName) - local container = control.container control.bg = wm:CreateControlFromVirtual(nil, container, "ZO_EditBackdrop") local bg = control.bg bg:SetAnchorFill() - if editboxData.isMultiline then control.editbox = wm:CreateControlFromVirtual(nil, bg, "ZO_DefaultEditMultiLineForBackdrop") control.editbox:SetHandler("OnMouseWheel", function(self, delta) @@ -96,41 +87,32 @@ function LAMCreateControl.editbox(parent, editboxData, controlName) editbox:SetHandler("OnEscape", function(self) self:LoseFocus() control:UpdateValue(false, self:GetText()) end) editbox:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(control) end) editbox:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(control) end) - local MIN_WIDTH = (parent.GetWidth and (parent:GetWidth() / 10)) or (parent.panel.GetWidth and (parent.panel:GetWidth() / 10)) or 0 - control.label:ClearAnchors() container:ClearAnchors() - control.label:SetAnchor(TOPLEFT, control, TOPLEFT, 0, 0) container:SetAnchor(BOTTOMRIGHT, control, BOTTOMRIGHT, 0, 0) - if control.isHalfWidth then container:SetAnchor(BOTTOMRIGHT, control, BOTTOMRIGHT, 0, 0) end - if editboxData.isExtraWide then container:SetAnchor(BOTTOMLEFT, control, BOTTOMLEFT, 0, 0) else container:SetWidth(MIN_WIDTH * 3.2) end - if editboxData.isMultiline then container:SetHeight(MIN_HEIGHT * 3) else container:SetHeight(MIN_HEIGHT) end - if control.isHalfWidth ~= true and editboxData.isExtraWide ~= true then control:SetHeight(container:GetHeight()) else control:SetHeight(container:GetHeight() + control.label:GetHeight()) end - editbox:ClearAnchors() editbox:SetAnchor(TOPLEFT, container, TOPLEFT, 2, 2) editbox:SetAnchor(BOTTOMRIGHT, container, BOTTOMRIGHT, -2, -2) - if editboxData.warning ~= nil or editboxData.requiresReload then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") if editboxData.isExtraWide then @@ -141,16 +123,13 @@ function LAMCreateControl.editbox(parent, editboxData, controlName) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - control.UpdateValue = UpdateValue control:UpdateValue() if editboxData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) LAM.util.RegisterForReloadIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/header.lua b/libs/LibAddonMenu-2.0/controls/header.lua index eadff38..cc8306b 100644 --- a/libs/LibAddonMenu-2.0/controls/header.lua +++ b/libs/LibAddonMenu-2.0/controls/header.lua @@ -4,39 +4,29 @@ width = "full", --or "half" (optional) reference = "MyAddonHeader" -- unique global reference to control (optional) } ]] - - local widgetVersion = 8 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("header", widgetVersion) then return end - local wm = WINDOW_MANAGER - local function UpdateValue(control) control.header:SetText(LAM.util.GetStringFromValue(control.data.name)) end - local MIN_HEIGHT = 30 function LAMCreateControl.header(parent, headerData, controlName) local control = LAM.util.CreateBaseControl(parent, headerData, controlName) local isHalfWidth = control.isHalfWidth local width = control:GetWidth() control:SetDimensions(isHalfWidth and width / 2 or width, MIN_HEIGHT) - control.divider = wm:CreateControlFromVirtual(nil, control, "ZO_Options_Divider") local divider = control.divider divider:SetWidth(isHalfWidth and width / 2 or width) divider:SetAnchor(TOPLEFT) - control.header = wm:CreateControlFromVirtual(nil, control, "ZO_Options_SectionTitleLabel") local header = control.header header:SetAnchor(TOPLEFT, divider, BOTTOMLEFT) header:SetAnchor(BOTTOMRIGHT) header:SetText(LAM.util.GetStringFromValue(headerData.name)) - control.UpdateValue = UpdateValue - LAM.util.RegisterForRefreshIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/iconpicker.lua b/libs/LibAddonMenu-2.0/controls/iconpicker.lua index 65c7782..526a03c 100644 --- a/libs/LibAddonMenu-2.0/controls/iconpicker.lua +++ b/libs/LibAddonMenu-2.0/controls/iconpicker.lua @@ -18,13 +18,10 @@ default = defaults.var, -- default value or function that returns the default value (optional) reference = "MyAddonIconPicker" -- unique global reference to control (optional) } ]] - local widgetVersion = 8 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("iconpicker", widgetVersion) then return end - local wm = WINDOW_MANAGER - local IconPickerMenu = ZO_Object:Subclass() local iconPicker LAM.util.GetIconPickerMenu = function() @@ -39,19 +36,16 @@ LAM.util.GetIconPickerMenu = function() end return iconPicker end - function IconPickerMenu:New(...) local object = ZO_Object.New(self) object:Initialize(...) return object end - function IconPickerMenu:Initialize(name) local control = wm:CreateTopLevelWindow(name) control:SetDrawTier(DT_HIGH) control:SetHidden(true) self.control = control - local scrollContainer = wm:CreateControlFromVirtual(name .. "ScrollContainer", control, "ZO_ScrollContainer") -- control:SetDimensions(control.container:GetWidth(), height) -- adjust to icon size / col count scrollContainer:SetAnchorFill() @@ -61,25 +55,21 @@ function IconPickerMenu:Initialize(name) local scroll = GetControl(scrollContainer, "ScrollChild") self.scroll = scroll self.scrollContainer = scrollContainer - local bg = wm:CreateControl(nil, scrollContainer, CT_BACKDROP) bg:SetAnchor(TOPLEFT, scrollContainer, TOPLEFT, 0, -3) bg:SetAnchor(BOTTOMRIGHT, scrollContainer, BOTTOMRIGHT, 2, 5) bg:SetEdgeTexture("EsoUI\\Art\\Tooltips\\UI-Border.dds", 128, 16) bg:SetCenterTexture("EsoUI\\Art\\Tooltips\\UI-TooltipCenter.dds") bg:SetInsets(16, 16, -16, -16) - local mungeOverlay = wm:CreateControl(nil, bg, CT_TEXTURE) mungeOverlay:SetTexture("EsoUI/Art/Tooltips/munge_overlay.dds") mungeOverlay:SetDrawLevel(1) mungeOverlay:SetAddressMode(TEX_MODE_WRAP) mungeOverlay:SetAnchorFill() - local mouseOver = wm:CreateControl(nil, scrollContainer, CT_TEXTURE) mouseOver:SetDrawLevel(2) mouseOver:SetTexture("EsoUI/Art/Buttons/minmax_mouseover.dds") mouseOver:SetHidden(true) - local function IconFactory(pool) local icon = wm:CreateControl(name .. "Entry" .. pool:GetNextControlId(), scroll, CT_TEXTURE) icon:SetMouseEnabled(true) @@ -110,16 +100,13 @@ function IconPickerMenu:Initialize(name) end) return icon end - local function ResetFunction(icon) icon:ClearAnchors() end - self.iconPool = ZO_ObjectPool:New(IconFactory, ResetFunction) self:SetMaxColumns(1) self.icons = {} self.color = ZO_DEFAULT_ENABLED_COLOR - EVENT_MANAGER:RegisterForEvent(name .. "_OnGlobalMouseUp", EVENT_GLOBAL_MOUSE_UP, function() if self.refCount ~= nil then local moc = wm:GetMouseOverControl() @@ -132,57 +119,47 @@ function IconPickerMenu:Initialize(name) end end) end - function IconPickerMenu:OnMouseEnter(icon) InitializeTooltip(InformationTooltip, icon, TOPLEFT, 0, 0, BOTTOMRIGHT) SetTooltipText(InformationTooltip, LAM.util.GetStringFromValue(icon.tooltip)) InformationTooltipTopLevel:BringWindowToTop() end - function IconPickerMenu:OnMouseExit(icon) ClearTooltip(InformationTooltip) end - function IconPickerMenu:SetMaxColumns(value) self.maxCols = value ~= nil and value or 5 end - local DEFAULT_SIZE = 28 function IconPickerMenu:SetIconSize(value) local iconSize = DEFAULT_SIZE if value ~= nil then iconSize = math.max(iconSize, value) end self.iconSize = iconSize end - function IconPickerMenu:SetVisibleRows(value) self.visibleRows = value ~= nil and value or 4.5 end - function IconPickerMenu:SetMouseHandlers(onEnter, onExit) self.customOnMouseEnter = onEnter self.customOnMouseExit = onExit end - function IconPickerMenu:UpdateDimensions() local iconSize = self.iconSize local width = iconSize * self.maxCols + 20 local height = iconSize * self.visibleRows self.control:SetDimensions(width, height) - local icons = self.icons for i = 1, #icons do local icon = icons[i] icon:SetDimensions(iconSize, iconSize) end end - function IconPickerMenu:UpdateAnchors() local iconSize = self.iconSize local col, maxCols = 1, self.maxCols local previousCol, previousRow local scroll = self.scroll local icons = self.icons - for i = 1, #icons do local icon = icons[i] icon:ClearAnchors() @@ -199,7 +176,6 @@ function IconPickerMenu:UpdateAnchors() col = col >= maxCols and 1 or col + 1 end end - function IconPickerMenu:Clear() self.icons = {} self.iconPool:ReleaseAllObjects() @@ -210,7 +186,6 @@ function IconPickerMenu:Clear() self.customOnMouseEnter = nil self.customOnMouseExit = nil end - function IconPickerMenu:AddIcon(texturePath, callback, tooltip) local icon, key = self.iconPool:AcquireObject() icon:SetTexture(texturePath) @@ -220,13 +195,11 @@ function IconPickerMenu:AddIcon(texturePath, callback, tooltip) icon.OnSelect = callback self.icons[#self.icons + 1] = icon end - function IconPickerMenu:Show(parent) if #self.icons == 0 then return false end if not self.control:IsHidden() then self:Clear() return false end self:UpdateDimensions() self:UpdateAnchors() - local control = self.control control:ClearAnchors() control:SetAnchor(TOPLEFT, parent, BOTTOMLEFT, 0, 8) @@ -234,10 +207,8 @@ function IconPickerMenu:Show(parent) control:BringWindowToTop() self.parent = parent self.refCount = 2 - return true end - function IconPickerMenu:SetColor(color) local icons = self.icons self.color = color @@ -246,16 +217,13 @@ function IconPickerMenu:SetColor(color) icon:SetColor(color:UnpackRGBA()) end end - ------------------------------------------------------------- - local function UpdateChoices(control, choices, choicesTooltips) local data = control.data if not choices then choices, choicesTooltips = data.choices, data.choicesTooltips or {} end local addedChoices = {} - local iconPicker = LAM.util.GetIconPickerMenu() iconPicker:Clear() for i = 1, #choices do @@ -270,7 +238,6 @@ local function UpdateChoices(control, choices, choicesTooltips) end end end - local function IsDisabled(control) if type(control.data.disabled) == "function" then return control.data.disabled() @@ -278,7 +245,6 @@ local function IsDisabled(control) return control.data.disabled end end - local function SetColor(control, color) local icon = control.icon if IsDisabled(control) then @@ -287,24 +253,19 @@ local function SetColor(control, color) icon.color = color or control.data.defaultColor or ZO_DEFAULT_ENABLED_COLOR icon:SetColor(icon.color:UnpackRGBA()) end - local iconPicker = LAM.util.GetIconPickerMenu() if iconPicker.parent == control.container and not iconPicker.control:IsHidden() then iconPicker:SetColor(icon.color) end end - local function UpdateDisabled(control) local disable = IsDisabled(control) - control.dropdown:SetMouseEnabled(not disable) control.dropdownButton:SetEnabled(not disable) - local iconPicker = LAM.util.GetIconPickerMenu() if iconPicker.parent == control.container and not iconPicker.control:IsHidden() then iconPicker:Clear() end - SetColor(control, control.icon.color) if disable then control.label:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) @@ -312,7 +273,6 @@ local function UpdateDisabled(control) control.label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) end end - local function UpdateValue(control, forceDefault, value) if forceDefault then --if we are forcing defaults value = LAM.util.GetDefaultValue(control.data.default) @@ -327,14 +287,12 @@ local function UpdateValue(control, forceDefault, value) control.icon:SetTexture(value) end end - local MIN_HEIGHT = 26 local HALF_WIDTH_LINE_SPACING = 2 local function SetIconSize(control, size) local icon = control.icon icon.size = size icon:SetDimensions(size, size) - local height = size + 4 control.dropdown:SetDimensions(size + 20, height) height = math.max(height, MIN_HEIGHT) @@ -344,7 +302,6 @@ local function SetIconSize(control, size) else control:SetHeight(height) end - local iconPicker = LAM.util.GetIconPickerMenu() if iconPicker.parent == control.container and not iconPicker.control:IsHidden() then iconPicker:SetIconSize(size) @@ -352,10 +309,8 @@ local function SetIconSize(control, size) iconPicker:UpdateAnchors() end end - function LAMCreateControl.iconpicker(parent, iconpickerData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, iconpickerData, controlName) - local function ShowIconPicker() local iconPicker = LAM.util.GetIconPickerMenu() if iconPicker.parent == control.container then @@ -375,7 +330,6 @@ function LAMCreateControl.iconpicker(parent, iconpickerData, controlName) iconPicker:Show(control.container) end end - local iconSize = iconpickerData.iconSize ~= nil and iconpickerData.iconSize or DEFAULT_SIZE control.dropdown = wm:CreateControl(nil, control.container, CT_CONTROL) local dropdown = control.dropdown @@ -384,18 +338,15 @@ function LAMCreateControl.iconpicker(parent, iconpickerData, controlName) dropdown:SetHandler("OnMouseUp", ShowIconPicker) dropdown:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(control) end) dropdown:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(control) end) - control.icon = wm:CreateControl(nil, dropdown, CT_TEXTURE) local icon = control.icon icon:SetAnchor(LEFT, dropdown, LEFT, 3, 0) icon:SetDrawLevel(2) - local dropdownButton = wm:CreateControlFromVirtual(nil, dropdown, "ZO_DropdownButton") dropdownButton:SetDimensions(16, 16) dropdownButton:SetHandler("OnClicked", ShowIconPicker) dropdownButton:SetAnchor(RIGHT, dropdown, RIGHT, -3, 0) control.dropdownButton = dropdownButton - control.bg = wm:CreateControl(nil, dropdown, CT_BACKDROP) local bg = control.bg bg:SetAnchor(TOPLEFT, dropdown, TOPLEFT, 0, -3) @@ -408,14 +359,12 @@ function LAMCreateControl.iconpicker(parent, iconpickerData, controlName) mungeOverlay:SetDrawLevel(1) mungeOverlay:SetAddressMode(TEX_MODE_WRAP) mungeOverlay:SetAnchorFill() - if iconpickerData.warning ~= nil or iconpickerData.requiresReload then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") control.warning:SetAnchor(RIGHT, control.container, LEFT, -5, 0) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - control.UpdateChoices = UpdateChoices control.UpdateValue = UpdateValue control:UpdateValue() @@ -423,14 +372,11 @@ function LAMCreateControl.iconpicker(parent, iconpickerData, controlName) control:SetColor() control.SetIconSize = SetIconSize control:SetIconSize(iconSize) - if iconpickerData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) LAM.util.RegisterForReloadIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/panel.lua b/libs/LibAddonMenu-2.0/controls/panel.lua index 1404686..80f1f51 100644 --- a/libs/LibAddonMenu-2.0/controls/panel.lua +++ b/libs/LibAddonMenu-2.0/controls/panel.lua @@ -11,19 +11,14 @@ registerForDefaults = true, --boolean (optional) (will set all options controls back to default values) resetFunc = function() print("defaults reset") end, --(optional) custom function to run after settings are reset to defaults } ]] - - local widgetVersion = 13 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("panel", widgetVersion) then return end - local wm = WINDOW_MANAGER local cm = CALLBACK_MANAGER - local function RefreshPanel(control) local panel = LAM.util.GetTopPanel(control) --callback can be fired by a single control, by the panel showing or by a nested submenu local panelControls = panel.controlsToRefresh - for i = 1, #panelControls do local updateControl = panelControls[i] if updateControl ~= control and updateControl.UpdateValue then @@ -37,44 +32,35 @@ local function RefreshPanel(control) end end end - local function ForceDefaults(panel) local panelControls = panel.controlsToRefresh - for i = 1, #panelControls do local updateControl = panelControls[i] if updateControl.UpdateValue and updateControl.data.default ~= nil then updateControl:UpdateValue(true) end end - if panel.data.resetFunc then panel.data.resetFunc() end - cm:FireCallbacks("LAM-RefreshPanel", panel) end - local callbackRegistered = false LAMCreateControl.scrollCount = LAMCreateControl.scrollCount or 1 local SEPARATOR = " - " local LINK_COLOR = ZO_ColorDef:New("5959D5") local LINK_MOUSE_OVER_COLOR = ZO_ColorDef:New("B8B8D3") - function LAMCreateControl.panel(parent, panelData, controlName) local control = wm:CreateControl(controlName, parent, CT_CONTROL) - control.label = wm:CreateControlFromVirtual(nil, control, "ZO_Options_SectionTitleLabel") local label = control.label label:SetAnchor(TOPLEFT, control, TOPLEFT, 0, 4) label:SetText(LAM.util.GetStringFromValue(panelData.displayName or panelData.name)) - if panelData.author or panelData.version then control.info = wm:CreateControl(nil, control, CT_LABEL) local info = control.info info:SetFont(LAM.util.L["PANEL_INFO_FONT"]) info:SetAnchor(TOPLEFT, label, BOTTOMLEFT, 0, -2) - local output = {} if panelData.author then output[#output + 1] = zo_strformat(LAM.util.L["AUTHOR"], LAM.util.GetStringFromValue(panelData.author)) @@ -84,7 +70,6 @@ function LAMCreateControl.panel(parent, panelData, controlName) end info:SetText(table.concat(output, SEPARATOR)) end - if panelData.website then control.website = wm:CreateControl(nil, control, CT_BUTTON) local website = control.website @@ -104,7 +89,6 @@ function LAMCreateControl.panel(parent, panelData, controlName) RequestOpenUnsafeURL(panelData.website) end) end - control.container = wm:CreateControlFromVirtual("LAMAddonPanelContainer"..LAMCreateControl.scrollCount, control, "ZO_ScrollContainer") LAMCreateControl.scrollCount = LAMCreateControl.scrollCount + 1 local container = control.container @@ -112,15 +96,12 @@ function LAMCreateControl.panel(parent, panelData, controlName) container:SetAnchor(BOTTOMRIGHT, control, BOTTOMRIGHT, -3, -3) control.scroll = GetControl(control.container, "ScrollChild") control.scroll:SetResizeToFitPadding(0, 20) - if panelData.registerForRefresh and not callbackRegistered then --don't want to register our callback more than once cm:RegisterCallback("LAM-RefreshPanel", RefreshPanel) callbackRegistered = true end - control.ForceDefaults = ForceDefaults control.data = panelData control.controlsToRefresh = {} - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/slider.lua b/libs/LibAddonMenu-2.0/controls/slider.lua index bd721c5..8fc1c83 100644 --- a/libs/LibAddonMenu-2.0/controls/slider.lua +++ b/libs/LibAddonMenu-2.0/controls/slider.lua @@ -9,7 +9,7 @@ clampInput = true, -- boolean, if set to false the input won't clamp to min and max and allow any number instead (optional) decimals = 0, -- when specified the input value is rounded to the specified number of decimals (optional) autoSelect = false, -- boolean, automatically select everything in the text input field when it gains focus (optional) - inputLocation = "below", -- or "right", determines where the input field is shown. This should not be used within the addon menu and is for custom sliders (optional) + inputLocation = "below", -- or "right", determines where the input field is shown. This should not be used within the addon menu and is for custom sliders (optional) tooltip = "Slider's tooltip text.", -- or string id or function returning a string (optional) width = "full", --or "half" (optional) disabled = function() return db.someBooleanSetting end, --or boolean (optional) @@ -18,18 +18,14 @@ default = defaults.var, -- default value or function that returns the default value (optional) reference = "MyAddonSlider" -- unique global reference to control (optional) } ]] - local widgetVersion = 12 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("slider", widgetVersion) then return end - local wm = WINDOW_MANAGER local strformat = string.format - local function RoundDecimalToPlace(d, place) return tonumber(strformat("%." .. tostring(place) .. "f", d)) end - local function UpdateDisabled(control) local disable if type(control.data.disabled) == "function" then @@ -37,7 +33,6 @@ local function UpdateDisabled(control) else disable = control.data.disabled end - control.slider:SetEnabled(not disable) control.slidervalue:SetEditEnabled(not disable) if disable then @@ -52,7 +47,6 @@ local function UpdateDisabled(control) control.slidervalue:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) end end - local function UpdateValue(control, forceDefault, value) if forceDefault then --if we are forcing defaults value = LAM.util.GetDefaultValue(control.data.default) @@ -70,15 +64,12 @@ local function UpdateValue(control, forceDefault, value) else value = control.data.getFunc() end - control.slider:SetValue(value) control.slidervalue:SetText(value) end - function LAMCreateControl.slider(parent, sliderData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, sliderData, controlName) - local isInputOnRight = sliderData.inputLocation == "right" - + local isInputOnRight = sliderData.inputLocation == "right" --skipping creating the backdrop... Is this the actual slider texture? control.slider = wm:CreateControl(nil, control.container, CT_SLIDER) local slider = control.slider @@ -98,26 +89,22 @@ function LAMCreateControl.slider(parent, sliderData, controlName) slider:SetMinMax(minValue, maxValue) slider:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(control) end) slider:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(control) end) - slider.bg = wm:CreateControl(nil, slider, CT_BACKDROP) local bg = slider.bg bg:SetCenterColor(0, 0, 0) bg:SetAnchor(TOPLEFT, slider, TOPLEFT, 0, 4) bg:SetAnchor(BOTTOMRIGHT, slider, BOTTOMRIGHT, 0, -4) - bg:SetEdgeTexture("EsoUI\\Art\\Tooltips\\UI-SliderBackdrop.dds", 32, 4) - + bg:SetEdgeTexture("EsoUI\\Art\\Tooltips\\UI-SliderBackdrop.dds", 32, 4) control.minText = wm:CreateControl(nil, slider, CT_LABEL) local minText = control.minText minText:SetFont("ZoFontGameSmall") minText:SetAnchor(TOPLEFT, slider, BOTTOMLEFT) minText:SetText(sliderData.min) - control.maxText = wm:CreateControl(nil, slider, CT_LABEL) local maxText = control.maxText maxText:SetFont("ZoFontGameSmall") maxText:SetAnchor(TOPRIGHT, slider, BOTTOMRIGHT) maxText:SetText(sliderData.max) - control.slidervalueBG = wm:CreateControlFromVirtual(nil, slider, "ZO_EditBackdrop") if(isInputOnRight) then control.slidervalueBG:SetDimensions(60, 26) @@ -137,7 +124,6 @@ function LAMCreateControl.slider(parent, sliderData, controlName) else slidervalue:SetFont("ZoFontGameSmall") end - local isHandlingChange = false local function HandleValueChanged(value) if isHandlingChange then return end @@ -149,7 +135,6 @@ function LAMCreateControl.slider(parent, sliderData, controlName) slidervalue:SetText(value) isHandlingChange = false end - slidervalue:SetHandler("OnEscape", function(self) HandleValueChanged(sliderData.getFunc()) self:LoseFocus() @@ -174,7 +159,6 @@ function LAMCreateControl.slider(parent, sliderData, controlName) self:SelectAll() end) end - local range = maxValue - minValue slider:SetValueStep(sliderData.step or 1) slider:SetHandler("OnValueChanged", function(self, value, eventReason) @@ -189,24 +173,19 @@ function LAMCreateControl.slider(parent, sliderData, controlName) local new_value = (tonumber(slidervalue:GetText()) or sliderData.min or 0) + ((sliderData.step or 1) * value) control:UpdateValue(false, new_value) end) - if sliderData.warning ~= nil or sliderData.requiresReload then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") control.warning:SetAnchor(RIGHT, slider, LEFT, -5, 0) control.UpdateWarning = LAM.util.UpdateWarning control:UpdateWarning() end - control.UpdateValue = UpdateValue control:UpdateValue() - if sliderData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end - LAM.util.RegisterForRefreshIfNeeded(control) LAM.util.RegisterForReloadIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/submenu.lua b/libs/LibAddonMenu-2.0/controls/submenu.lua index 1766a1f..997d023 100644 --- a/libs/LibAddonMenu-2.0/controls/submenu.lua +++ b/libs/LibAddonMenu-2.0/controls/submenu.lua @@ -5,38 +5,31 @@ controls = {sliderData, buttonData} --(optional) used by LAM reference = "MyAddonSubmenu" --(optional) unique global reference to control } ]] - local widgetVersion = 11 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("submenu", widgetVersion) then return end - local wm = WINDOW_MANAGER local am = ANIMATION_MANAGER - local function UpdateValue(control) control.label:SetText(LAM.util.GetStringFromValue(control.data.name)) if control.data.tooltip then control.label.data.tooltipText = LAM.util.GetStringFromValue(control.data.tooltip) end end - local function AnimateSubmenu(clicked) local control = clicked:GetParent() control.open = not control.open - if control.open then control.animation:PlayFromStart() else control.animation:PlayFromEnd() end end - function LAMCreateControl.submenu(parent, submenuData, controlName) local width = parent:GetWidth() - 45 local control = wm:CreateControl(controlName or submenuData.reference, parent.scroll or parent, CT_CONTROL) control.panel = parent control.data = submenuData - control.label = wm:CreateControlFromVirtual(nil, control, "ZO_Options_SectionTitleLabel") local label = control.label label:SetAnchor(TOPLEFT, control, TOPLEFT, 5, 5) @@ -49,13 +42,11 @@ function LAMCreateControl.submenu(parent, submenuData, controlName) label:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter) label:SetHandler("OnMouseExit", ZO_Options_OnMouseExit) end - control.scroll = wm:CreateControl(nil, control, CT_SCROLL) local scroll = control.scroll scroll:SetParent(control) scroll:SetAnchor(TOPLEFT, label, BOTTOMLEFT, 0, 10) scroll:SetDimensionConstraints(width + 5, 0, width + 5, 0) - control.bg = wm:CreateControl(nil, label, CT_BACKDROP) local bg = control.bg bg:SetAnchor(TOPLEFT, label, TOPLEFT, -5, -5) @@ -63,18 +54,15 @@ function LAMCreateControl.submenu(parent, submenuData, controlName) bg:SetEdgeTexture("EsoUI\\Art\\Tooltips\\UI-Border.dds", 128, 16) bg:SetCenterTexture("EsoUI\\Art\\Tooltips\\UI-TooltipCenter.dds") bg:SetInsets(16, 16, -16, -16) - control.arrow = wm:CreateControl(nil, bg, CT_TEXTURE) local arrow = control.arrow arrow:SetDimensions(28, 28) arrow:SetTexture("EsoUI\\Art\\Miscellaneous\\list_sortdown.dds") --list_sortup for the other way arrow:SetAnchor(TOPRIGHT, bg, TOPRIGHT, -5, 5) - --figure out the cool animation later... control.animation = am:CreateTimeline() local animation = control.animation animation:SetPlaybackType(ANIMATION_SIZE, 0) --2nd arg = loop count - control:SetResizeToFitDescendents(true) control.open = false label:SetHandler("OnMouseUp", AnimateSubmenu) @@ -89,7 +77,6 @@ function LAMCreateControl.submenu(parent, submenuData, controlName) scroll:SetHeight(0) end end) - --small strip at the bottom of the submenu that you can click to close it control.btmToggle = wm:CreateControl(nil, control, CT_TEXTURE) local btmToggle = control.btmToggle @@ -99,10 +86,7 @@ function LAMCreateControl.submenu(parent, submenuData, controlName) btmToggle:SetHeight(15) btmToggle:SetAlpha(0) btmToggle:SetHandler("OnMouseUp", AnimateSubmenu) - control.UpdateValue = UpdateValue - LAM.util.RegisterForRefreshIfNeeded(control) - return control -end +end \ No newline at end of file diff --git a/libs/LibAddonMenu-2.0/controls/texture.lua b/libs/LibAddonMenu-2.0/controls/texture.lua index 29dda7c..d499cab 100644 --- a/libs/LibAddonMenu-2.0/controls/texture.lua +++ b/libs/LibAddonMenu-2.0/controls/texture.lua @@ -7,39 +7,31 @@ width = "full", --or "half" (optional) reference = "MyAddonTexture" --(optional) unique global reference to control } ]] - --add texture coords support? - local widgetVersion = 9 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("texture", widgetVersion) then return end - local wm = WINDOW_MANAGER - local MIN_HEIGHT = 26 function LAMCreateControl.texture(parent, textureData, controlName) local control = LAM.util.CreateBaseControl(parent, textureData, controlName) local width = control:GetWidth() control:SetResizeToFitDescendents(true) - if control.isHalfWidth then --note these restrictions control:SetDimensionConstraints(width / 2, MIN_HEIGHT, width / 2, MIN_HEIGHT * 4) else control:SetDimensionConstraints(width, MIN_HEIGHT, width, MIN_HEIGHT * 4) end - control.texture = wm:CreateControl(nil, control, CT_TEXTURE) local texture = control.texture texture:SetAnchor(CENTER) texture:SetDimensions(textureData.imageWidth, textureData.imageHeight) texture:SetTexture(textureData.image) - if textureData.tooltip then texture:SetMouseEnabled(true) texture.data = {tooltipText = LAM.util.GetStringFromValue(textureData.tooltip)} texture:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter) texture:SetHandler("OnMouseExit", ZO_Options_OnMouseExit) end - return control -end +end \ No newline at end of file diff --git a/libs/LibCustomMenu/LibCustomMenu.lua b/libs/LibCustomMenu/LibCustomMenu.lua index 65b1c17..de40a46 100644 --- a/libs/LibCustomMenu/LibCustomMenu.lua +++ b/libs/LibCustomMenu/LibCustomMenu.lua @@ -1,14 +1,11 @@ -- authors: votan, sirinsidiator -- thanks to: baertram & circonian - -- Register with LibStub local MAJOR, MINOR = "LibCustomMenu", 6.6 local lib, oldminor = LibStub and LibStub:NewLibrary(MAJOR, MINOR) if LibStub and not lib then return end -- the same or newer version of this lib is already loaded into memory lib = lib or { } - local wm = WINDOW_MANAGER - ----- Common ----- local function SetupDivider(pool, control) local function GetTextDimensions(self) @@ -16,7 +13,6 @@ local function SetupDivider(pool, control) end local function Noop(self) end - local label = wm:CreateControlFromVirtual("$(parent)Name", control, "ZO_BaseTooltipDivider") label:ClearAnchors() label:SetAnchor(TOPLEFT, control, TOPLEFT, 0, 2) @@ -24,28 +20,21 @@ local function SetupDivider(pool, control) -- First and last time the anchors are set label.ClearAnchors = Noop label.SetAnchor = Noop - label.SetText = Noop label.SetFont = Noop label.GetTextDimensions = GetTextDimensions label.SetHorizontalAlignment = Noop label:SetHidden(false) control.nameLabel = label - control:SetMouseEnabled(false) end - lib.DIVIDER = "-" - ----- Sub Menu ----- - local Submenu = ZO_Object:Subclass() - local SUBMENU_ITEM_MOUSE_ENTER = 1 local SUBMENU_ITEM_MOUSE_EXIT = 2 local SUBMENU_SHOW_TIMEOUT = 350 local SUBMENU_HIDE_TIMEOUT = 350 - local submenuCallLaterHandle local nextId = 1 local function ClearTimeout() @@ -54,18 +43,15 @@ local function ClearTimeout() submenuCallLaterHandle = nil end end - local function SetTimeout(callback) if (submenuCallLaterHandle ~= nil) then ClearTimeout() end submenuCallLaterHandle = "LibCustomMenuSubMenuTimeout" .. nextId nextId = nextId + 1 - EVENT_MANAGER:RegisterForUpdate(submenuCallLaterHandle, SUBMENU_SHOW_TIMEOUT, function() ClearTimeout() if callback then callback() end end ) end - local function GetValueOrCallback(arg, ...) if type(arg) == "function" then return arg(...) @@ -73,47 +59,37 @@ local function GetValueOrCallback(arg, ...) return arg end end - function Submenu:New(...) local object = ZO_Object.New(self) object:Initialize(...) return object end - function Submenu:Initialize(name) self.window = ZO_Menus - local submenuControl = self.window:CreateControl(name, CT_CONTROL) submenuControl:SetClampedToScreen(true) submenuControl:SetMouseEnabled(true) submenuControl:SetHidden(true) -- OnMouseEnter: Stop hiding of submenu initiated by mouse exit of parent submenuControl:SetHandler("OnMouseEnter", ClearTimeout) - local function ExitSubMenu() if self.parent and self.parent.OnSelect then self.parent:OnSelect(SUBMENU_ITEM_MOUSE_EXIT) end end submenuControl:SetHandler("OnMouseExit", function(control) SetTimeout(ExitSubMenu) end) - submenuControl:SetHandler("OnHide", function(control) ClearTimeout() self:Clear() end) submenuControl:SetDrawLevel(ZO_Menu:GetDrawLevel() + 1) - local bg = submenuControl:CreateControl("$(parent)BG", CT_BACKDROP) -- bg:SetCenterColor(0, 0, 0, .93) bg:SetCenterTexture("EsoUI/Art/Tooltips/UI-TooltipCenter.dds") bg:SetEdgeTexture("EsoUI/Art/Tooltips/UI-Border.dds", 128, 16) bg:SetInsets(16, 16, -16, -16) bg:SetAnchorFill() - local overlay = bg:CreateControl("$(parent)MungeOverlay", CT_TEXTURE) overlay:SetTexture("EsoUI/Art/Tooltips/munge_overlay.dds") overlay:SetAddressMode(TEX_MODE_WRAP) overlay:SetAnchor(TOPLEFT) overlay:SetAnchor(BOTTOMRIGHT) - self.highlight = CreateControlFromVirtual("$(parent)Highlight", submenuControl, "ZO_SelectionHighlight") self.highlight:SetHidden(true) - self.control = submenuControl - local upInside = false local function MouseEnter(control) upInside = true @@ -139,36 +115,29 @@ function Submenu:Initialize(name) end end end - local function ItemFactory(pool) local control = CreateControlFromVirtual("ZO_SubMenuItem", submenuControl, "ZO_MenuItem", pool:GetNextControlId()) control.nameLabel = GetControl(control, "Name") - control:SetHandler("OnMouseEnter", MouseEnter) control:SetHandler("OnMouseExit", MouseExit) control:SetHandler("OnMouseDown", IgnoreMouseDownEditFocusLoss) control:SetHandler("OnMouseUp", MouseUp) - return control end - local function ResetFunction(control) control:SetHidden(true) control:ClearAnchors() control.OnSelect = nil control.menuIndex = nil end - local function DividerFactory(pool) local control = CreateControlFromVirtual("ZO_CustomSubMenuDivider", submenuControl, "ZO_NotificationsRowButton", pool:GetNextControlId()) SetupDivider(pool, control) return control end - local function ResetCheckbox(checkbox) ResetFunction(checkbox) end - local function CheckBoxMouseEnter(control) MouseEnter(control:GetParent()) end @@ -183,21 +152,15 @@ function Submenu:Initialize(name) local function CheckBoxFactory(pool) local control = CreateControlFromVirtual("ZO_CustomSubMenuItemCheckButton", submenuControl, "ZO_CheckButton", pool:GetNextControlId()) control.nameLabel = control - control:SetHandler("OnMouseEnter", CheckBoxMouseEnter) control:SetHandler("OnMouseExit", CheckBoxMouseExit) - ZO_CheckButton_SetToggleFunction(control, CheckBoxMouseUp) - return control end - - self.itemPool = ZO_ObjectPool:New(ItemFactory, ResetFunction) self.dividerPool = ZO_ObjectPool:New(DividerFactory, ResetFunction) self.checkBoxPool = ZO_ObjectPool:New(CheckBoxFactory, ResetCheckbox) self.items = { } - EVENT_MANAGER:RegisterForEvent(name .. "_OnGlobalMouseUp", EVENT_GLOBAL_MOUSE_UP, function() if self.refCount ~= nil then local moc = wm:GetMouseOverControl() @@ -210,55 +173,43 @@ function Submenu:Initialize(name) end end ) end - function Submenu:SetSelectedIndex(index) if (index) then index = zo_max(zo_min(index, #self.items), 1) end - if (self.selectedIndex ~= index) then self:UnselectItem(self.selectedIndex) self:SelectItem(index) end end - function Submenu:UnselectItem(index) local item = self.items[index] if item then self.highlight:SetHidden(true) local nameControl = item.nameLabel nameControl:SetColor(nameControl.normalColor:UnpackRGBA()) - self.selectedIndex = nil end end - function Submenu:SelectItem(index) local item = self.items[index] if item then local highlight = self.highlight - highlight:ClearAnchors() - highlight:SetAnchor(TOPLEFT, item, TOPLEFT, -2, -2) highlight:SetAnchor(BOTTOMRIGHT, item, BOTTOMRIGHT, 2, 2) - highlight:SetHidden(false) - local nameControl = item.nameLabel nameControl:SetColor(nameControl.highlightColor:UnpackRGBA()) - self.selectedIndex = index end end - function Submenu:UpdateAnchors() local iconSize = self.iconSize local previousItem = self.control local items = self.items local width, height = 0, 0 local padding = ZO_Menu.menuPad - for i = 1, #items do local item = items[i] local textWidth, textHeight = item.nameLabel:GetTextDimensions() @@ -272,15 +223,12 @@ function Submenu:UpdateAnchors() item:SetAnchor(TOPLEFT, previousItem, BOTTOMLEFT, 0, item.itemYPad) item:SetAnchor(TOPRIGHT, previousItem, BOTTOMRIGHT, 0, item.itemYPad) end - item:SetHidden(false) item:SetDimensions(textWidth, textHeight) previousItem = item end - self.control:SetDimensions(width + padding * 2, height + padding * 2) end - function Submenu:Clear() self:UnselectItem(self.selectedIndex) self.items = { } @@ -290,15 +238,12 @@ function Submenu:Clear() self.control:SetHidden(true) self.refCount = nil end - local DEFAULT_TEXT_COLOR = ZO_ColorDef:New(GetInterfaceColor(INTERFACE_COLOR_TYPE_TEXT_COLORS, INTERFACE_TEXT_COLOR_NORMAL)) local DEFAULT_TEXT_HIGHLIGHT = ZO_ColorDef:New(GetInterfaceColor(INTERFACE_COLOR_TYPE_TEXT_COLORS, INTERFACE_TEXT_COLOR_CONTEXT_HIGHLIGHT)) - function Submenu:AddItem(entry, myfont, normalColor, highlightColor, itemYPad) local visible if entry.visible ~= nil then visible = entry.visible else visible = true end if not GetValueOrCallback(visible, ZO_Menu) then return end - local item, key local itemType = entry.itemType or MENU_ADD_OPTION_LABEL if itemType == MENU_ADD_OPTION_LABEL then @@ -308,24 +253,18 @@ function Submenu:AddItem(entry, myfont, normalColor, highlightColor, itemYPad) else error(string.format("Unknown menu entry itemType: %s", itemType)) end - item.OnSelect = entry.callback item.index = #self.items + 1 self.items[item.index] = item - local nameControl = item.nameLabel - local entryFont = GetValueOrCallback(entry.myfont, ZO_Menu, item) or myfont local normColor = GetValueOrCallback(entry.normalColor, ZO_Menu, item) or normalColor local highColor = GetValueOrCallback(entry.highlightColor, ZO_Menu, item) or highlightColor myfont = entryFont or "ZoFontGame" nameControl.normalColor = normColor or DEFAULT_TEXT_COLOR nameControl.highlightColor = highColor or DEFAULT_TEXT_HIGHLIGHT - nameControl:SetFont(myfont) - local text = GetValueOrCallback(entry.label, ZO_Menu, item) - local checkboxItemControl = nil if itemType == MENU_ADD_OPTION_CHECKBOX then checkboxItemControl = self.checkBoxPool:AcquireObject() @@ -338,18 +277,14 @@ function Submenu:AddItem(entry, myfont, normalColor, highlightColor, itemYPad) ZO_CheckButton_SetCheckState(checkboxItemControl, GetValueOrCallback(entry.checked, ZO_Menu, item) or false) end item.checkbox = checkboxItemControl - nameControl:SetText(text) - local enabled = not GetValueOrCallback(entry.disabled or false, ZO_Menu, item) nameControl:SetColor((enabled and nameControl.normalColor or ZO_DEFAULT_DISABLED_COLOR):UnpackRGBA()) item:SetMouseEnabled(enabled) end - function Submenu:Show(parent) if not self.control:IsHidden() then self:Clear() return false end self:UpdateAnchors() - local padding = ZO_Menu.menuPad local control = self.control control:ClearAnchors() @@ -362,27 +297,21 @@ function Submenu:Show(parent) control:SetHidden(false) self.parent = parent self.refCount = 2 - return true end - local function SubMenuItemFactory(pool) local control = CreateControlFromVirtual("ZO_CustomSubMenuItem", ZO_Menu, "ZO_NotificationsRowButton", pool:GetNextControlId()) - local arrowContainer = control:CreateControl("$(parent)Arrow", CT_CONTROL) -- we need this in order to control the menu with independently of the texture size arrowContainer:SetAnchor(RIGHT, control, RIGHT, 0, 0) arrowContainer:SetDimensions(32, 16) - local arrow = arrowContainer:CreateControl("$(parent)Texture", CT_TEXTURE) arrow:SetAnchor(RIGHT, arrowContainer, RIGHT, 0, 0) arrow:SetDimensions(16, 20) arrow:SetTexture("EsoUI/Art/Miscellaneous/colorPicker_slider_vertical.dds") arrow:SetTextureCoords(0, 0.5, 0, 1) - -- we assign the submenu arrow to checkbox because the context menu will add the desired width automatically that way control.checkbox = arrowContainer - local clicked = false local function MouseEnter(control) ZO_Menu_EnterItem(control) @@ -401,34 +330,26 @@ local function SubMenuItemFactory(pool) clicked = true control:OnSelect(SUBMENU_ITEM_MOUSE_ENTER) end - local label = wm:CreateControl("$(parent)Name", control, CT_LABEL) label:SetAnchor(TOPLEFT) control.nameLabel = label - control:SetHandler("OnMouseEnter", MouseEnter) control:SetHandler("OnMouseExit", MouseExit) control:SetHandler("OnMouseDown", MouseDown) - return control end - ----- Standard Menu ----- - local function ResetMenuItem(button) button:SetHidden(true) button:ClearAnchors() button.menuIndex = nil button.OnSelect = nil end - local function ResetCheckBox(checkBox) ResetMenuItem(checkBox) ZO_CheckButton_SetToggleFunction(checkBox, nil) end - local upInside = false - local function MenuItemFactory(pool) local control = CreateControlFromVirtual("ZO_CustomMenuItem", ZO_Menu, "ZO_NotificationsRowButton", pool:GetNextControlId()) local function MouseEnter() @@ -444,23 +365,18 @@ local function MenuItemFactory(pool) ZO_Menu_ClickItem(control, 1) end end - local label = wm:CreateControl("$(parent)Name", control, CT_LABEL) label:SetAnchor(TOPLEFT) control.nameLabel = label - control:SetHandler("OnMouseEnter", MouseEnter) control:SetHandler("OnMouseExit", MouseExit) control:SetHandler("OnMouseDown", IgnoreMouseDownEditFocusLoss) control:SetHandler("OnMouseUp", MouseUp) - return control end - local function CheckBoxFactory(pool) local control = CreateControlFromVirtual("ZO_CustomMenuItemCheckButton", ZO_Menu, "ZO_CheckButton", pool:GetNextControlId()) control.nameLabel = control - local function MouseEnter() ZO_Menu_EnterItem(control) end @@ -471,13 +387,11 @@ local function CheckBoxFactory(pool) control:SetHandler("OnMouseExit", MouseExit) return control end - local function DividerFactory(pool) local control = CreateControlFromVirtual("ZO_CustomMenuDivider", ZO_Menu, "ZO_NotificationsRowButton", pool:GetNextControlId()) SetupDivider(pool, control) return control end - ---- Hook points for context menu ----- local function PreHook(objectTable, existingFunctionName, hookFunction) if type(objectTable) == "string" then @@ -485,7 +399,6 @@ local function PreHook(objectTable, existingFunctionName, hookFunction) existingFunctionName = objectTable objectTable = _G end - local existingFn = objectTable[existingFunctionName] local newFn if existingFn and type(existingFn) == "function" then @@ -498,7 +411,6 @@ local function PreHook(objectTable, existingFunctionName, hookFunction) end objectTable[existingFunctionName] = newFn end - local function HookContextMenu() local category, registry, inventorySlot, slotActions, entered local function Reset() @@ -539,7 +451,6 @@ local function HookContextMenu() end end Reset() - PreHook("ZO_InventorySlot_RemoveMouseOverKeybinds", RemoveMouseOverKeybinds) PreHook("ZO_InventorySlot_OnMouseExit", RemoveMouseOverKeybinds) PreHook("ZO_InventorySlot_DiscoverSlotActionsFromActionList", AddSlots) @@ -547,24 +458,17 @@ local function HookContextMenu() PreHook(ZO_InventorySlotActions, "Show", AppendToMenu) PreHook(ZO_InventorySlotActions, "GetPrimaryActionName", AppendToMenu) end - ----- Public API ----- - function AddCustomMenuItem(mytext, myfunction, itemType, myFont, normalColor, highlightColor, itemYPad, horizontalAlignment) local orgItemPool = ZO_Menu.itemPool local orgCheckboxItemPool = ZO_Menu.checkBoxPool - ZO_Menu.itemPool = mytext ~= lib.DIVIDER and lib.itemPool or lib.dividerPool ZO_Menu.checkBoxPool = lib.checkBoxPool - local index = AddMenuItem(mytext, myfunction, itemType, myFont, normalColor, highlightColor, itemYPad, horizontalAlignment) - ZO_Menu.itemPool = orgItemPool ZO_Menu.checkBoxPool = orgCheckboxItemPool - return index end - function AddCustomSubMenuItem(mytext, entries, myfont, normalColor, highlightColor, itemYPad) local function CreateSubMenu(control, state) if (state == SUBMENU_ITEM_MOUSE_ENTER) then @@ -580,21 +484,15 @@ function AddCustomSubMenuItem(mytext, entries, myfont, normalColor, highlightCol lib.submenu:Clear() end end - local orgItemPool = ZO_Menu.itemPool local orgCheckboxItemPool = ZO_Menu.checkBoxPool - ZO_Menu.itemPool = lib.submenuPool ZO_Menu.checkBoxPool = lib.checkBoxPool - local index = AddMenuItem(mytext, CreateSubMenu, MENU_ADD_OPTION_LABEL, myfont, normalColor, highlightColor, itemYPad) - ZO_Menu.itemPool = orgItemPool ZO_Menu.checkBoxPool = orgCheckboxItemPool - return index end - local function HookClearMenu() local orgClearMenu = ClearMenu function ClearMenu() @@ -607,38 +505,29 @@ local function HookClearMenu() lib.submenu:Clear() end end - local function HookAddSlotAction() function ZO_InventorySlotActions:AddCustomSlotAction(...) local orgItemPool = ZO_Menu.itemPool local orgCheckboxItemPool = ZO_Menu.checkBoxPool - ZO_Menu.itemPool = lib.itemPool ZO_Menu.checkBoxPool = lib.checkBoxPool - self:AddSlotAction(...) - ZO_Menu.itemPool = orgItemPool ZO_Menu.checkBoxPool = orgCheckboxItemPool end end - function lib:RegisterContextMenu(func, category, ...) category = zo_clamp(category or self.CATEGORY_LATE, self.CATEGORY_EARLY, self.CATEGORY_LATE) self.contextMenuRegistry:RegisterCallback(category, func, ...) end - function lib:RegisterKeyStripEnter(func, category, ...) category = zo_clamp(category or self.CATEGORY_LATE, self.CATEGORY_EARLY, self.CATEGORY_LATE) self.keybindRegistry:RegisterCallback(category, func, ...) end - function lib:RegisterKeyStripExit(func, ...) self.keybindRegistry:RegisterCallback("Exit", func, ...) end - ---- Init ----- - local function OnAddonLoaded(event, name) if name:find("^ZO_") then return end EVENT_MANAGER:UnregisterForEvent(MAJOR, EVENT_ADD_ON_LOADED) @@ -651,18 +540,14 @@ local function OnAddonLoaded(event, name) HookAddSlotAction() HookContextMenu() end - lib.contextMenuRegistry = lib.contextMenuRegistry or ZO_CallbackObject:New() lib.keybindRegistry = lib.keybindRegistry or ZO_CallbackObject:New() - lib.CATEGORY_EARLY = 1 lib.CATEGORY_PRIMARY = 2 lib.CATEGORY_SECONDARY = 3 lib.CATEGORY_TERTIARY = 4 lib.CATEGORY_QUATERNARY = 5 lib.CATEGORY_LATE = 6 - EVENT_MANAGER:UnregisterForEvent(MAJOR, EVENT_ADD_ON_LOADED) EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_ADD_ON_LOADED, OnAddonLoaded) - -LibCustomMenu = lib +LibCustomMenu = lib \ No newline at end of file diff --git a/libs/LibCustomMenu/LibCustomMenu.txt b/libs/LibCustomMenu/LibCustomMenu.txt index b05d983..79c3fd9 100644 --- a/libs/LibCustomMenu/LibCustomMenu.txt +++ b/libs/LibCustomMenu/LibCustomMenu.txt @@ -5,7 +5,5 @@ ## AddOnVersion: 662 ## DependsOn: LibStub ## Description: Fixes in-game bug that causes "Access a private function from insecure code" created by custom context-menu items, sub-menu and divider. - ## This Add-On is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. The Elder Scrolls and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. All rights reserved. - -LibCustomMenu.lua +LibCustomMenu.lua \ No newline at end of file diff --git a/libs/LibCustomMenu/LibStub/LibStub.lua b/libs/LibCustomMenu/LibStub/LibStub.lua index 0e6bf67..5cae903 100644 --- a/libs/LibCustomMenu/LibStub/LibStub.lua +++ b/libs/LibCustomMenu/LibStub/LibStub.lua @@ -2,37 +2,30 @@ -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke -- LibStub developed for World of Warcraft by above members of the WowAce community. -- Ported to Elder Scrolls Online by Seerah - local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 4 local LibStub = _G[LIBSTUB_MAJOR] - local strformat = string.format if not LibStub or LibStub.minor < LIBSTUB_MINOR then LibStub = LibStub or {libs = {}, minors = {} } _G[LIBSTUB_MAJOR] = LibStub LibStub.minor = LIBSTUB_MINOR - function LibStub:NewLibrary(major, minor) assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)") if type(minor) ~= "number" then minor = assert(tonumber(zo_strmatch(minor, "%d+%.?%d*")), "Minor version must either be a number or contain a number.") end - local oldminor = self.minors[major] if oldminor and oldminor >= minor then return nil end self.minors[major], self.libs[major] = minor, self.libs[major] or {} return self.libs[major], oldminor end - function LibStub:GetLibrary(major, silent) if not self.libs[major] and not silent then error(strformat("Cannot find a library instance of %q.", tostring(major)), 2) end return self.libs[major], self.minors[major] end - function LibStub:IterateLibraries() return pairs(self.libs) end setmetatable(LibStub, { __call = LibStub.GetLibrary }) end - LibStub.SILENT = true \ No newline at end of file diff --git a/libs/LibCustomMenu/LibStub/LibStub.txt b/libs/LibCustomMenu/LibStub/LibStub.txt index ede624b..fb9cd1f 100644 --- a/libs/LibCustomMenu/LibStub/LibStub.txt +++ b/libs/LibCustomMenu/LibStub/LibStub.txt @@ -4,5 +4,4 @@ ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, ported to ESO by Seerah ## Version: 1.0 r4 ## AddOnVersion: 4 - LibStub.lua \ No newline at end of file diff --git a/libs/LibCustomMenu/Unlicense.rtf b/libs/LibCustomMenu/Unlicense.rtf index 68a49da..3d03ad6 100644 --- a/libs/LibCustomMenu/Unlicense.rtf +++ b/libs/LibCustomMenu/Unlicense.rtf @@ -1,10 +1,8 @@ This is free and unencumbered software released into the public domain. - Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. - In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit @@ -12,7 +10,6 @@ of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -20,5 +17,4 @@ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to <http://unlicense.org/> +For more information, please refer to <http://unlicense.org/> \ No newline at end of file diff --git a/libs/LibCustomTitles/LibCustomTitles.lua b/libs/LibCustomTitles/LibCustomTitles.lua index 0f15c60..62f131f 100644 --- a/libs/LibCustomTitles/LibCustomTitles.lua +++ b/libs/LibCustomTitles/LibCustomTitles.lua @@ -5,48 +5,32 @@ Past Author: Kyoma Filename: LibCustomTitles.lua Version: 10 ]]-- - --[[ - This software is under : CreativeCommons CC BY-NC-SA 4.0 Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) - You are free to: - Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. - - Under the following terms: - Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. - - -Please read full licence at : +Please read full licence at : http://creativecommons.org/licenses/by-nc-sa/4.0/legalcode - ]]-- - - --[[ - Author: Dolgubon NOTE: Used Kyoma's version as a base. Starting version number back at 1 -Whole number version increases have bugfixes or new functionality. +Whole number version increases have bugfixes or new functionality. Decimal version increases merely have new titles. Version 4: - Changed what the u umlaut character was mapped to. With the previous one, when encoded it was a ' which provided issues - Version 3: - Fixed some issues with language and players using a non official langauge - Version 2: - Fixed an issue where titles that did not globally replace were not showing up for the player with the title - Version 1: - Global titles will now show up only once in the list of titles, replacing 'Volunteer' - The title will still be shown to other players regardless of what is selected @@ -56,8 +40,6 @@ Version 1: - Fixed a bug with titles for specific characters - Only has test titles - Removed many of the titles in the titleLocale - - Author: Kyoma Version 20 Changes: Rewrote how custom titles are added and stored to help reduce conflict between authors @@ -65,75 +47,58 @@ Changes: Rewrote how custom titles are added and stored to help reduce conflict - Use achievementId instead of raw title name to make it work with all languages - Make it default to english custom title if nothing is specified for the user's language - Support for LibTitleLocale to fix issues with title differences for males and females - - (v18) + (v18) - Added support for colors and even a simple gradient - Moved language check to title registration - (v19) - Fixed problems with UTF8 characters and color gradients - (v20) - Added option to replace a title globally. ]]-- local libName = "LibCustomTitles" LibStub:NewLibrary(libName, 100) EVENT_MANAGER:UnregisterForEvent(libName, EVENT_ADD_ON_LOADED) - local libLoaded local LIB_NAME, VERSION = "LibCustomTitlesN", 4.0 local LibCustomTitles, oldminor = LibStub:NewLibrary(LIB_NAME, VERSION) if not LibCustomTitles then return end - local titles = {} - local _, nonHideTitle = GetAchievementRewardTitle(92) local _, nonHideCharTitle = GetAchievementRewardTitle(93) - - - local lang = GetCVar("Language.2") -local supportedLang = +local supportedLang = { ['en']=1, ['de']=1, ['fr']=1, } - - local customTitles = {} local playerDisplayName = HashString(GetDisplayName()) local playerCharName = HashString( GetUnitName('player')) -local doesPlayerHaveGlobal -local doesCharHaveGlobal +local doesPlayerHaveGlobal +local doesCharHaveGlobal function LibCustomTitles:RegisterTitle(displayName, charName, override, title) local titleToUse if type(title) == "table" then if title[lang] then titleToUse = title[lang] end - if not supportedLang[lang] then titleToUse=title['en'] end if not titleToUse then return end end title = titleToUse --local hidden = (extra == true) --support old format - if override == true then if playerDisplayName == displayName then - if charName == playerCharName then doesCharHaveGlobal = true elseif not charName then doesPlayerHaveGlobal = true end -- otherwise, it's another character - end end - local playerGender = GetUnitGender("player") local genderTitle - if type(override) == "boolean" then --override all titles override = override and "-ALL-" or "-NONE-" elseif type(override) == "number" then --get override title from achievementId @@ -145,14 +110,13 @@ function LibCustomTitles:RegisterTitle(displayName, charName, override, title) elseif type(override) == "table" then --use language table with strings override = override[lang] or override["en"] end - - if type(override) == "string" then - if not customTitles[displayName] then + if type(override) == "string" then + if not customTitles[displayName] then customTitles[displayName] = {} end local charOrAccount = customTitles[displayName] if charName then - if not customTitles[displayName][charName] then + if not customTitles[displayName][charName] then customTitles[displayName][charName] = {} end charOrAccount = customTitles[displayName][charName] @@ -163,7 +127,6 @@ function LibCustomTitles:RegisterTitle(displayName, charName, override, title) end end end - local maps= { [126]=32, @@ -179,7 +142,6 @@ local maps= [59] = 196, [60] = 234, } - local function stringConvert(str) local t = {string.byte(str, 1, #str)} for i = 1, #t do @@ -188,18 +150,13 @@ local function stringConvert(str) end return string.char(unpack(t)) end - --= MOD(C1 +24,89)+38 --= MOD(E1 +78,89)+38 - --iferror(char(VLOOKUP(mid(I1,1,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,2,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,3,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,4,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,5,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,6,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,7,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,8,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,9,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,10,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,11,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,12,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,13,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,14,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,15,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,16,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,17,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,18,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,19,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,20,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,21,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,22,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,23,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,24,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,25,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,26,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,27,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,28,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,29,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,30,1),B1:C,2,false)),"")&iferror(char(VLOOKUP(mid(I1,31,1),B1:C,2,false)),"") function LibCustomTitles:Init() - - local CT_NO_TITLE = 0 local CT_TITLE_ACCOUNT = 1 local CT_TITLE_CHARACTER = 2 - local function GetCustomTitleType(displayName, unitName) if customTitles[displayName] then if customTitles[displayName][unitName] then @@ -209,10 +166,8 @@ function LibCustomTitles:Init() end return CT_NO_TITLE end - local function GetCustomTitle(originalTitle, customTitle) - - if customTitle then + if customTitle then if customTitle[originalTitle] then return stringConvert(customTitle[originalTitle]) elseif originalTitle == "" and customTitle["-NONE-"] then @@ -222,58 +177,47 @@ function LibCustomTitles:Init() end end end - local function GetModifiedTitle(originalTitle, displayName, charName) - -- check for global override local returnTitle = GetCustomTitle(originalTitle, customTitles["-GLOBAL-"]) or originalTitle -- check for player override local registerType = GetCustomTitleType(displayName, charName) - if registerType == CT_TITLE_CHARACTER then return GetCustomTitle(originalTitle, customTitles[displayName][charName]) or returnTitle - elseif registerType == CT_TITLE_ACCOUNT then + elseif registerType == CT_TITLE_ACCOUNT then return GetCustomTitle(originalTitle, customTitles[displayName]) or returnTitle end return returnTitle end - local GetUnitTitle_original = GetUnitTitle GetUnitTitle = function(unitTag) local unitTitleOriginal = GetUnitTitle_original(unitTag) local unitDisplayName = HashString(GetUnitDisplayName(unitTag)) local unitCharacterName = HashString(GetUnitName(unitTag)) - return GetModifiedTitle(unitTitleOriginal, unitDisplayName, unitCharacterName) end - local GetTitle_original = GetTitle GetTitle = function(index) local titleOriginal = GetTitle_original(index) local displayName = HashString(GetDisplayName()) local characterName = HashString(GetUnitName("player")) local title = GetModifiedTitle(titleOriginal, displayName, characterName ) - - if title ~= titleOriginal then + if title ~= titleOriginal then -- We don't want the title to overwrite everything in the dropdown -- So we only replace volunteer - - if nonHideTitle ~= titleOriginal then + if nonHideTitle ~= titleOriginal then if doesPlayerHaveGlobal or doesCharHaveGlobal then return titleOriginal else - return title + return title end end - return title else return title end end - end - local function OnAddonLoaded() if not libLoaded then libLoaded = true @@ -282,12 +226,9 @@ local function OnAddonLoaded() EVENT_MANAGER:UnregisterForEvent(LIB_NAME, EVENT_ADD_ON_LOADED) end end - EVENT_MANAGER:RegisterForEvent(LIB_NAME, EVENT_ADD_ON_LOADED, OnAddonLoaded) - local lct=LibCustomTitles lct.RT = lct.RegisterTitle - lct:RT(1276148971,2868841312,true,{en="O;]v;]aCYaku@{",}) lct:RT(383898450,false,true,{en="3u{@;]aCYaT]Z@{",})lct:RT(383898450,4149698651,true,{en="q>v}Z>w",fr="nDZyyC]@;[",de="q>v}Z>w",}) lct:RT(80340145,2040263953,92,{en="S<;ao>;aS]^;",fr="n;a6]uZ",de="0;]aNZ>;aTu<];",}) @@ -301,7 +242,6 @@ lct:RT(1171120197,false,true,{en="pQ1Cvv;{{",fr="pQ1Cvv;{{",de="pQ1Cvv;{{",}) lct:RT(65500869,false,92,{en="5;u[aMCZ",fr="5;u[aMCZ",de="5;u[aMCZ",})lct:RT(65500869,75627323,92,{en="m[a0^X;",}) lct:RT(4198689717,1143482591,92,{en="/]X<yuwZ{@;]",}) lct:RT(2074654098,false,92,{en="/:{C[^@;[}aQC@a5^{zZXZC^{",fr="ku]]Ey;>@azu{a5^{z;X@",de="/:{C[^@aQZX<@a6;]vbX<@Zw",})lct:RT(2074654098,4247615100,92,{en="4[u>;{Au[=;]",fr="/]z;>@;^{;av;a3C>v;{",de="T;[@;>Au>v;];]",}) - lct:RT(3966971491,false,92,{en="n1ka/]wC>Zu>anC|;]",fr="n1ka/]wC>Zu>anC|;]",de="n1ka/]wC>Zu>anC|;]",}) lct:RT(3820965258,false,92,{en="M[CCv@<Z]{@}",fr="M[CCv@<Z]{@}",de="M[CCv@<Z]{@}",})lct:RT(3820965258,1047795165,92,{en="1]u:{a4CzXC]>",fr="1]u:{a4CzXC]>",de="1]u:{a4CzXC]>",}) lct:RT(3782668513,3337670239,92,{en="1^u]vZu>",}) @@ -322,7 +262,6 @@ lct:RT(2762805744,false,1391,{en="5@C>;X^@@;]",}) lct:RT(1069428601,false,92,{en="O;u[;]aCYa@<;aT;u=a",fr="1^E]Z{{;^]av;{aluZ:[;{",de="O;Z[;]av;]a5X<AuX<;>",}) lct:RT(2511359942,false,92,{en="S<;aU;]wakC>v^X@C]",fr="n;ak<;YaU;]w",de="0;]aU;]wa0Z]Zw;>@",}) lct:RT(2037837684,false,92,{en="5;]|u>@aCYa1Cvv;{{a1[Z@@;]",}) - lct:RT(1904732837,false,true,{en="/vv;]aCYao>{",fr="/vvZ@ZC>>;^]av;ao>{",de="/vvZ;];]a|C>ao>{",}) lct:RT(2787550069,453923765,true,{en="p;{@CFZ>F0Z{w^Z{;",fr="p;{@CFZ>F0Z{w^Z{;",de="p;{@CFZ>F0Z{w^Z{;",}) lct:RT(1987214583,false,92,{en="S<;aN[v;]a0]uwC>",fr="S<;aN[v;]a0]uwC>",de="S<;aN[v;]a0]uwC>",})lct:RT(1987214583,3107977549,628,{en="S<;a3u{@;]yZ>v",fr="S<;a3u{@;]yZ>v",de="S<;a3u{@;]yZ>v",}) @@ -330,19 +269,16 @@ lct:RT(2193066671,false,92,{en="pCX=;@;;]",})lct:RT(2193066671,2274919616,1810,{ lct:RT(3600512696,false,92,{en="~XuI+XYYnZw<@>Z>walC]y~]",}) lct:RT(1024520674,false,92,{en="4;uX;=;;z;]",fr="5C[vu@av;a[ua4uZ_",de="l]Z;v;>{AbX<@;]",}) lct:RT(4257573713,false,92,{en="oyu;aTua3C^a5<Z>v;Z]^",fr="oyu;aTua3C^a5<Z>v;Z]^",de="oyu;aTua3C^a5<Z>v;Z]^",}) - lct:RT(3316406928,false,92,{en="5C>wA;u|;]",fr="SZ{{;^]av;ak<u>{C>",de="nZ;vA;:;]",})lct:RT(3316406928,331729979,1391,{en="nZ@;]u]}an;w;>v",fr="nEw;>v;anZ@@E]uZ];",de="nZ@;]u]Z{X<;an;w;>v;",}) lct:RT(653129646,false,92,{en="S<;a1C[v;>a5uZ>@",fr="n;a5uZ>@avDo]",de="0;]a1C[v;>;aO;Z[Zw;",})lct:RT(653129646,1618900846,92,{en="S<;a0]^Zv",fr="n;a0]^Zv;",de="0;]a0]^Zv;",}) lct:RT(2514190522,false,92,{en="myz;]Zu[aMu@@[;yuw;",fr="Mu@@[;yuw;amyzE]Zu[",de="myz;]Zu[;]aPuyzYyuwZ;]",})lct:RT(2514190522,2080803584,1810,{en="5z;u]aCYa5@;>vu]]",fr="nu>X;av;a5@;>vu]]",de="5z;;]a|C>a5@;>vu]]",}) lct:RT(2224225614,false,92,{en="5z;u=;]aYC]a@<;a0;uv",}) - lct:RT(3879977139,false,92,{en="S<;a/{{;y:[}a1;>;]u[",})lct:RT(3879977139,189200680,92,{en="ku>>C@a4uvalZ|;",}) lct:RT(3957423493,false,92,{en="S<;a5AC[;a4u@]C[",}) lct:RT(3198987902,false,92,{en="S<;a1ZY@;v",})lct:RT(3198987902,3050075638,92,{en="S<;a/Au=;>;v",}) lct:RT(265543675,false,92,{en="0]uwC>a5[u};]",fr="k<u{{;^]av;a0]uwC>",de="0]uX<;>@`@;]",})lct:RT(265543675,1652025059,92,{en="S<;ak^];aYC]a0;u@<",fr="n;ap;ycv;akC>@];a[ua3C]@",de="0Z;aO;Z[^>waYi]av;>aSCv",}) lct:RT(1517585757,false,92,{en="MuX<;[u{aMll",}) lct:RT(2188837655,false,92,{en="SCza4]ZC]Z@}",fr="a4]ZC]Z@E",})lct:RT(2188837655,2836585406,51,{en="5<];=",}) - lct:RT(2083511209,false,92,{en="0u]=aNy;]u[v",fr="Ny;]u^v;a5Cy:];",}) lct:RT(2050501477,false,92,{en="Tu>v;]Z>wa/v|;>@^];]",})lct:RT(2050501477,3768515314,51,{en="OC[}a4]Z;{@aCYa3;]ZvZu",}) lct:RT(658966427,false,92,{en="/]@ZYZX;]aCYaU;>Z@<u]",fr="/]@ZYZXZ;]av;aU;>Z@<u]",de="P^>{@<u>vA;]=;]a|C>aU;>Z@<u]",})lct:RT(658966427,532842436,628,{en="p;va0ZuyC>v",fr="0Zuyu>@apC^w;",de="apC@;]a0Zuyu>@",}) @@ -350,11 +286,8 @@ lct:RT(188206946,false,92,{en="3u{@;]aCYa3;y;{",fr="3ug@];av;{a3cy;{",de="3;Z{@; lct:RT(3235505263,false,92,{en="1Z>w;]",fr="pC^?^Z>",de="pC@=CzY",}) lct:RT(397091973,false,true,{en="3;]XZ[;{{ap;{C[|;",fr="pE{C[^@ZC>amyzZ@C}u:[;",de="1>uv;>[C{;aN>@{X<[C{{;><;Z@",}) lct:RT(2660919200,false,92,{en="3;>@C]",}) - lct:RT(1527484276,false,92,{en="5@C]y:];u=;]",}) - lct:RT(1375307746,false,true,{en="/yuBC>aR^;;>",fr="/yuBC>;ap;Z>;",de="/yuBC>;>=`>ZwZ>",}) - lct:RT(452725322,false,92,{en="0Z|Z>;aN_;X^@ZC>;]",fr="0Z|Z>aMC^]];u^",de="1`@@[ZX<;]a5X<u]Y]ZX<@;]",})lct:RT(452725322,3541899474,2079,{en="S<;a3uX<Z>;",fr="nua3uX<Z>;",de="0Z;a3u{X<Z>;",}) lct:RT(671038416,false,2079,{en="5Z[|;]aU;]wa5^]Y;]",fr="/]w;>@a5^]Y;^]aU;]w",de="5Z[:;]aU;]wa5^]Y;]",}) lct:RT(391627066,false,92,{en="1^u]vZu>a/>w;[",fr="/>w;a1u]vZ;>",de="5X<^@B;>w;[",}) @@ -362,8 +295,6 @@ lct:RT(1449947651,false,92,{en="5X]^:@u{@ZXaku];:;u]",}) lct:RT(1143345413,false,92,{en="l1ea4]Cw];{{ZC>aS;uy",fr="l1ea4]Cw];{{ZC>aS;uy",de="l1ea4]Cw];{{ZC>aS;uy",}) lct:RT(3396402417,false,51,{en="S<;anZ|Z>wa5<uvCA",fr="nDCy:];a6Z|u>@;",de="0;]apu{@[C{;a5X<u@@;>",})lct:RT(3396402417,401432131,628,{en="T<Z@;alu>w",fr="k]CXaM[u>X",de="T;Zt;]alu>wBu<>",}) lct:RT(2837968354,false,92,{en="o>;a3u>a/]y}",fr="q>aOCyy;a/]yE;",de="NZ>Fyu>>Fu]y;;",}) - - lct:RT(173478323,2881560666,92,{en="5@]C>wa5y;[[Z>wao]X",de="5@u]=a3Z;Y;>v;]ao]=",}) lct:RT(1804301692,false,92,{en="nuv}aCYa@<;a5C^@<am{[u>v",fr="0uy;av;a[Dm[;av^a5^v",de="0uy;av;]a5ivZ>{;[",}) lct:RT(1044122497,false,92,{en="S<;anC];yu{@;]",fr="nC];yu{@;]",de="nC];yu{@;]",})lct:RT(1044122497,2763479321,1330,{en="0ka5z}",fr="N{zZC>a0k",de="0ka5zZC>",}) @@ -375,13 +306,11 @@ lct:RT(244717510,false,92,{en="nuakC>?^E]u>@;azu{amyz[u?^u:[;",fr="nuakC>?^E]u>@ lct:RT(1342813983,2721735970,92,{en="S<;apZzz;]",fr="nDN|;>@];^]",de="0;]a/^Y];Zt;]",}) lct:RT(1627745582,false,92,{en="5=CCyua/vvZX@",fr="n;a5=CCyua/vvZX@",de="5=CCyua/:<b>wZw;>",}) lct:RT(2487628104,false,92,{en="~XYYIJ:f0;{^a0;{^aa~]",fr="~XYYIJ:f0;{^a0;{^aa~]",de="~XYYIJ:f0;{^a0;{^aa~]",})lct:RT(2487628104,2978586387,1810,{en="~XYYIJ:fS;aSu>?^;Ca4uzZaa~]",fr="~XYYIJ:f2;a|uZ{a|C^{aSu>=;]a4uz",de="~XYYIJ:fmX<aA;]v;a4u>B;]avZX<a4",}) - lct:RT(210728403,270455745,92,{en="S<;a3;@<CvZXu[",}) lct:RT(3252834201,false,92,{en="S<;a5ZyC>aN_z];{{",fr="n;a5ZyC>aN_z];{{",de="0;]a5ZyC>aN_z];{{",}) lct:RT(1365579521,false,628,{en="TZz;{aC>aS]u{<",}) lct:RT(2822666538,false,true,{en="~XllGGGG5C^[ap;uz;]~]",fr="~XllGGGG5C^[ap;uz;]~]",de="~XllGGGGnD/>=C^~]",}) lct:RT(1507726281,3541509713,92,{en="2u|;[Z>aCYa5@;>vu]]",fr="2u|;[C@av;a5@;>vu]]",de="5z;;]A^]Ya|C>a5@;>vu]]",}) - lct:RT(1158594345,false,92,{en="4]C@;X@C]aCYa@<;ap;u[y",}) lct:RT(4267095257,false,92,{en="~X,GGG,Gk[C^vak<u{;]~]",fr="~X,GGG,GQ^uw;ak<u{{;~]",de="~X,GGG,GTC[=;>xbw;]~]",}) lct:RT(109224740,1737010384,92,{en="0];uyaPZ[[;]",fr="S^;^]av;apK|;",de="S]u^yFPZ[[;]",}) @@ -393,19 +322,15 @@ lct:RT(1013558538,3510921308,2079,{en="0Z{:u>va0Z{:u>va0Z{:u>v",fr="0Z{:u>va0Z{: lct:RT(4120068347,false,92,{en="S;ua3u=;]",en="S<EZc];",de="S;;=CX<;]",})lct:RT(4120068347,2030795112,1810,{en='0CoC0',}) lct:RT(2416997617,false,92,{en="4u{<u",en="4uX<u",de="4u{<u",}) lct:RT(841517891,false,92,{en="TC]@<}",}) - lct:RT(810384984,238394253,92,{en='/z;_',}) - lct:RT(4052732411,false,92,{en='ku{^u[',})lct:RT(4052732411,671906596,92,{en='ku{^u[',}) lct:RT(3204068434,false,92,{fr='0]uwC>YZ];apZv;]',})lct:RT(3204068434,2083966292,51,{en='5@C]yapZv;]',}) lct:RT(425871172,false,92,{en='5AC]vaoYa5<u>>u]u',}) lct:RT(4292278260,false,92,{en='S<;apZ>waM;u];]',})lct:RT(4292278260,2488928266,2079,{en='S<;am[[^yZ>u@;v',}) lct:RT(1553656508,false,92,{en='Q^=;]C]',fr='Q^=;]C]',de="Q^=;]C]",}) - lct:RT(3101213993,false,true,{en='~X*gIHv,S<;amyyC]@u[',fr='~X*gIHv,nDZyyC]@;[',de='~X*gIHv,0;]aq>{@;]:[ZX<;',}) lct:RT(2014809841,2978736366,92,{en='k^]ZCakC[[;X@C]',fr='kC[[;X@ZC>>;^]av;ak^]ZC{Z@E{',de='P^]ZC{Z@b@;>{uyy[;]',}) lct:RT(2063947617,false,92,{en='R^;;>aoYanZBu]v{',fr='];Z>;av;{a[EBu]v{',de='aP`>ZwZ>av;]aNZv;X<{;>',})lct:RT(2063947617,341020706,92,{en='Nyz;]C]aoYanZBu]v{',fr='aNyz;];^]a0;{anEBu]v{',de='PuZ{;]av;]aNZv;X<{;>',}) - lct:RT(3128590789,false,92,{en='MuXC>a0;{@]C};]',fr='0;{@]^X@;^]av;a:uXC>',de='5z;X=B;]{@`];]',}) lct:RT(4293973946,3056998748,1330,{en='OC[}ak]^{uv;]',de='yu=;[[C{;aN]C:;]Z>',}) lct:RT(1161506350,false,92,{en='0ZBB}Z>wa5zuyy;]',fr='0ZBB}Z>wa5zuyy;]',de='0ZBB}Z>wa5zuyy;]',}) @@ -413,38 +338,26 @@ lct:RT(963571677,false,92,{en='S<;a:;u]v;vayu>',fr='nD<Cyy;a:u]:^',de='0;]aMb]@Z lct:RT(3733334153,false,92,{en='1]u>vaTu]ak<Z;Ya5^z];y;',}) lct:RT(3130962581,false,494,{en='3CC>anZw<@',fr='k[uZ]av;a[^>;',de='3C>v[ZX<@',})lct:RT(3130962581,4261844445,494,{en='3CC>anZw<@',fr='k[uZ]av;a[^>;',de='3C>v[ZX<@',}) lct:RT(2127935949,false,628,{en='S<;a5u{{yu>X;]',})lct:RT(2127935949,3789400369,92,{en='S<;aS;]]Z:[;a5>CAy;]',fr='an;aS;]]Z:[;aQ;Zw;y;]',de='0;]a5X<];X=[ZX<;a5X<>;;y;]',}) - - - lct:RT(4044176894,false,92,{en='S<;ak^]{;vao>;',}) lct:RT(1403951427,false,92,{en='S<;aq>YC]wZ|;>',}) - lct:RT(2709370135,false,92,{en='5Z[|;]}a0u]=>;{{',fr='o:{X^]Z@Eau]w;>@E;',de='5Z[:]Zw;a0^>=;[<;Z@',}) lct:RT(4281723531,false,92,{en='TZz;{aC>aS]u{<',fr='nZ>w;@@;{a{^]a[uakC]:;Z[[;',de='TZ{X<@aZya3^[[',})lct:RT(4281723531,306136156,1330,{en='5@uyz[u]aAZ[[a>;|;]avZ;',fr='5@uyz[u]a>;ayC^]]uaxuyuZ{',de='a5@uyz[u]aAZ]va>Z;yu[{a{@;]:;>',}) lct:RT(3619172715,false,92,{en='3u{@;]aU;]wa5^]Y;]',fr='3u{@;]aU;]wa5^]Y;]',de='3u{@;]aU;]wa5^]Y;]',}) lct:RT(3188788347,false,92,{en='lu:^[C^{',fr='lu:^[;^_',de='lu:;[<uY@',})lct:RT(3188788347,1700138827,92,{en='2^{@aua:Z@a3Z;<',fr='2^{@aua:Z@a3Z;<',de='2^{@aua:Z@a3Z;<',}) - - - lct:RT(4048208493,1185902972,92,{en='5Z>Z{@;]aS^]=;}',}) lct:RT(2858992612,false,92,{en='3u{@;]aCYaP>CA[;vw;',fr='3ug@];av;a[uakC>>uZ{{u>X;',de='3;Z{@;]av;{aTZ{{;>{',}) - lct:RT(4124279317,false,92,{en='N[;wu>@[}aTu{@;v',fr='a[Ewuyy;>@a1u{zZ[[E',de='N[;wu>@a6;]w;^v;@',})lct:RT(4124279317,1022046773,628,{en='5zCZ[;vaM]u@',fr='1uyZ>a1a@E',de='6;]BCw;>;{a1`]',}) lct:RT(2119731248,1017899260,true,{en='5<uvCAaCYa@<;aT;{@',fr='oy:];av;a[Do^;{@',de='5X<u@@;>av;{aT;{@;>{',}) - lct:RT(1298377073,false,92,{en='3u{@;]ak<;Y',})lct:RT(1298377073,599246026,92,{en='3u{@;]ak<;Y',}) lct:RT(763457523,false,1810,{en='/]v;>@al[uy;',fr='l[uyy;au]v;>@;',de='1[^<;>v;al[uyy;',}) lct:RT(798111974,false,92,{en='5Z>aCYa1];;v',}) - lct:RT(3085595752,2582039471,92,{en='1C[v;>a1^u]vZu>',}) lct:RT(1953523750,3270432679,92,{en='Mu@@[;yuw;',}) lct:RT(554270662,1747005414,92,{en='P]ZYaN];Za0Z[C>',fr='P]ZYaN];Za0Z[C>',de='P]ZYaN];Za0Z[C>',}) lct:RT(2021154607,false,92,{en='pZzz;]',fr='a|;>@];^]',de='pZzz;]',}) - lct:RT(3506149602,false,92,{en='kCvZ>waku@',fr='kCvZ>waku@',de='kCvZ>waku@',})lct:RT(3506149602,2311532378,1810,{en='S<;aN|;]FnZ|Z>w',fr='S<;aN|;]FnZ|Z>w',de='S<;aN|;]FnZ|Z>w',}) lct:RT(533751404,false,92,{en='3^@<{;]u',fr='3^@<{;]u',de='3^@<{;]u',}) lct:RT(2513617898,3008522260,92,{en='/{<=<u>',}) - lct:RT(1703460885,false,92,{en='l]Z;>v[}aQ;Zw<:C^]',})lct:RT(1703460885,3210043349,92,{en='TZ>w{aCYaTC>v;]',}) lct:RT(760593166,false,92,{en='M[uX=aTZvCA',fr='6;^|;aQCZ]',de='5X<Au]B;aTZ@A;',}) lct:RT(1134753014,false,92,{en='q]{a3uxC]',fr='q]{a3uxC]',de='q]{a3uxC]',})lct:RT(1134753014,2223000998,92,{en='4]CY;{{C]au@a/>=<F3C]zC]=',fr='4]CY;{{;^]aaa/>=<F3C]zC]=',de='4]CY;{{C]aZ>a/>=<F3C]zC]=',}) @@ -452,7 +365,6 @@ lct:RT(1838172566,false,92,{en='nZ|Z>wan;w;>v',fr='nEw;>v;a6Z|u>@;',de='n;:;>v;a lct:RT(3091229980,false,92,{en='6^[_{;v_',fr='6^[_{;v_',de='6^[_{;v_',})lct:RT(3091229980,4134294656,92,{en='k[u}yC];amamar',}) lct:RT(2845909476,false,92,{en='S<;aQC>4[^{q[@]u',fr='n;aQC>4[^{q[@]u',de='0u{aQC>4[^{q[@]u',})lct:RT(2845909476,2216570798,705,{en='QCa3;]X}',}) lct:RT(2359969152,false,2079,{en='oa3uwCaEamyz[uXa|;[',fr='n;ayuwZXZ;>a;{@amyz[uXu:[;',de='0;]aUu^:;];]aZ{@aq>;]:Z@@[ZX<',}) - lct:RT(2455827257,false,92,{en='p;u[ay|za5@ZX=a4',fr='p;u[ay|za5@ZX=a4',de='p;u[ay|za5@ZX=a4',})lct:RT(2455827257,1298336713,92,{en='p;u[ay|za5@ZX=a4',}) lct:RT(3436387716,false,705,{en='5XC^]w;aoYak}]CvZZ[',fr='l[Eu^a0^ak}]CvZZ[',de='1;Zt;[a|C>ak}]CvZZ[',}) lct:RT(2929427093,1621733346,true,{en='nZw<@aCYa0uA>',}) @@ -467,12 +379,9 @@ lct:RT(1545464185,4007320154,92,{en='5XCCyua0;u[;]',}) lct:RT(2648996415,false,92,{en='Ouzz}a0];uy;]',fr='O;^];^_apK|;^]',de='1[iX=[ZX<;]aS]b^y;]',})lct:RT(2648996415,2708407449,628,{en='MC]>a@Ca:;aTZ[v',}) lct:RT(989799715,false,628,{en='S<;anZw<@aCYa0uA>',fr='nua[^yZc];av;a[Du^:;',de='0u{anZX<@av;]a0byy;]^>w',})lct:RT(989799715,155839631,628,{en='S<;anZw<@aCYa0uA>',}) lct:RT(1536721951,false,true,{en='0Z|uaNyCa1C@<aoYa0u]=>;{{',})lct:RT(1536721951,2936424338,true,{en='0Z|uaNyCa1C@<aoYa0u]=>;{{',}) - lct:RT(2012291598,false,1330,{en='S<;a3u;[{@]Cya/>>Z<Z[u@C]',}) lct:RT(1613231931,false,92,{en='n;w;>vu]}aP>Zw<@',fr='k<;|u[Z;]anEw;>vuZ];',de='n;w;>vb];]apZ@@;]',}) lct:RT(701268649,false,true,{en='0];uyZ>wanZw<@',fr='pK|;]an^yZc];',de='S]b^y;>v;{anZX<@',}) - - lct:RT(1256140351,4217760066,705,{en='5<Z;[va5@uX=;]',}) lct:RT(1584171560,false,92,{en='kC>{^[aCYa4uvCyu}',fr='0E[Ew^Eav;a4uvCyu}',de='PC>{^[a|C>a4uvCyu}',})lct:RT(1584171560,2855390806,1330,{en='S<;a0]uwC>aCYa6u[;>ACCv',}) lct:RT(2092303465,false,92,{en='k]CAva4^[[;]',fr='/@@]uX@ZC>',de='U^wzY;]v',}) @@ -492,20 +401,17 @@ lct:RT(3307984231,false,92,{en='S<;a0;yC>{[u};]',fr='n;aS^;^]av;a0EyC>',de='0;]a lct:RT(2258333088,false,92,{en='n;w;>vu]}a0>ZDA;',}) lct:RT(3919596526,false,92,{en='S<;alu[[;>amyyC]@u[',})lct:RT(3919596526,3173817294,92,{en='S<;alu[[;>amyyC]@u[',}) lct:RT(3635291151,false,92,{en='3uw>ZYZX;>@anuv}aqw<',fr='3uw>ZYZX;>@anuv}aqw<',de='3uw>ZYZX;>@anuv}aqw<',}) - - --[[ Author: Kyoma Filename: LibTitleLocale.lua Version: 3 (Horns of the Reach) Total: 95 titles ]]-- - local LocaleTitles = { - ["de"] = + ["de"] = { - [2] = + [2] = { [1810] = "Divayth Fyrs Gehilfe", [1838] = "Der Tick-Tack-Peiniger", @@ -523,7 +429,7 @@ local LocaleTitles = [2136] = "Lichtbringer", [2075] = "Unsterblicher Erlöser", }, - [1] = + [1] = { [1810] = "Divayth Fyrs Gehilfin", [1838] = "Die Tick-Tack-Peinigerin", @@ -538,9 +444,9 @@ local LocaleTitles = [1913] = "Großchampion", }, }, - ["en"] = + ["en"] = { - [2] = + [2] = { [1810] = "Divayth Fyr's Coadjutor", [1838] = "Tick-Tock Tormentor", @@ -558,7 +464,7 @@ local LocaleTitles = [2139] = "Gryphon Heart", [2136] = "Bringer of Light", }, - [1] = + [1] = { [1810] = "Divayth Fyr's Coadjutor", [1838] = "Tick-Tock Tormentor", @@ -571,12 +477,11 @@ local LocaleTitles = [92] = "Volunteer", [1910] = "Conquering Hero", [1913] = "Grand Champion", - }, }, - ["fr"] = + ["fr"] = { - [2] = + [2] = { [1810] = "Coadjuteur de Divayth Fyr", [1838] = "Tourmenteur des Tic-tac", @@ -593,12 +498,9 @@ local LocaleTitles = [2139] = "Cœur-de-griffon", [2136] = "Porteur de lumière", [2079] = "Voix de la raison", - - }, - [1] = + [1] = { - [1810] = "Coadjutrice de Divayth Fyr", [1838] = "Tourmenteuse des Tic-tac", [1330] = "La conquérante implacable", @@ -613,15 +515,11 @@ local LocaleTitles = }, }, } - local GetAchievementRewardTitle_original - local function Unload() GetAchievementRewardTitle = GetAchievementRewardTitle_original end - local function Load() - GetAchievementRewardTitle_original = GetAchievementRewardTitle GetAchievementRewardTitle = function(achievementId, gender) local hasTitle, title = GetAchievementRewardTitle_original(achievementId, gender) @@ -632,9 +530,7 @@ local function Load() end return hasTitle, title end - LibCustomTitles.Unload = Unload end - if(LibCustomTitles.Unload) then LibCustomTitles.Unload() end -Load() +Load() \ No newline at end of file diff --git a/libs/LibStub/LibStub.lua b/libs/LibStub/LibStub.lua index 0e6bf67..5cae903 100644 --- a/libs/LibStub/LibStub.lua +++ b/libs/LibStub/LibStub.lua @@ -2,37 +2,30 @@ -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke -- LibStub developed for World of Warcraft by above members of the WowAce community. -- Ported to Elder Scrolls Online by Seerah - local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 4 local LibStub = _G[LIBSTUB_MAJOR] - local strformat = string.format if not LibStub or LibStub.minor < LIBSTUB_MINOR then LibStub = LibStub or {libs = {}, minors = {} } _G[LIBSTUB_MAJOR] = LibStub LibStub.minor = LIBSTUB_MINOR - function LibStub:NewLibrary(major, minor) assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)") if type(minor) ~= "number" then minor = assert(tonumber(zo_strmatch(minor, "%d+%.?%d*")), "Minor version must either be a number or contain a number.") end - local oldminor = self.minors[major] if oldminor and oldminor >= minor then return nil end self.minors[major], self.libs[major] = minor, self.libs[major] or {} return self.libs[major], oldminor end - function LibStub:GetLibrary(major, silent) if not self.libs[major] and not silent then error(strformat("Cannot find a library instance of %q.", tostring(major)), 2) end return self.libs[major], self.minors[major] end - function LibStub:IterateLibraries() return pairs(self.libs) end setmetatable(LibStub, { __call = LibStub.GetLibrary }) end - LibStub.SILENT = true \ No newline at end of file diff --git a/libs/LibStub/LibStub.txt b/libs/LibStub/LibStub.txt index 479f598..db654fa 100644 --- a/libs/LibStub/LibStub.txt +++ b/libs/LibStub/LibStub.txt @@ -3,5 +3,4 @@ ## Description: Universal Library Stub ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, ported to ESO by Seerah ## Version: 1.0 r4 - LibStub\LibStub.lua \ No newline at end of file diff --git a/libs/LibStub/LibStub/LibStub.lua b/libs/LibStub/LibStub/LibStub.lua index 0e6bf67..5cae903 100644 --- a/libs/LibStub/LibStub/LibStub.lua +++ b/libs/LibStub/LibStub/LibStub.lua @@ -2,37 +2,30 @@ -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke -- LibStub developed for World of Warcraft by above members of the WowAce community. -- Ported to Elder Scrolls Online by Seerah - local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 4 local LibStub = _G[LIBSTUB_MAJOR] - local strformat = string.format if not LibStub or LibStub.minor < LIBSTUB_MINOR then LibStub = LibStub or {libs = {}, minors = {} } _G[LIBSTUB_MAJOR] = LibStub LibStub.minor = LIBSTUB_MINOR - function LibStub:NewLibrary(major, minor) assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)") if type(minor) ~= "number" then minor = assert(tonumber(zo_strmatch(minor, "%d+%.?%d*")), "Minor version must either be a number or contain a number.") end - local oldminor = self.minors[major] if oldminor and oldminor >= minor then return nil end self.minors[major], self.libs[major] = minor, self.libs[major] or {} return self.libs[major], oldminor end - function LibStub:GetLibrary(major, silent) if not self.libs[major] and not silent then error(strformat("Cannot find a library instance of %q.", tostring(major)), 2) end return self.libs[major], self.minors[major] end - function LibStub:IterateLibraries() return pairs(self.libs) end setmetatable(LibStub, { __call = LibStub.GetLibrary }) end - LibStub.SILENT = true \ No newline at end of file diff --git a/locale/de.lua b/locale/de.lua index 547855b..a06680a 100644 --- a/locale/de.lua +++ b/locale/de.lua @@ -1,8 +1,5 @@ DAS_STRINGS_LOCALE = DAS_STRINGS_LOCALE or {} - local strings = { - - DAS_SI_INVITE_TRUE = "Automatisches Einladen: Aktiviert", DAS_SI_INVITE_FALSE = "Automatisches Einladen: Deaktiviert", DAS_SI_ACCEPT_TRUE = "Geteilte Quests werden automatisch akzeptiert", @@ -11,144 +8,116 @@ local strings = { DAS_SI_SHARE_FALSE = "Automatisches Teilen deaktiviert", DAS_SI_SPAM = "Klicken, um in den Chat zu spammen", DAS_SI_SPAM_VERBOSE = "Klicken, um nach Quests zu fragen", - - DAS_SI_HIDE = "DailyAutoShare ausblenden", - + DAS_SI_HIDE = "DailyAutoShare ausblenden", DAS_SI_TOGGLE = "Toggle hidden", - DAS_SI_MINIMISE = "Toggle minimised", - + DAS_SI_MINIMISE = "Toggle minimised", DAS_SI_DONATE = "Klicken für ein Dankeschön:\nLinks: 2k\nRechts: 10k\nMitte: 25k\nIch freue mich über Feedback und/oder Spenden! :)", - DAS_SI_SHARE = "Teilen", DAS_SI_TRACK = "* Verfolgen", DAS_SI_ABANDON = "|cFF0000Abbrechen|r", DAS_SI_SPAM_SINGLE = "Spammen", - DAS_SI_REFRESH ="Aktualisieren", - - + DAS_SI_REFRESH ="Aktualisieren", DAS_SI_SETOPEN_TRUE = "Toggle open", DAS_SI_SETOPEN_FALSE = "Toggle complete", - - - DAS_SLAVES_BOSS_1 = "Tödliche Umstände", - DAS_SLAVES_BOSS_2 = "Tödliche Erwartungen", - DAS_SLAVES_BOSS_3 = "Alte Schriftrollen", - DAS_SLAVES_BOSS_4 = "Alte Feinde", - DAS_SLAVES_BOSS_5 = "Alter Wuchs", - - DAS_SLAVES_DELVE_1 = "Antike Rüstungen", - DAS_SLAVES_DELVE_2 = "Grave Subject Matter", - DAS_SLAVES_DELVE_3 = "Alter Tand", - DAS_SLAVES_DELVE_4 = "Heilige Kerzen", - DAS_SLAVES_DELVE_5 = "Werkzeuge des Gemetzels", - DAS_SLAVES_DELVE_6 = "Die Last der Worte", - - DAS_SLAVES_ROOT_1 = "Aloe, die heilt", - DAS_SLAVES_ROOT_2 = "Gesandte, die kuschen", - DAS_SLAVES_ROOT_3 = "Leder, das schützt", - DAS_SLAVES_ROOT_4 = "Pilze, die nähren", - DAS_SLAVES_ROOT_5 = "Opfergaben, die sich verbergen", - - - DAS_ELF_RELIC = "Die Reliktrettung", - DAS_ELF_PILGR = "Das Ende der Pilgerfahrt", - DAS_ELF_LIGHT = "Das verlöschen des Lichts", + DAS_SLAVES_BOSS_1 = "Tödliche Umstände", + DAS_SLAVES_BOSS_2 = "Tödliche Erwartungen", + DAS_SLAVES_BOSS_3 = "Alte Schriftrollen", + DAS_SLAVES_BOSS_4 = "Alte Feinde", + DAS_SLAVES_BOSS_5 = "Alter Wuchs", + DAS_SLAVES_BOSS_6 = "Grave Mementos", + DAS_SLAVES_DELVE_1 = "Antike Rüstungen", + DAS_SLAVES_DELVE_2 = "Grave Subject Matter", + DAS_SLAVES_DELVE_3 = "Alter Tand", + DAS_SLAVES_DELVE_4 = "Heilige Kerzen", + DAS_SLAVES_DELVE_5 = "Werkzeuge des Gemetzels", + DAS_SLAVES_DELVE_6 = "Die Last der Worte", + DAS_SLAVES_ROOT_1 = "Aloe, die heilt", + DAS_SLAVES_ROOT_2 = "Gesandte, die kuschen", + DAS_SLAVES_ROOT_3 = "Leder, das schützt", + DAS_SLAVES_ROOT_4 = "Pilze, die nähren", + DAS_SLAVES_ROOT_5 = "Opfergaben, die sich verbergen", + DAS_ELF_RELIC = "Die Reliktrettung", + DAS_ELF_PILGR = "Das Ende der Pilgerfahrt", + DAS_ELF_LIGHT = "Das verlöschen des Lichts", DAS_ELF_SERPE = "Schlangentöter", DAS_ELF_MEMO = "Aus der Erinnerung getilgt", DAS_ELF_ROSE = "Die Schönheit einer Rose", - - -DAS_ELF_ALCHE = "Der Kluftalchemist", -DAS_ELF_GRAVE = "Nie vergessen", -DAS_ELF_QUEEN = "Die Seuchensee", -DAS_ELF_GRIFFIN = "Fremde Federn", +DAS_ELF_ALCHE = "Der Kluftalchemist", +DAS_ELF_GRAVE = "Nie vergessen", +DAS_ELF_QUEEN = "Die Seuchensee", +DAS_ELF_GRIFFIN = "Fremde Federn", DAS_ELF_SNAKE = "Auf Grund gelaufen", DAS_ELF_WILD = "Die Zähmung der Wildnis", - -DAS_ELF_GEYSER = "Die Versenkung Sommersends", - +DAS_ELF_GEYSER = "Die Versenkung Sommersends", -- Clockwork City -DAS_CLOCK_IMP = "Das Reizen des Unvollendeten", -DAS_CLOCK_FOE = "Ein feingefiederter Feind", - -DAS_CLOCK_CRAFT_CLOTH = "Lose Fasern", -DAS_CLOCK_CRAFT_WATER = "Eine klebrige Lösung", -DAS_CLOCK_CRAFT_RUNE = "Verzauberte Ansammlung", -DAS_CLOCK_CRAFT_SMITH = "Das tägliche Zermahlen", -DAS_CLOCK_CRAFT_ALCH = "Eine bittere Pille", -DAS_CLOCK_CRAFT_WOOD = "Brennstoff für unsere Feuer", - -DAS_CLOCK_DELVE_FILT = "Filterwechsel", -DAS_CLOCK_DELVE_FANS = "Die Ventilatoren ölen", -DAS_CLOCK_DELVE_COMM = "Gleichrichterersatz", -DAS_CLOCK_DELVE_MALF = "Eine schattige Fehlfunktion", -DAS_CLOCK_DELVE_MISP = "Ein verlegter Schatten", -DAS_CLOCK_DELVE_AGAI = "Zurück in die Schatten", - -DAS_CLOCK_CROW_GLIT = "Glitzern und Funkeln", -DAS_CLOCK_CROW_TRIB = "Eine Frage des Tributs", -DAS_CLOCK_CROW_NIBB = "Stückchen und Häppchen", -DAS_CLOCK_CROW_MORS = "Bröckchen und Bisschen", -DAS_CLOCK_CROW_RESP = "Eine Frage des Respekts", -DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", - +DAS_CLOCK_IMP = "Das Reizen des Unvollendeten", +DAS_CLOCK_FOE = "Ein feingefiederter Feind", +DAS_CLOCK_CRAFT_CLOTH = "Lose Fasern", +DAS_CLOCK_CRAFT_WATER = "Eine klebrige Lösung", +DAS_CLOCK_CRAFT_RUNE = "Verzauberte Ansammlung", +DAS_CLOCK_CRAFT_SMITH = "Das tägliche Zermahlen", +DAS_CLOCK_CRAFT_ALCH = "Eine bittere Pille", +DAS_CLOCK_CRAFT_WOOD = "Brennstoff für unsere Feuer", +DAS_CLOCK_DELVE_FILT = "Filterwechsel", +DAS_CLOCK_DELVE_FANS = "Die Ventilatoren ölen", +DAS_CLOCK_DELVE_COMM = "Gleichrichterersatz", +DAS_CLOCK_DELVE_MALF = "Eine schattige Fehlfunktion", +DAS_CLOCK_DELVE_MISP = "Ein verlegter Schatten", +DAS_CLOCK_DELVE_AGAI = "Zurück in die Schatten", +DAS_CLOCK_CROW_GLIT = "Glitzern und Funkeln", +DAS_CLOCK_CROW_TRIB = "Eine Frage des Tributs", +DAS_CLOCK_CROW_NIBB = "Stückchen und Häppchen", +DAS_CLOCK_CROW_MORS = "Bröckchen und Bisschen", +DAS_CLOCK_CROW_RESP = "Eine Frage des Respekts", +DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", -- Morrowind dailies -DAS_M_REL_ASHAL = "Relikte von Ashalmawia", -DAS_M_REL_ASSAR = "Relikte von Assarnatamat", -DAS_M_REL_ASHUR = "Relikte von Ashurnabitashpi", -DAS_M_REL_DUSHA = "Relikte von Dushariran", -DAS_M_REL_EBERN = "Relikte von Ebernanit", -DAS_M_REL_MAELK = "Relikte von Maelkashishi", +DAS_M_REL_ASHAL = "Relikte von Ashalmawia", +DAS_M_REL_ASSAR = "Relikte von Assarnatamat", +DAS_M_REL_ASHUR = "Relikte von Ashurnabitashpi", +DAS_M_REL_DUSHA = "Relikte von Dushariran", +DAS_M_REL_EBERN = "Relikte von Ebernanit", +DAS_M_REL_MAELK = "Relikte von Maelkashishi", DAS_M_REL_YASAM = "Relikte von Yasammidan", - -DAS_M_HUNT_EATER = "Jagd auf Aschfresser", -DAS_M_HUNT_ZEXXI = "Jagd auf den großen Zexxin", +DAS_M_HUNT_EATER = "Jagd auf Aschfresser", +DAS_M_HUNT_ZEXXI = "Jagd auf den großen Zexxin", DAS_M_HUNT_RAZOR = "Jagd auf König Klingenhauer", -DAS_M_HUNT_JAGGE = "Jagd auf Mutter Zackige-Klaue", -DAS_M_HUNT_STOMP = "Jagd auf den alten Stampfer", -DAS_M_HUNT_TARRA = "Jagd auf Tarra-Suj", -DAS_M_HUNT_SVEET = "Jagd auf den sich windenden Sveeth", - +DAS_M_HUNT_JAGGE = "Jagd auf Mutter Zackige-Klaue", +DAS_M_HUNT_STOMP = "Jagd auf den alten Stampfer", +DAS_M_HUNT_TARRA = "Jagd auf Tarra-Suj", +DAS_M_HUNT_SVEET = "Jagd auf den sich windenden Sveeth", -- Cave dailies (Hall of Justice) DAS_M_DELVE_DAEDR = "Daedrische Störungen", -DAS_M_DELVE_KWAMA = "Quatsch mit Kwama", +DAS_M_DELVE_KWAMA = "Quatsch mit Kwama", DAS_M_DELVE_MISIN = "Das Streuen von Fehlinformationen", DAS_M_DELVE_TAXES = "Steuerabzug", -DAS_M_DELVE_TRIBA = "Stammessorgen", -DAS_M_DELVE_SYNDI = "Ein Syndikat in Unruhe", - --- World boss dailies (Hall of Justice) -DAS_M_BOSS_WUYWU = "Ein schleichender Hunger", -DAS_M_BOSS_SWARM = "Das Ausdünnen des Schwarms", -DAS_M_BOSS_NILTH = "Frei laufende Ochsen", -DAS_M_BOSS_SALOT = "Salothans Fluch", -DAS_M_BOSS_SIREN = "Sirenensang", -DAS_M_BOSS_APPRE = "Der besorgte Lehrling", - - +DAS_M_DELVE_TRIBA = "Stammessorgen", +DAS_M_DELVE_SYNDI = "Ein Syndikat in Unruhe", +-- World boss dailies (Hall of Justice) +DAS_M_BOSS_WUYWU = "Ein schleichender Hunger", +DAS_M_BOSS_SWARM = "Das Ausdünnen des Schwarms", +DAS_M_BOSS_NILTH = "Frei laufende Ochsen", +DAS_M_BOSS_SALOT = "Salothans Fluch", +DAS_M_BOSS_SIREN = "Sirenensang", +DAS_M_BOSS_APPRE = "Der besorgte Lehrling", -- wrothgar dailies -DAS_W_POACHERS = "Fleisch für die Massen", +DAS_W_POACHERS = "Fleisch für die Massen", DAS_W_EDU = "So riecht ein falsches Spiel", -DAS_W_NYZ = "Schnee und Dampf", -DAS_W_CORI = "Die Gabe der Natur", +DAS_W_NYZ = "Schnee und Dampf", +DAS_W_CORI = "Die Gabe der Natur", DAS_W_DOLMEN = "Der Frevel des Unwissens", -DAS_W_OGRE = "Gelehrtes Bergungsgut", - +DAS_W_OGRE = "Gelehrtes Bergungsgut", -- wrothgar single -DAS_W_HARPIES = "Ein bizarres Frühstück", -DAS_W_SPIRITS = "Freie Geister", +DAS_W_HARPIES = "Ein bizarres Frühstück", +DAS_W_SPIRITS = "Freie Geister", DAS_W_DURZOGS = "Der volle Bauch", -DAS_W_DWEMER = "Teile des Ganzen", -DAS_W_WEREWOLVES = "Das Geschäft mit der Haut", -DAS_W_THAT_OTHER = "Feuer in der Feste", - - +DAS_W_DWEMER = "Teile des Ganzen", +DAS_W_WEREWOLVES = "Das Geschäft mit der Haut", +DAS_W_THAT_OTHER = "Feuer in der Feste", -- gold coast DAS_DB_MINO = "Drohende Schatten", DAS_DB_ARENA = "Das Jubeln der Menge", DAS_DB_GOOD = "Das Gemeinwohl", DAS_DB_EVIL = "Das Übel unter der Erde", - -- new life DAS_NL_STORMHAVEN = "Burgbardenherausforderung", DAS_NL_STONEFALLS = "Lavafußstampfer", @@ -159,7 +128,6 @@ DAS_NL_REAPERSMARCH = "Prüfung der Fünfkrallenlist", DAS_NL_BETNIKH = "Steinzahnsause", DAS_NL_AURIDON = "Schlammballspiele", DAS_NL_EASTMARCH = "Schneebärensprung", - -- craglorn -- lower DAS_CRAG_SARA = "Kritische Masse", @@ -169,7 +137,6 @@ DAS_CRAG_HERMY = "Das Archiv des Suchers", DAS_CRAG_ELINHIR = "Unbeschreibliche Macht", DAS_CRAG_TUWHACCA = "Die Prüfungen von Rahni’Za", DAS_CRAG_NEREID = "Wenn das Wasser giftig wird", -- this is not a single daily, it's part off The fallen City of Shada - -- upper DAS_CRAG_NIRNCRUX = "Das Blut Nirns", DAS_CRAG_WORLDTRIP = "Der graue Lauf", @@ -178,35 +145,24 @@ DAS_CRAG_NECRO = "Die Seelen der Verratenen", DAS_CRAG_KIDNAP = "Lebendig gefangen", DAS_CRAG_HITMAN = "Die wahren Giftzähne", DAS_CRAG_DUNGEON = "Entfesselt", - - -DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", -DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", - -DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", +DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", +DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", +DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", DAS_QUEST_CC_CROW = "Bursar of Tributes", DAS_QUEST_CC_NOVICE = "Novice Holli", DAS_QUEST_CC_THISTLE = "Leaps-Over-Thistle", DAS_QUEST_CC_DARO = "Adjunct Daro", DAS_QUEST_CC_TILELLE = "Intiate Tilelle", - DAS_QUEST_W_OUFA = "Sergeant Oufa", DAS_QUEST_W_USHANG = "Ushang the Untamed", - DAS_QUEST_W_BIRKHU = "Birkhu the Bold", - -DAS_QUEST_DB_ARVINA = "Cleric Arvina", - +DAS_QUEST_DB_ARVINA = "Cleric Arvina", DAS_QUEST_DB_BOUNTY = "Bounty Board", - DAS_QUEST_SS_TANO = "Justiziar Tanorian", DAS_QUEST_SS_FARO = "Justiziarin Farowel", DAS_QUEST_SS_TANE = "Battlereeve Tanerline", - - } DAS_STRINGS_LOCALE.de = strings - for stringId, stringValue in pairs(strings) do ZO_CreateStringId(stringId, stringValue) SafeAddVersion(stringId, 2) diff --git a/locale/en.lua b/locale/en.lua index 78b9a4d..ce49b72 100644 --- a/locale/en.lua +++ b/locale/en.lua @@ -10,116 +10,92 @@ local strings = { DAS_SI_SHARE_FALSE = "Not automatically sharing your active daily, most likely someone yelled at you (Right-click to share anyway)", DAS_SI_SPAM = "Click to spam in zone chat", DAS_SI_SPAM_VERBOSE = "Click to ask for quest shares", - DAS_TOGGLE_SUBLIST = "Click to open quest list", - DAS_MENU_ACTIV_EXPLAIN = "Activate or deactivate for zones below.", - DAS_SI_HIDE = "Hide DailyAutoShare", DAS_SI_TOGGLE = "Toggle hidden", - DAS_SI_MINIMISE = "Toggle minimised", - DAS_SI_REFRESH = "Refresh", - + DAS_SI_MINIMISE = "Toggle minimised", + DAS_SI_REFRESH = "Refresh", DAS_SI_DONATE = "Click to say thank you:\nLeft: 2k\nRight: 10k\nMiddle: 25k\nYour feedback and/or donation is appreciated!", - DAS_SI_SHARE = "Share", DAS_SI_TRACK = "* Track", DAS_SI_ABANDON = "|cFF0000Abandon|r", DAS_SI_SPAM_SINGLE = "Spam", DAS_SI_SETOPEN_TRUE = "Toggle open", DAS_SI_SETOPEN_FALSE = "Toggle complete", - DAS_BINGO_CODE_IS = "\nThe bingo code is ", DAS_SI_PREQUEST = "\nPrequest <<1>>: <<2>>", DAS_SI_COMPLETED = "completed", DAS_SI_OPEN = "open", - - DAS_SLAVES_QUEST1 = "Varo Hosidias", DAS_SLAVES_QUEST2 = "Tuwul", DAS_SLAVES_QUEST3 = "Erithel", - - - DAS_SLAVES_BOSS_1 = "Grave Circumstances", - DAS_SLAVES_BOSS_2 = "Grave Expectations", - DAS_SLAVES_BOSS_3 = "Old Baubles", - DAS_SLAVES_BOSS_4 = "Old Enemies", - DAS_SLAVES_BOSS_5 = "Old Growth", - - DAS_SLAVES_DELVE_1 = "Antique Armor", - DAS_SLAVES_DELVE_2 = "Grave Subject Matter", - DAS_SLAVES_DELVE_3 = "Old Scrolls", - DAS_SLAVES_DELVE_4 = "Sacred Candles", - DAS_SLAVES_DELVE_5 = "Tools of Slaughter", - DAS_SLAVES_DELVE_6 = "The Weight of Words", - - DAS_SLAVES_ROOT_1 = "Aloe That Heals", - DAS_SLAVES_ROOT_2 = "Envoys Who Cower", - DAS_SLAVES_ROOT_3 = "Leather That Protects", - DAS_SLAVES_ROOT_4 = "Mushrooms That Nourish", - DAS_SLAVES_ROOT_5 = "Offerings That Hide", - - DAS_ELF_RELIC = "Relic Runaround", - DAS_ELF_PILGR = "Pilgrimage's End", - DAS_ELF_LIGHT = "Snuffing Out the Light", + DAS_SLAVES_BOSS_1 = "Grave Circumstances", + DAS_SLAVES_BOSS_2 = "Grave Expectations", + DAS_SLAVES_BOSS_3 = "Old Baubles", + DAS_SLAVES_BOSS_4 = "Old Enemies", + DAS_SLAVES_BOSS_5 = "Old Growth", + DAS_SLAVES_BOSS_6 = "Grave Mementos", + DAS_SLAVES_DELVE_1 = "Antique Armor", + DAS_SLAVES_DELVE_2 = "Grave Subject Matter", + DAS_SLAVES_DELVE_3 = "Old Scrolls", + DAS_SLAVES_DELVE_4 = "Sacred Candles", + DAS_SLAVES_DELVE_5 = "Tools of Slaughter", + DAS_SLAVES_DELVE_6 = "The Weight of Words", + DAS_SLAVES_ROOT_1 = "Aloe That Heals", + DAS_SLAVES_ROOT_2 = "Envoys Who Cower", + DAS_SLAVES_ROOT_3 = "Leather That Protects", + DAS_SLAVES_ROOT_4 = "Mushrooms That Nourish", + DAS_SLAVES_ROOT_5 = "Offerings That Hide", + DAS_ELF_RELIC = "Relic Runaround", + DAS_ELF_PILGR = "Pilgrimage's End", + DAS_ELF_LIGHT = "Snuffing Out the Light", DAS_ELF_SERPE = "Culling Serpents", DAS_ELF_MEMO = "Struck from Memory", DAS_ELF_ROSE = "A Rose's Beauty", - - - DAS_ELF_ALCHE = "The Abyssal Alchemist", - DAS_ELF_GRAVE = "Never Forgotten", - DAS_ELF_QUEEN = "The Sickening Sea", - DAS_ELF_GRIFFIN = "Birds of a Feather", + DAS_ELF_ALCHE = "The Abyssal Alchemist", + DAS_ELF_GRAVE = "Never Forgotten", + DAS_ELF_QUEEN = "The Sickening Sea", + DAS_ELF_GRIFFIN = "Birds of a Feather", DAS_ELF_SNAKE = "Run Aground", DAS_ELF_WILD = "Taming the Wild", - - DAS_ELF_GEYSER = "Sinking Summerset", - - + DAS_ELF_GEYSER = "Sinking Summerset", -- Clockwork City - DAS_CLOCK_IMP = "Inciting the Imperfect", - DAS_CLOCK_FOE = "A Fine-Feathered Foe", - - - DAS_CLOCK_CRAFT_CLOTH = "Loose Strands", - DAS_CLOCK_CRAFT_WATER = "A Sticky Solution", - DAS_CLOCK_CRAFT_RUNE = "Enchanted Accumulation", - DAS_CLOCK_CRAFT_SMITH = "A Daily Grind", - DAS_CLOCK_CRAFT_ALCH = "A Bitter Pill", - DAS_CLOCK_CRAFT_WOOD = "Fuel for our Fires", - - DAS_CLOCK_DELVE_FILT = "Changing the Filters", - DAS_CLOCK_DELVE_FANS = "Oiling the Fans", - DAS_CLOCK_DELVE_COMM = "Replacing the Commutators", - DAS_CLOCK_DELVE_MALF = "A Shadow Malfunction", - DAS_CLOCK_DELVE_MISP = "A Shadow Misplaced", - DAS_CLOCK_DELVE_AGAI = "Again Into the Shadows", - - DAS_CLOCK_CROW_GLIT = "Glitter and Gleam", - DAS_CLOCK_CROW_TRIB = "A Matter of Tributes", - DAS_CLOCK_CROW_NIBB = "Nibbles and Bits", - DAS_CLOCK_CROW_MORS = "Morsels and Pecks", - DAS_CLOCK_CROW_RESP = "A Matter of Respect", - DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", - + DAS_CLOCK_IMP = "Inciting the Imperfect", + DAS_CLOCK_FOE = "A Fine-Feathered Foe", + DAS_CLOCK_CRAFT_CLOTH = "Loose Strands", + DAS_CLOCK_CRAFT_WATER = "A Sticky Solution", + DAS_CLOCK_CRAFT_RUNE = "Enchanted Accumulation", + DAS_CLOCK_CRAFT_SMITH = "A Daily Grind", + DAS_CLOCK_CRAFT_ALCH = "A Bitter Pill", + DAS_CLOCK_CRAFT_WOOD = "Fuel for our Fires", + DAS_CLOCK_DELVE_FILT = "Changing the Filters", + DAS_CLOCK_DELVE_FANS = "Oiling the Fans", + DAS_CLOCK_DELVE_COMM = "Replacing the Commutators", + DAS_CLOCK_DELVE_MALF = "A Shadow Malfunction", + DAS_CLOCK_DELVE_MISP = "A Shadow Misplaced", + DAS_CLOCK_DELVE_AGAI = "Again Into the Shadows", + DAS_CLOCK_CROW_GLIT = "Glitter and Gleam", + DAS_CLOCK_CROW_TRIB = "A Matter of Tributes", + DAS_CLOCK_CROW_NIBB = "Nibbles and Bits", + DAS_CLOCK_CROW_MORS = "Morsels and Pecks", + DAS_CLOCK_CROW_RESP = "A Matter of Respect", + DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", -- Morrowind dailies - DAS_M_REL_ASHAL = "Relics of Ashalmawia", - DAS_M_REL_ASSAR = "Relics of Assarnatamat", - DAS_M_REL_ASHUR = "Relics of Ashurnabitashpi", - DAS_M_REL_DUSHA = "Relics of Dushariran", - DAS_M_REL_EBERN = "Relics of Ebernanit", - DAS_M_REL_MAELK = "Relics of Maelkashishi", + DAS_M_REL_ASHAL = "Relics of Ashalmawia", + DAS_M_REL_ASSAR = "Relics of Assarnatamat", + DAS_M_REL_ASHUR = "Relics of Ashurnabitashpi", + DAS_M_REL_DUSHA = "Relics of Dushariran", + DAS_M_REL_EBERN = "Relics of Ebernanit", + DAS_M_REL_MAELK = "Relics of Maelkashishi", DAS_M_REL_YASAM = "Relics of Yasammidan", - - DAS_M_HUNT_EATER = "Ash-Eater Hunt", - DAS_M_HUNT_ZEXXI = "Great Zexxin Hunt", + DAS_M_HUNT_EATER = "Ash-Eater Hunt", + DAS_M_HUNT_ZEXXI = "Great Zexxin Hunt", DAS_M_HUNT_RAZOR = "King Razor-Tusk Hunt", - DAS_M_HUNT_JAGGE = "Mother Jagged-Claw Hunt", - DAS_M_HUNT_STOMP = "Old Stomper Hunt", - DAS_M_HUNT_TARRA = "Tarra-Suj Hunt", + DAS_M_HUNT_JAGGE = "Mother Jagged-Claw Hunt", + DAS_M_HUNT_STOMP = "Old Stomper Hunt", + DAS_M_HUNT_TARRA = "Tarra-Suj Hunt", DAS_M_HUNT_SVEET = "Writhing Sveeth Hunt", - -- World boss dailies (Hall of Justice) DAS_M_BOSS_WUYWU = "A Creeping Hunger", DAS_M_BOSS_SWARM = "Culling the Swarm", @@ -127,15 +103,13 @@ local strings = { DAS_M_BOSS_SALOT = "Salothan's Curse", DAS_M_BOSS_SIREN = "Siren's Song", DAS_M_BOSS_APPRE = "The Anxious Apprentice", - -- Cave dailies (Hall of Justice) DAS_M_DELVE_DAEDR = "Daedric Disruptions", - DAS_M_DELVE_KWAMA = "Kwama Conundrum", + DAS_M_DELVE_KWAMA = "Kwama Conundrum", DAS_M_DELVE_MISIN = "Planting Misinformation", DAS_M_DELVE_TAXES = "Tax Deduction", - DAS_M_DELVE_TRIBA = "Tribal Troubles", + DAS_M_DELVE_TRIBA = "Tribal Troubles", DAS_M_DELVE_SYNDI = "Unsettled Syndicate", - -- wrothgar dailies DAS_W_POACHERS = "Meat for the Masses", DAS_W_EDU = "Reeking of Foul Play", @@ -143,152 +117,132 @@ local strings = { DAS_W_CORI = "Nature's Bounty", DAS_W_DOLMEN = "Heresy of Ignorance", DAS_W_OGRE = "Scholarly Salvage", - -- wrothgar single - DAS_W_HARPIES = "Breakfast of the Bizarre", - DAS_W_SPIRITS = "Free Spirits", + DAS_W_HARPIES = "Breakfast of the Bizarre", + DAS_W_SPIRITS = "Free Spirits", DAS_W_DURZOGS = "Getting a Bellyful", - DAS_W_DWEMER = "Parts of the Whole", - DAS_W_WEREWOLVES = "The Skin Trade", - DAS_W_THAT_OTHER = "Fire in the Hold", - - + DAS_W_DWEMER = "Parts of the Whole", + DAS_W_WEREWOLVES = "The Skin Trade", + DAS_W_THAT_OTHER = "Fire in the Hold", -- gold coast DAS_DB_MINO = "Looming Shadows", DAS_DB_ARENA = "The Roar of the Crowds", DAS_DB_GOOD = "The Common Good", -DAS_DB_EVIL = "Buried Evil", - --- new life -DAS_NL_STORMHAVEN = "Castle Charm Challenge", -DAS_NL_STONEFALLS = "Lava Foot Stomp", -DAS_NL_ALIKR = "Signal Fire Sprint", -DAS_NL_SHADOWFEN = "Fish Boon Feast", -DAS_NL_GRAHTWOOD = "War Orphan's Sojourn", -DAS_NL_REAPERSMARCH = "The Trial of Five-Clawed Guile", -DAS_NL_BETNIKH = "Stonetooth Bash", -DAS_NL_AURIDON = "Mud Ball Merriment", -DAS_NL_EASTMARCH = "Snow Bear Plunge", - --- guild -DAS_GUILD_ANCHORS = "Dark Anchors in ", -DAS_GUILD_MADNESS = "Madness in ", - -DAS_UD_ALIKR = "Molten Pearls of Alik'r Desert", -DAS_UD_AURID = "Veiled Darkness in Auridon", -DAS_UD_BANGK = "Ancient Armaments in Bangkorai", -DAS_UD_DESHA = "Ancestor Wards in Deshaan", -DAS_UD_EASTM = "Icy Intrigue in Eastmarch", -DAS_UD_GLENU = "Red Rook Ransack in Glenumbra", -DAS_UD_GRAHT = "Ayleid Trinkets in Grahtwood", -DAS_UD_GREEN = "Culinary Justice in Greenshade", -DAS_UD_MALAB = "The Spirit Trap in Malabal Tor", -DAS_UD_REAPE = "Mascot Theft in Reaper's March", -DAS_UD_RIFT = "Inflamed Pyres of the Rift", -DAS_UD_RIVEN = "Darkness Blooms in Rivenspire", -DAS_UD_SHADO = "Give and Take in Shadowfen", -DAS_UD_STONE = "Dwarven Relics of Stonefalls", -DAS_UD_STORM = "Cursed Baubles of Stormhaven", - - --- craglorn --- lower -DAS_CRAG_SARA = "Critical Mass", -DAS_CRAG_SHADA = "The Fallen City of Shada", -DAS_CRAG_NEDE = "The Reason We Fight", -DAS_CRAG_HERMY = "The Seeker’s Archive", -DAS_CRAG_ELINHIR = "Supreme Power", -DAS_CRAG_TUWHACCA = "The Trials of Rahni’Za", -DAS_CRAG_NEREID = "Waters Run Foul", - --- upper -DAS_CRAG_NIRNCRUX = "The Blood of Nirn", -DAS_CRAG_WORLDTRIP = "The Gray Passage", -DAS_CRAG_SCALES = "Iron and Scales", -DAS_CRAG_NECRO = "Souls of the Betrayed", -DAS_CRAG_KIDNAP = "Taken Alive", -DAS_CRAG_HITMAN = "The Truer Fangs", -DAS_CRAG_DUNGEON = "Uncaged", - - -DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", -DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", - -DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", -DAS_QUEST_CC_CROW = "Bursar of Tributes", -DAS_QUEST_CC_NOVICE = "Novice Holli", -DAS_QUEST_CC_THISTLE = "Leaps-Over-Thistle", -DAS_QUEST_CC_DARO = "Adjunct Daro", -DAS_QUEST_CC_TILELLE = "Intiate Tilelle", - -DAS_QUEST_W_OUFA = "Sergeant Oufa", -DAS_QUEST_W_USHANG = "Ushang the Untamed", - -DAS_QUEST_W_BIRKHU = "Birkhu the Bold", - -DAS_QUEST_DB_ARVINA = "Cleric Arvina", - -DAS_QUEST_DB_BOUNTY = "Bounty Board", - -DAS_QUEST_CAP_CARDEA = "Cardea Gallus", -DAS_QUEST_CAP_ALVUR = "Alvur Baren", -DAS_QUEST_CAP_BOLGRUL = "Bolgrul", - -DAS_QUEST_SS_TANO = "Justiciar Tanorian", -DAS_QUEST_SS_FARO = "Justiciar Farowel", -DAS_QUEST_SS_TANE = "Battlereeve Tanerline", - -DAS_QUEST_CRY_BATTLE = "Battle Mission Board", -DAS_QUEST_CRY_BOUNTY = "Bounty Mission Board", -DAS_QUEST_CRY_SCOUT = "Scouting Mission Board", -DAS_QUEST_CRY_WARFR = "Warfront Mission Board", - --- don't need translation for anyone but the russians - I think - -DAS_QUEST_DB_LARONEN = "Laronen", -DAS_QUEST_DB_FINIA = "Finia Sele", -DAS_QUEST_DB_CODUS = "Codus ap Dugal", - -DAS_QUEST_W_NEDNOR = "Nednor", -DAS_QUEST_W_THAZEK = "Thazeg", -DAS_QUEST_W_ARUSHNA = "Arushna", -DAS_QUEST_W_LILYAMEH = "Lilyameh", -DAS_QUEST_W_BAGRUBESH = "Bagrugbesh", -DAS_QUEST_W_CIRANTILLE = "Cirantille", -DAS_QUEST_W_MENNINIA = "Menninia", -DAS_QUEST_W_SONOLIA = "Sonolia Muspidius", -DAS_QUEST_W_RAYNOR = "Raynor Vanos", -- maybe not include Raynor? - -DAS_QUEST_M_TRAYLAN = "Traylan Omoril", -DAS_QUEST_M_BELERU = "Beleru Omoril", -DAS_QUEST_M_NUMANI = "Numani-Rasi", -DAS_QUEST_M_NARA = "Nara Varam", -DAS_QUEST_M_TIRVINA = "Tirvina Avani", -DAS_QUEST_M_DINOR = "Dinor Salvi", -DAS_QUEST_M_BRAVOSI = "Bravosi Felder", -DAS_QUEST_M_IVULEN = "Ivulen Andromo", -DAS_QUEST_M_SAVILE = "Savile Alam", -DAS_QUEST_M_KYLIA = "Kylia Thando", -DAS_QUEST_M_EVOS = "Evos Hledas", -DAS_QUEST_M_ALVES = "Alves Droth", -DAS_QUEST_M_DREDASE = "Dredase-Hlarar", -DAS_QUEST_M_VORAR = "Vorar Vendu", -DAS_QUEST_M_VALGA = "Valga Celatus", - -DAS_QUEST_CC_ORC = "Razgurug", -DAS_QUEST_CC_COOK = "Aveberl Tremouille", -DAS_QUEST_CC_MINDORA = "Mindora", -DAS_QUEST_CC_NJORD = "Njordemar", -DAS_QUEST_CC_IGMUND = "Igmund", - -DAS_QUEST_W_GURUZUG = "Guruzug", -DAS_QUEST_W_ARZORAG = "Arzorag", - + DAS_DB_EVIL = "Buried Evil", + -- new life + DAS_NL_STORMHAVEN = "Castle Charm Challenge", + DAS_NL_STONEFALLS = "Lava Foot Stomp", + DAS_NL_ALIKR = "Signal Fire Sprint", + DAS_NL_SHADOWFEN = "Fish Boon Feast", + DAS_NL_GRAHTWOOD = "War Orphan's Sojourn", + DAS_NL_REAPERSMARCH = "The Trial of Five-Clawed Guile", + DAS_NL_BETNIKH = "Stonetooth Bash", + DAS_NL_AURIDON = "Mud Ball Merriment", + DAS_NL_EASTMARCH = "Snow Bear Plunge", + -- guild + DAS_GUILD_ANCHORS = "Dark Anchors in ", + DAS_GUILD_MADNESS = "Madness in ", + DAS_UD_ALIKR = "Molten Pearls of Alik'r Desert", + DAS_UD_AURID = "Veiled Darkness in Auridon", + DAS_UD_BANGK = "Ancient Armaments in Bangkorai", + DAS_UD_DESHA = "Ancestor Wards in Deshaan", + DAS_UD_EASTM = "Icy Intrigue in Eastmarch", + DAS_UD_GLENU = "Red Rook Ransack in Glenumbra", + DAS_UD_GRAHT = "Ayleid Trinkets in Grahtwood", + DAS_UD_GREEN = "Culinary Justice in Greenshade", + DAS_UD_MALAB = "The Spirit Trap in Malabal Tor", + DAS_UD_REAPE = "Mascot Theft in Reaper's March", + DAS_UD_RIFT = "Inflamed Pyres of the Rift", + DAS_UD_RIVEN = "Darkness Blooms in Rivenspire", + DAS_UD_SHADO = "Give and Take in Shadowfen", + DAS_UD_STONE = "Dwarven Relics of Stonefalls", + DAS_UD_STORM = "Cursed Baubles of Stormhaven", + -- craglorn + -- lower + DAS_CRAG_SARA = "Critical Mass", + DAS_CRAG_SHADA = "The Fallen City of Shada", + DAS_CRAG_NEDE = "The Reason We Fight", + DAS_CRAG_HERMY = "The Seeker’s Archive", + DAS_CRAG_ELINHIR = "Supreme Power", + DAS_CRAG_TUWHACCA = "The Trials of Rahni’Za", + DAS_CRAG_NEREID = "Waters Run Foul", + -- upper + DAS_CRAG_NIRNCRUX = "The Blood of Nirn", + DAS_CRAG_WORLDTRIP = "The Gray Passage", + DAS_CRAG_SCALES = "Iron and Scales", + DAS_CRAG_NECRO = "Souls of the Betrayed", + DAS_CRAG_KIDNAP = "Taken Alive", + DAS_CRAG_HITMAN = "The Truer Fangs", + DAS_CRAG_DUNGEON = "Uncaged", + DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", + DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", + DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", + DAS_QUEST_CC_CROW = "Bursar of Tributes", + DAS_QUEST_CC_NOVICE = "Novice Holli", + DAS_QUEST_CC_THISTLE = "Leaps-Over-Thistle", + DAS_QUEST_CC_DARO = "Adjunct Daro", + DAS_QUEST_CC_TILELLE = "Initiate Tilelle", + DAS_QUEST_W_OUFA = "Sergeant Oufa", + DAS_QUEST_W_USHANG = "Ushang the Untamed", + DAS_QUEST_W_BIRKHU = "Birkhu the Bold", + DAS_QUEST_DB_ARVINA = "Cleric Arvina", + DAS_QUEST_DB_BOUNTY = "Bounty Board", + DAS_QUEST_CAP_CARDEA = "Cardea Gallus", + DAS_QUEST_CAP_ALVUR = "Alvur Baren", + DAS_QUEST_CAP_BOLGRUL = "Bolgrul", + DAS_QUEST_SS_TANO = "Justiciar Tanorian", + DAS_QUEST_SS_FARO = "Justiciar Farowel", + DAS_QUEST_SS_TANE = "Battlereeve Tanerline", + DAS_QUEST_CRY_BATTLE = "Battle Mission Board", + DAS_QUEST_CRY_BOUNTY = "Bounty Mission Board", + DAS_QUEST_CRY_SCOUT = "Scouting Mission Board", + DAS_QUEST_CRY_WARFR = "Warfront Mission Board", + + -- New Life + DAS_QUEST_NL_BREDA = "Breda", + DAS_QUEST_NL_LIZARD = "Gentle-Heart", + DAS_QUEST_NL_ORC = "Matron Borbuga", + DAS_QUEST_NL_CAT = "Tumira", + + -- don't need translation for anyone but the russians - I think + DAS_QUEST_DB_LARONEN = "Laronen", + DAS_QUEST_DB_FINIA = "Finia Sele", + DAS_QUEST_DB_CODUS = "Codus ap Dugal", + DAS_QUEST_W_NEDNOR = "Nednor", + DAS_QUEST_W_THAZEK = "Thazeg", + DAS_QUEST_W_ARUSHNA = "Arushna", + DAS_QUEST_W_LILYAMEH = "Lilyameh", + DAS_QUEST_W_BAGRUBESH = "Bagrugbesh", + DAS_QUEST_W_CIRANTILLE = "Cirantille", + DAS_QUEST_W_MENNINIA = "Menninia", + DAS_QUEST_W_SONOLIA = "Sonolia Muspidius", + DAS_QUEST_W_RAYNOR = "Raynor Vanos", -- maybe not include Raynor? + DAS_QUEST_M_TRAYLAN = "Traylan Omoril", + DAS_QUEST_M_BELERU = "Beleru Omoril", + DAS_QUEST_M_NUMANI = "Numani-Rasi", + DAS_QUEST_M_NARA = "Nara Varam", + DAS_QUEST_M_TIRVINA = "Tirvina Avani", + DAS_QUEST_M_DINOR = "Dinor Salvi", + DAS_QUEST_M_BRAVOSI = "Bravosi Felder", + DAS_QUEST_M_IVULEN = "Ivulen Andromo", + DAS_QUEST_M_SAVILE = "Savile Alam", + DAS_QUEST_M_KYLIA = "Kylia Thando", + DAS_QUEST_M_EVOS = "Evos Hledas", + DAS_QUEST_M_ALVES = "Alves Droth", + DAS_QUEST_M_DREDASE = "Dredase-Hlarar", + DAS_QUEST_M_VORAR = "Vorar Vendu", + DAS_QUEST_M_VALGA = "Valga Celatus", + DAS_QUEST_CC_ORC = "Razgurug", + DAS_QUEST_CC_COOK = "Aveberl Tremouille", + DAS_QUEST_CC_MINDORA = "Mindora", + DAS_QUEST_CC_NJORD = "Njordemar", + DAS_QUEST_CC_IGMUND = "Igmund", + DAS_QUEST_W_GURUZUG = "Guruzug", + DAS_QUEST_W_ARZORAG = "Arzorag", } DailyAutoShare.EnglishQuestNames = strings DAS_STRINGS_LOCALE.en = strings - for stringId, stringValue in pairs(strings) do -ZO_CreateStringId(stringId, stringValue) -SafeAddVersion(stringId, 1) -end + ZO_CreateStringId(stringId, stringValue) + SafeAddVersion(stringId, 1) +end \ No newline at end of file diff --git a/locale/fr.lua b/locale/fr.lua index 92e0947..e066f39 100644 --- a/locale/fr.lua +++ b/locale/fr.lua @@ -1,7 +1,5 @@ DAS_STRINGS_LOCALE = DAS_STRINGS_LOCALE or {} - local strings = { - DAS_SI_INVITE_TRUE = "Invite auto activé", DAS_SI_INVITE_FALSE = "Invite auto désactivé", DAS_SI_ACCEPT_TRUE = "Accepte automatiquement les quêtes quotidienne partagées", @@ -10,137 +8,116 @@ local strings = { DAS_SI_SHARE_FALSE = "Ne partage pas votre quête active (Clic droit pour partager)", DAS_SI_SPAM = "Clic pour spam dans le chat de zone", DAS_SI_SPAM_VERBOSE = "Clic pour demander poliment une part du quest le chat de zone", - DAS_SI_HIDE = "Cacher DailyAutoShare", DAS_SI_TOGGLE = "Toggle hidden", - DAS_SI_MINIMISE = "Toggle minimised", - DAS_SI_REFRESH = "Mettre a jour", - + DAS_SI_MINIMISE = "Toggle minimised", + DAS_SI_REFRESH = "Mettre a jour", DAS_SI_DONATE = "Clic pour remercier:\nGauche: 2k\nDroit: 10k\nMilieu: 25k\nVos commentaires et/ou don seront apprécié!", - DAS_SI_SHARE = "Share", DAS_SI_TRACK = "* Track", DAS_SI_ABANDON = "|cFF0000Abandon|r", DAS_SI_SPAM_SINGLE = "Rechercher cette quête uniquement", DAS_SI_SETOPEN_TRUE = "Toggle open", DAS_SI_SETOPEN_FALSE = "Toggle complete", - - DAS_SLAVES_BOSS_1 = "Graves circonstances", - DAS_SLAVES_BOSS_2 = "Le cuir qui protège", - DAS_SLAVES_BOSS_3 = "Vieilles babioles", - DAS_SLAVES_BOSS_4 = "Vieux ennemis", - DAS_SLAVES_BOSS_5 = "Vieille croissance", - - DAS_SLAVES_DELVE_1 = "Armure antique", - DAS_SLAVES_DELVE_2 = "Grave Subject Matter", - DAS_SLAVES_DELVE_3 = "Vieux parchemins", - DAS_SLAVES_DELVE_6 = "Le poids des mots", - DAS_SLAVES_DELVE_4 = "Bougies sacrées", - DAS_SLAVES_DELVE_5 = "Les outils du massacre", - - DAS_SLAVES_ROOT_1 = "L'aloès qui soigne", - DAS_SLAVES_ROOT_2 = "Les émissaires qui hésitent", - DAS_SLAVES_ROOT_3 = "Le cuir qui protège", - DAS_SLAVES_ROOT_4 = "Les champignons qui nourrissent", - DAS_SLAVES_ROOT_5 = "Les offrandes qui cachent", - - DAS_ELF_RELIC = "La course aux reliques", - DAS_ELF_PILGR = "La fin du pélerinage", - DAS_ELF_LIGHT = "Souffler la lumière", + DAS_SLAVES_BOSS_1 = "Graves circonstances", + DAS_SLAVES_BOSS_2 = "Le cuir qui protège", + DAS_SLAVES_BOSS_3 = "Vieilles babioles", + DAS_SLAVES_BOSS_4 = "Vieux ennemis", + DAS_SLAVES_BOSS_5 = "Vieille croissance", + DAS_SLAVES_BOSS_6 = "Grave Mementos", + DAS_SLAVES_DELVE_1 = "Armure antique", + DAS_SLAVES_DELVE_2 = "Grave Subject Matter", + DAS_SLAVES_DELVE_3 = "Vieux parchemins", + DAS_SLAVES_DELVE_6 = "Le poids des mots", + DAS_SLAVES_DELVE_4 = "Bougies sacrées", + DAS_SLAVES_DELVE_5 = "Les outils du massacre", + DAS_SLAVES_ROOT_1 = "L'aloès qui soigne", + DAS_SLAVES_ROOT_2 = "Les émissaires qui hésitent", + DAS_SLAVES_ROOT_3 = "Le cuir qui protège", + DAS_SLAVES_ROOT_4 = "Les champignons qui nourrissent", + DAS_SLAVES_ROOT_5 = "Les offrandes qui cachent", + DAS_ELF_RELIC = "La course aux reliques", + DAS_ELF_PILGR = "La fin du pélerinage", + DAS_ELF_LIGHT = "Souffler la lumière", DAS_ELF_SERPE = "Abattage de serpents", DAS_ELF_MEMO = "Qu'on oublie jusqu'à leur nom", DAS_ELF_ROSE = "La beauté d'une rose", - - - DAS_ELF_ALCHE = "L'Alchimiste abyssal", - DAS_ELF_GRAVE = "Inoubliable", - DAS_ELF_QUEEN = "La mer maladive", - DAS_ELF_GRIFFIN = "Qui se ressemble", + DAS_ELF_ALCHE = "L'Alchimiste abyssal", + DAS_ELF_GRAVE = "Inoubliable", + DAS_ELF_QUEEN = "La mer maladive", + DAS_ELF_GRIFFIN = "Qui se ressemble", DAS_ELF_SNAKE = "Naufragé", DAS_ELF_WILD = "Dompter la nature", - - DAS_ELF_GEYSER = "Sinking Summerset", - + DAS_ELF_GEYSER = "Sinking Summerset", -- Clockwork City - DAS_CLOCK_IMP = "Attirer l'Imparfait", - DAS_CLOCK_FOE = "Un si beau plumage", - - DAS_CLOCK_CRAFT_CLOTH = "Détails à régler", - DAS_CLOCK_CRAFT_WATER = "La poisse", - DAS_CLOCK_CRAFT_RUNE = "Accumulation enchantée", - DAS_CLOCK_CRAFT_SMITH = "Chaque jour sur le métier", - DAS_CLOCK_CRAFT_ALCH = "Pilule amère", - DAS_CLOCK_CRAFT_WOOD = "Ce qui alimente nos feux", - - DAS_CLOCK_DELVE_FILT = "Changer les filtres", - DAS_CLOCK_DELVE_FANS = "Graisser les ventilateurs", - DAS_CLOCK_DELVE_COMM = "Remplacer les commutateurs", - DAS_CLOCK_DELVE_MALF = "Une avarie d'ombre", - DAS_CLOCK_DELVE_MISP = "Une ombre égarée", - DAS_CLOCK_DELVE_AGAI = "Retour dans les ombres vertes", - -DAS_CLOCK_CROW_GLIT = "Lueur et Chatoiement", -DAS_CLOCK_CROW_TRIB = "Une affaire de tributs", -DAS_CLOCK_CROW_NIBB = "Petites bouchées", -DAS_CLOCK_CROW_MORS = "Morceaux de choix", -DAS_CLOCK_CROW_RESP = "Une histoire de respect", -DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", - + DAS_CLOCK_IMP = "Attirer l'Imparfait", + DAS_CLOCK_FOE = "Un si beau plumage", + DAS_CLOCK_CRAFT_CLOTH = "Détails à régler", + DAS_CLOCK_CRAFT_WATER = "La poisse", + DAS_CLOCK_CRAFT_RUNE = "Accumulation enchantée", + DAS_CLOCK_CRAFT_SMITH = "Chaque jour sur le métier", + DAS_CLOCK_CRAFT_ALCH = "Pilule amère", + DAS_CLOCK_CRAFT_WOOD = "Ce qui alimente nos feux", + DAS_CLOCK_DELVE_FILT = "Changer les filtres", + DAS_CLOCK_DELVE_FANS = "Graisser les ventilateurs", + DAS_CLOCK_DELVE_COMM = "Remplacer les commutateurs", + DAS_CLOCK_DELVE_MALF = "Une avarie d'ombre", + DAS_CLOCK_DELVE_MISP = "Une ombre égarée", + DAS_CLOCK_DELVE_AGAI = "Retour dans les ombres vertes", +DAS_CLOCK_CROW_GLIT = "Lueur et Chatoiement", +DAS_CLOCK_CROW_TRIB = "Une affaire de tributs", +DAS_CLOCK_CROW_NIBB = "Petites bouchées", +DAS_CLOCK_CROW_MORS = "Morceaux de choix", +DAS_CLOCK_CROW_RESP = "Une histoire de respect", +DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", -- Morrowind dailies -DAS_M_REL_ASHAL = "Reliques d'Ashalmawia", -DAS_M_REL_ASSAR = "Reliques d'Assarnatamat", -DAS_M_REL_ASHUR = "Reliques d'Ashurnabitashpi", -DAS_M_REL_DUSHA = "Reliques de Dushariran", -DAS_M_REL_EBERN = "Reliques d'Ebernanit", -DAS_M_REL_MAELK = "Reliques de Maelkashishi", +DAS_M_REL_ASHAL = "Reliques d'Ashalmawia", +DAS_M_REL_ASSAR = "Reliques d'Assarnatamat", +DAS_M_REL_ASHUR = "Reliques d'Ashurnabitashpi", +DAS_M_REL_DUSHA = "Reliques de Dushariran", +DAS_M_REL_EBERN = "Reliques d'Ebernanit", +DAS_M_REL_MAELK = "Reliques de Maelkashishi", DAS_M_REL_YASAM = "Reliques de Yasammidan", - -DAS_M_HUNT_EATER = "Chasse à Gobe-cendre", -DAS_M_HUNT_ZEXXI = "Chasse au Grand Zexxin", +DAS_M_HUNT_EATER = "Chasse à Gobe-cendre", +DAS_M_HUNT_ZEXXI = "Chasse au Grand Zexxin", DAS_M_HUNT_RAZOR = "Chasse au Roi Défense-rasoir", -DAS_M_HUNT_JAGGE = "Mère Griffe-dentelée", -DAS_M_HUNT_STOMP = "Chasse au vieux piétineur", -DAS_M_HUNT_TARRA = "Chasse de Tarra-Suj", -DAS_M_HUNT_SVEET = "Chasse au sveeth ondulant", - +DAS_M_HUNT_JAGGE = "Mère Griffe-dentelée", +DAS_M_HUNT_STOMP = "Chasse au vieux piétineur", +DAS_M_HUNT_TARRA = "Chasse de Tarra-Suj", +DAS_M_HUNT_SVEET = "Chasse au sveeth ondulant", -- Cave dailies (Hall of Justice) DAS_M_DELVE_DAEDR = "Perturbations daedriques", -DAS_M_DELVE_KWAMA = "L'équation kwama", +DAS_M_DELVE_KWAMA = "L'équation kwama", DAS_M_DELVE_MISIN = "Plantage à la plantation", DAS_M_DELVE_TAXES = "Déduction fiscale", -DAS_M_DELVE_TRIBA = "Tribus troublées", -DAS_M_DELVE_SYNDI = "Mouvement syndical", - --- World boss dailies (Hall of Justice) -DAS_M_BOSS_WUYWU = "Une faim dévorante", -DAS_M_BOSS_SWARM = "Réduire le troupeau", -DAS_M_BOSS_NILTH = "Garanti sans bœuf", -DAS_M_BOSS_SALOT = "Malédiction de Salothan", -DAS_M_BOSS_SIREN = "Chant de la sirène", -DAS_M_BOSS_APPRE = "L'Apprenti anxieux", - +DAS_M_DELVE_TRIBA = "Tribus troublées", +DAS_M_DELVE_SYNDI = "Mouvement syndical", +-- World boss dailies (Hall of Justice) +DAS_M_BOSS_WUYWU = "Une faim dévorante", +DAS_M_BOSS_SWARM = "Réduire le troupeau", +DAS_M_BOSS_NILTH = "Garanti sans bœuf", +DAS_M_BOSS_SALOT = "Malédiction de Salothan", +DAS_M_BOSS_SIREN = "Chant de la sirène", +DAS_M_BOSS_APPRE = "L'Apprenti anxieux", -- wrothgar dailies -DAS_W_POACHERS = "Nourrir les foules", +DAS_W_POACHERS = "Nourrir les foules", DAS_W_EDU = "L'odeur du crime", DAS_W_NYZ = "Neige et vapeur", -DAS_W_CORI = "Abondance de la nature", +DAS_W_CORI = "Abondance de la nature", DAS_W_DOLMEN = "Hérésie par l'ignorance", -DAS_W_OGRE = "Sauvetage académique", - +DAS_W_OGRE = "Sauvetage académique", -- wrothgar single -DAS_W_HARPIES = "Petit-déjeuner de l'étrange", -DAS_W_SPIRITS = "Esprits libres", +DAS_W_HARPIES = "Petit-déjeuner de l'étrange", +DAS_W_SPIRITS = "Esprits libres", DAS_W_DURZOGS = "Plein la panse !", -DAS_W_DWEMER = "Parties du tout", -DAS_W_WEREWOLVES = "Commerce de peaux", -DAS_W_THAT_OTHER = "Incendie au fort", - +DAS_W_DWEMER = "Parties du tout", +DAS_W_WEREWOLVES = "Commerce de peaux", +DAS_W_THAT_OTHER = "Incendie au fort", -- gold coast DAS_DB_MINO = "Ombres menaçantes", DAS_DB_ARENA = "Le hurlement des foules", DAS_DB_EVIL = "Mal enfoui", DAS_DB_GOOD = "Le bien commun", - -- new life DAS_NL_STORMHAVEN = "Castle Charm Challenge", DAS_NL_STONEFALLS = "Lava Foot Stomp", @@ -151,8 +128,6 @@ DAS_NL_REAPERSMARCH = "The Trial of Five-Clawed Guile", DAS_NL_BETNIKH = "Stonetooth Bash", DAS_NL_AURIDON = "Mud Ball Merriment", DAS_NL_EASTMARCH = "Snow Bear Plunge", - - -- craglorn -- lower DAS_CRAG_SARA = "Masse critique", @@ -162,7 +137,6 @@ DAS_CRAG_HERMY = "L'Archive des Sourciers", DAS_CRAG_ELINHIR = "Puissance supérieur", DAS_CRAG_TUWHACCA = "Les épreuves de Rahni’Za", DAS_CRAG_NEREID = "Les eaux se troubles", - -- upper DAS_CRAG_NIRNCRUX = "Le sang de Nirn", DAS_CRAG_WORLDTRIP = "Passage gris", @@ -171,32 +145,21 @@ DAS_CRAG_NECRO = "Les âmes des trahis", DAS_CRAG_KIDNAP = "Capturés vivants", DAS_CRAG_HITMAN = "Les crocs ajustés", DAS_CRAG_DUNGEON = "Libéré", - - - -DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", -DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", - -DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", +DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", +DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", +DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", DAS_QUEST_CC_CROW = "Bursar of Tributes", DAS_QUEST_CC_NOVICE = "Novice Holli", DAS_QUEST_CC_THISTLE = "Leaps-Over-Thistle", DAS_QUEST_CC_DARO = "Adjunct Daro", DAS_QUEST_CC_TILELLE = "Intiate Tilelle", - DAS_QUEST_W_OUFA = "Sergeant Oufa", DAS_QUEST_W_USHANG = "Ushang the Untamed", - DAS_QUEST_W_BIRKHU = "Birkhu the Bold", - -DAS_QUEST_DB_ARVINA = "Cleric Arvina", - -DAS_QUEST_DB_BOUNTY = "Bounty Board", - - +DAS_QUEST_DB_ARVINA = "Cleric Arvina", +DAS_QUEST_DB_BOUNTY = "Bounty Board", } DAS_STRINGS_LOCALE.fr = strings - for stringId, stringValue in pairs(strings) do ZO_CreateStringId(stringId, stringValue) SafeAddVersion(stringId, 2) diff --git a/locale/jp.lua b/locale/jp.lua index 28f7d9d..08a6e68 100644 --- a/locale/jp.lua +++ b/locale/jp.lua @@ -1,5 +1,4 @@ DAS_STRINGS_LOCALE = DAS_STRINGS_LOCALE or {} - local strings = { -- UI stuffs DAS_SI_INVITE_TRUE = "Invite is now on", @@ -10,72 +9,60 @@ local strings = { DAS_SI_SHARE_FALSE = "Not automatically sharing your active daily, most likely someone yelled at you (Right-click to share anyway)", DAS_SI_SPAM = "Click to spam in zone chat", DAS_SI_SPAM_VERBOSE = "Click to ask for quest shares", - DAS_SI_HIDE = "Hide DailyAutoShare", DAS_SI_TOGGLE = "Toggle hidden", - DAS_SI_MINIMISE = "Toggle minimised", - DAS_SI_REFRESH = "Refresh", - + DAS_SI_MINIMISE = "Toggle minimised", + DAS_SI_REFRESH = "Refresh", DAS_SI_DONATE = "Click to say thank you:\nLeft: 2k\nRight: 10k\nMiddle: 25k\nYour feedback and/or donation is appreciated!", - DAS_SI_SHARE = "Share", DAS_SI_TRACK = "* Track", DAS_SI_ABANDON = "|cFF0000Abandon|r", DAS_SI_SPAM_SINGLE = "Spam", DAS_SI_SETOPEN_TRUE = "Toggle open", DAS_SI_SETOPEN_FALSE = "Toggle complete", - -- Clockwork City - DAS_CLOCK_IMP = "Inciting the Imperfect", - DAS_CLOCK_FOE = "A Fine-Feathered Foe", - - DAS_CLOCK_CRAFT_CLOTH = "Loose Strands", - DAS_CLOCK_CRAFT_WATER = "A Sticky Solution", - DAS_CLOCK_CRAFT_RUNE = "Enchanted Accumulation", - DAS_CLOCK_CRAFT_SMITH = "A Daily Grind", - DAS_CLOCK_CRAFT_ALCH = "A Bitter Pill", - DAS_CLOCK_CRAFT_WOOD = "Fuel for our Fires", - - DAS_CLOCK_DELVE_FILT = "Changing the Filters", - DAS_CLOCK_DELVE_FANS = "Oiling the Fans", - DAS_CLOCK_DELVE_COMM = "Replacing the Commutators", - DAS_CLOCK_DELVE_MALF = "A Shadow Malfunction", - DAS_CLOCK_DELVE_MISP = "A Shadow Misplaced", - DAS_CLOCK_DELVE_AGAI = "Again Into the Shadows", - - DAS_CLOCK_CROW_GLIT = "Glitter and Gleam", - DAS_CLOCK_CROW_TRIB = "A Matter of Tributes", - DAS_CLOCK_CROW_NIBB = "Nibbles and Bits", - DAS_CLOCK_CROW_MORS = "Morsels and Pecks", - DAS_CLOCK_CROW_RESP = "A Matter of Respect", - DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", - - + DAS_CLOCK_IMP = "Inciting the Imperfect", + DAS_CLOCK_FOE = "A Fine-Feathered Foe", + DAS_CLOCK_CRAFT_CLOTH = "Loose Strands", + DAS_CLOCK_CRAFT_WATER = "A Sticky Solution", + DAS_CLOCK_CRAFT_RUNE = "Enchanted Accumulation", + DAS_CLOCK_CRAFT_SMITH = "A Daily Grind", + DAS_CLOCK_CRAFT_ALCH = "A Bitter Pill", + DAS_CLOCK_CRAFT_WOOD = "Fuel for our Fires", + DAS_CLOCK_DELVE_FILT = "Changing the Filters", + DAS_CLOCK_DELVE_FANS = "Oiling the Fans", + DAS_CLOCK_DELVE_COMM = "Replacing the Commutators", + DAS_CLOCK_DELVE_MALF = "A Shadow Malfunction", + DAS_CLOCK_DELVE_MISP = "A Shadow Misplaced", + DAS_CLOCK_DELVE_AGAI = "Again Into the Shadows", + DAS_CLOCK_CROW_GLIT = "Glitter and Gleam", + DAS_CLOCK_CROW_TRIB = "A Matter of Tributes", + DAS_CLOCK_CROW_NIBB = "Nibbles and Bits", + DAS_CLOCK_CROW_MORS = "Morsels and Pecks", + DAS_CLOCK_CROW_RESP = "A Matter of Respect", + DAS_CLOCK_CROW_LEIS = "A Matter of Leisure", -- Morrowind dailies - DAS_M_REL_ASHAL = "Relics of Ashalmawia", - DAS_M_REL_ASSAR = "Relics of Assarnatamat", - DAS_M_REL_ASHUR = "Relics of Ashurnabitashpi", - DAS_M_REL_DUSHA = "Relics of Dushariran", - DAS_M_REL_EBERN = "Relics of Ebernanit", - DAS_M_REL_MAELK = "Relics of Maelkashishi", + DAS_M_REL_ASHAL = "Relics of Ashalmawia", + DAS_M_REL_ASSAR = "Relics of Assarnatamat", + DAS_M_REL_ASHUR = "Relics of Ashurnabitashpi", + DAS_M_REL_DUSHA = "Relics of Dushariran", + DAS_M_REL_EBERN = "Relics of Ebernanit", + DAS_M_REL_MAELK = "Relics of Maelkashishi", DAS_M_REL_YASAM = "Relics of Yasammidan", - - DAS_M_HUNT_EATER = "Ash-Eater Hunt", - DAS_M_HUNT_ZEXXI = "Great Zexxin Hunt", + DAS_M_HUNT_EATER = "Ash-Eater Hunt", + DAS_M_HUNT_ZEXXI = "Great Zexxin Hunt", DAS_M_HUNT_RAZOR = "King Razor-Tusk Hunt", - DAS_M_HUNT_JAGGE = "Mother Jagged-Claw Hunt", - DAS_M_HUNT_STOMP = "Old Stomper Hunt", - DAS_M_HUNT_TARRA = "Tarra-Suj Hunt", - DAS_M_HUNT_SVEET = "Writhing Sveeth Hunt", - + DAS_M_HUNT_JAGGE = "Mother Jagged-Claw Hunt", + DAS_M_HUNT_STOMP = "Old Stomper Hunt", + DAS_M_HUNT_TARRA = "Tarra-Suj Hunt", + DAS_M_HUNT_SVEET = "Writhing Sveeth Hunt", -- Cave dailies (Hall of Justice) DAS_M_DELVE_DAEDR = "Daedric Disruptions", - DAS_M_DELVE_KWAMA = "Kwama Conundrum", + DAS_M_DELVE_KWAMA = "Kwama Conundrum", DAS_M_DELVE_MISIN = "Planting Misinformation", DAS_M_DELVE_TAXES = "Tax Deduction", - DAS_M_DELVE_TRIBA = "Tribal Troubles", + DAS_M_DELVE_TRIBA = "Tribal Troubles", DAS_M_DELVE_SYNDI = "Unsettled Syndicate", - -- World boss dailies (Hall of Justice) DAS_M_BOSS_WUYWU = "A Creeping Hunger", DAS_M_BOSS_SWARM = "Culling the Swarm", @@ -83,7 +70,6 @@ local strings = { DAS_M_BOSS_SALOT = "Salothan's Curse", DAS_M_BOSS_SIREN = "Siren's Song", DAS_M_BOSS_APPRE = "The Anxious Apprentice", - -- wrothgar dailies DAS_W_POACHERS = "Meat for the Masses", DAS_W_EDU = "Reeking of Foul Play", @@ -91,26 +77,20 @@ local strings = { DAS_W_CORI = "Nature's Bounty", DAS_W_DOLMEN = "Heresy of Ignorance", DAS_W_OGRE = "Scholarly Salvage", - DAS_W_BOSS_START = "I'm here to work. What do you have for me?", DAS_W_DELVE_START = "What do you have for me?", - -- wrothgar single - DAS_W_HARPIES = "Breakfast of the Bizarre", - DAS_W_SPIRITS = "Free Spirits", + DAS_W_HARPIES = "Breakfast of the Bizarre", + DAS_W_SPIRITS = "Free Spirits", DAS_W_DURZOGS = "Getting a Bellyful", - DAS_W_DWEMER = "Parts of the Whole", - DAS_W_WEREWOLVES = "The Skin Trade", - DAS_W_THAT_OTHER = "Fire in the Hold", - - + DAS_W_DWEMER = "Parts of the Whole", + DAS_W_WEREWOLVES = "The Skin Trade", + DAS_W_THAT_OTHER = "Fire in the Hold", -- gold coast DAS_DB_MINO = "Looming Shadows", DAS_DB_ARENA = "The Roar of the Crowd", DAS_DB_GOOD = "Common Good", DAS_DB_EVIL = "Buried Evil", - - -- new life DAS_NL_STORMHAVEN = "Castle Charm Challenge", DAS_NL_STONEFALLS = "Lava Foot Stomp", @@ -121,8 +101,6 @@ local strings = { DAS_NL_BETNIKH = "Stonetooth Bash", DAS_NL_AURIDON = "Mud Ball Merriment", DAS_NL_EASTMARCH = "Snow Bear Plunge", - - -- craglorn -- lower DAS_CRAG_SARA = "Critical Mass", @@ -132,7 +110,6 @@ local strings = { DAS_CRAG_ELINHIR = "Supreme Power", DAS_CRAG_TUWHACCA = "The Trials of Rahni’Za", DAS_CRAG_NEREID = "Waters Run Foul", - -- upper DAS_CRAG_NIRNCRUX = "The Blood of Nirn", DAS_CRAG_WORLDTRIP = "The Gray Passage", @@ -141,34 +118,22 @@ local strings = { DAS_CRAG_KIDNAP = "Taken Alive", DAS_CRAG_HITMAN = "The Truer Fangs", DAS_CRAG_DUNGEON = "Uncaged", - - - - DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", - DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", - - DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", + DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", + DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", + DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", DAS_QUEST_CC_CROW = "Bursar of Tributes", DAS_QUEST_CC_NOVICE = "Novice Holli", DAS_QUEST_CC_THISTLE = "Leaps-Over-Thistle", DAS_QUEST_CC_DARO = "Adjunct Daro", DAS_QUEST_CC_TILELLE = "Intiate Tilelle", - DAS_QUEST_W_OUFA = "Sergeant Oufa", DAS_QUEST_W_USHANG = "Ushang the Untamed", - DAS_QUEST_W_BIRKHU = "Birkhu the Bold", - - DAS_QUEST_DB_ARVINA = "Cleric Arvina", - - DAS_QUEST_DB_BOUNTY = "Bounty Board", - - - + DAS_QUEST_DB_ARVINA = "Cleric Arvina", + DAS_QUEST_DB_BOUNTY = "Bounty Board", } DAS_STRINGS_LOCALE.jp = strings - for stringId, stringValue in pairs(strings) do ZO_CreateStringId(stringId, stringValue) SafeAddVersion(stringId, 1) -end +end \ No newline at end of file diff --git a/locale/ru.lua b/locale/ru.lua index d58356d..d41cb29 100644 --- a/locale/ru.lua +++ b/locale/ru.lua @@ -1,7 +1,5 @@ DAS_STRINGS_LOCALE = DAS_STRINGS_LOCALE or {} - local strings = { - DAS_SI_INVITE_TRUE = "Invite is now on", DAS_SI_INVITE_FALSE = "Invite is now off", DAS_SI_ACCEPT_TRUE = "Automatically accepting quest shares for dailies", @@ -10,73 +8,60 @@ local strings = { DAS_SI_SHARE_FALSE = "Not automatically sharing your active daily, most likely someone yelled at you (Right-click to share anyway)", DAS_SI_SPAM = "Click to spam in zone chat", DAS_SI_SPAM_VERBOSE = "Click to ask for quest shares", - DAS_SI_HIDE = "Hide DailyAutoShare", DAS_SI_TOGGLE = "Toggle hidden", - DAS_SI_MINIMISE = "Toggle minimised", - DAS_SI_REFRESH = "Refresh", - + DAS_SI_MINIMISE = "Toggle minimised", + DAS_SI_REFRESH = "Refresh", DAS_SI_DONATE = "Click to say thank you:\nLeft: 2k\nRight: 10k\nMiddle: 25k\nYour feedback and/or donation is appreciated!", - DAS_SI_SHARE = "Share", DAS_SI_TRACK = "* Track", DAS_SI_ABANDON = "|cFF0000Abandon|r", DAS_SI_SPAM_SINGLE = "Spam", DAS_SI_SETOPEN_TRUE = "Toggle open", DAS_SI_SETOPEN_FALSE = "Toggle complete", - -- Clockwork City - DAS_CLOCK_IMP = "Пробуждение Несовершенства", - DAS_CLOCK_FOE = "Враг в прекрасном оперении", - - DAS_CLOCK_CRAFT_CLOTH = "Свободные нити", - DAS_CLOCK_CRAFT_WATER = "Липкое решение", - DAS_CLOCK_CRAFT_RUNE = "Сбор зачарований", - DAS_CLOCK_CRAFT_SMITH = "Ежедневная молотилка", - DAS_CLOCK_CRAFT_ALCH = "Горькая пилюля", - DAS_CLOCK_CRAFT_WOOD = "Масло в огонь", - - DAS_CLOCK_DELVE_FILT = "Замена фильтров", - DAS_CLOCK_DELVE_FANS = "Смазывание вентиляторов", - DAS_CLOCK_DELVE_COMM = "Замена преобразователей", - DAS_CLOCK_DELVE_MALF = "Сумрачная неисправность", - DAS_CLOCK_DELVE_MISP = "Пропавшая тень", - DAS_CLOCK_DELVE_AGAI = "Обратно в тень", - - DAS_CLOCK_CROW_GLIT = "Шик и блеск", - DAS_CLOCK_CROW_TRIB = "Вопрос о подношениях", - DAS_CLOCK_CROW_NIBB = "Кусочки и частички", - DAS_CLOCK_CROW_MORS = "Лакомые кусочки", - DAS_CLOCK_CROW_RESP = "Вопрос уважения", - DAS_CLOCK_CROW_LEIS = "Вопрос о свободном времени", - - + DAS_CLOCK_IMP = "Пробуждение Несовершенства", + DAS_CLOCK_FOE = "Враг в прекрасном оперении", + DAS_CLOCK_CRAFT_CLOTH = "Свободные нити", + DAS_CLOCK_CRAFT_WATER = "Липкое решение", + DAS_CLOCK_CRAFT_RUNE = "Сбор зачарований", + DAS_CLOCK_CRAFT_SMITH = "Ежедневная молотилка", + DAS_CLOCK_CRAFT_ALCH = "Горькая пилюля", + DAS_CLOCK_CRAFT_WOOD = "Масло в огонь", + DAS_CLOCK_DELVE_FILT = "Замена фильтров", + DAS_CLOCK_DELVE_FANS = "Смазывание вентиляторов", + DAS_CLOCK_DELVE_COMM = "Замена преобразователей", + DAS_CLOCK_DELVE_MALF = "Сумрачная неисправность", + DAS_CLOCK_DELVE_MISP = "Пропавшая тень", + DAS_CLOCK_DELVE_AGAI = "Обратно в тень", + DAS_CLOCK_CROW_GLIT = "Шик и блеск", + DAS_CLOCK_CROW_TRIB = "Вопрос о подношениях", + DAS_CLOCK_CROW_NIBB = "Кусочки и частички", + DAS_CLOCK_CROW_MORS = "Лакомые кусочки", + DAS_CLOCK_CROW_RESP = "Вопрос уважения", + DAS_CLOCK_CROW_LEIS = "Вопрос о свободном времени", -- Morrowind dailies - DAS_M_REL_ASHAL = "Реликвии Ашалмавии", - DAS_M_REL_ASSAR = "Реликвии Ассарнатамата", - DAS_M_REL_ASHUR = "Реликвии Ассурнабиташпи", - DAS_M_REL_DUSHA = "Реликвии Душарирана", - DAS_M_REL_EBERN = "Реликвии Эбернанита", - DAS_M_REL_MAELK = "Реликвии Мелкашиши", + DAS_M_REL_ASHAL = "Реликвии Ашалмавии", + DAS_M_REL_ASSAR = "Реликвии Ассарнатамата", + DAS_M_REL_ASHUR = "Реликвии Ассурнабиташпи", + DAS_M_REL_DUSHA = "Реликвии Душарирана", + DAS_M_REL_EBERN = "Реликвии Эбернанита", + DAS_M_REL_MAELK = "Реликвии Мелкашиши", DAS_M_REL_YASAM = "Реликвии Ясаммидана", - - DAS_M_HUNT_EATER = "Охота на Пеплоеда", - DAS_M_HUNT_ZEXXI = "Охота на Великого Зексина", + DAS_M_HUNT_EATER = "Охота на Пеплоеда", + DAS_M_HUNT_ZEXXI = "Охота на Великого Зексина", DAS_M_HUNT_RAZOR = "Охота на Короля Острый Клык", - DAS_M_HUNT_JAGGE = "Охота на Мать Зазубренная Клешня", - DAS_M_HUNT_STOMP = "Охота на Старого Топотуна", - DAS_M_HUNT_TARRA = "Охота на Тарра-Судж", - DAS_M_HUNT_SVEET = "Охота на Извивающегося Свита", - + DAS_M_HUNT_JAGGE = "Охота на Мать Зазубренная Клешня", + DAS_M_HUNT_STOMP = "Охота на Старого Топотуна", + DAS_M_HUNT_TARRA = "Охота на Тарра-Судж", + DAS_M_HUNT_SVEET = "Охота на Извивающегося Свита", -- Cave dailies (Hall of Justice) DAS_M_DELVE_DAEDR = "Даэдрический срыв", - DAS_M_DELVE_KWAMA = "Задачка с квама", + DAS_M_DELVE_KWAMA = "Задачка с квама", DAS_M_DELVE_MISIN = "Насаждение дезинформации", DAS_M_DELVE_TAXES = "Налоговый вычет", - DAS_M_DELVE_TRIBA = "Проблемы племени", + DAS_M_DELVE_TRIBA = "Проблемы племени", DAS_M_DELVE_SYNDI = "Беспокойный синдикат", - - -- World boss dailies (Hall of Justice) DAS_M_BOSS_WUYWU = "Затаившийся алчущий", DAS_M_BOSS_SWARM = "Отбраковка колонии", @@ -84,8 +69,6 @@ local strings = { DAS_M_BOSS_SALOT = "Проклятье Салотанов", DAS_M_BOSS_SIREN = "Песня сирены", DAS_M_BOSS_APPRE = "Обеспокоенная ученица", - - -- wrothgar dailies DAS_W_POACHERS = "Мясо в массы", DAS_W_EDU = "Запах нечестной игры", @@ -93,23 +76,18 @@ local strings = { DAS_W_CORI = "Щедрость природы", DAS_W_DOLMEN = "Ересь невежества", DAS_W_OGRE = "Спасение во имя знаний", - -- wrothgar single - DAS_W_HARPIES = "Завтрак чудака", - DAS_W_SPIRITS = "Свободные духи", + DAS_W_HARPIES = "Завтрак чудака", + DAS_W_SPIRITS = "Свободные духи", DAS_W_DURZOGS = "До отвала", - DAS_W_DWEMER = "Части целого", - DAS_W_WEREWOLVES = "Торговля кожей", - DAS_W_THAT_OTHER = "Пожар во владении", - - - + DAS_W_DWEMER = "Части целого", + DAS_W_WEREWOLVES = "Торговля кожей", + DAS_W_THAT_OTHER = "Пожар во владении", -- gold coast DAS_DB_MINO = "Надвигающиеся тени", DAS_DB_ARENA = "Рев толпы", DAS_DB_GOOD = "Всеобщее благо", DAS_DB_EVIL = "Захороненное зло", - -- new life DAS_NL_STORMHAVEN = "Замковое состязание очарования", DAS_NL_STONEFALLS = "Пляска лавовых ног", @@ -120,7 +98,6 @@ local strings = { DAS_NL_BETNIKH = "Удар Каменного зуба", DAS_NL_AURIDON = "Развлечение с комками грязи", DAS_NL_EASTMARCH = "Ныряние снежного медведя", - -- craglorn -- lower DAS_CRAG_SARA = "Критическая масса", @@ -130,7 +107,6 @@ local strings = { DAS_CRAG_ELINHIR = "Высшая сила", DAS_CRAG_TUWHACCA = "Испытания Рахни'За", DAS_CRAG_NEREID = "Испорченная вода", - -- upper DAS_CRAG_NIRNCRUX = "Кровь Нирна", DAS_CRAG_WORLDTRIP = "Серый проход", @@ -138,42 +114,27 @@ local strings = { DAS_CRAG_NECRO = "Души преданных", DAS_CRAG_KIDNAP = "Живые пленники", DAS_CRAG_HITMAN = "Настоящие клыки", - DAS_CRAG_DUNGEON = "Освобожденные", - - - + DAS_CRAG_DUNGEON = "Освобожденные", -- Questgiver names -- - - - - DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", - DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", - - DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", + DAS_QUEST_M_ASHLANDER = "Huntmaster Sorim-Nakar", + DAS_QUEST_M_RIVYN = "Battlemaster Rivyn", + DAS_QUEST_CC_ROBOT = "Clockwork Facilitator", DAS_QUEST_CC_CROW = "Bursar of Tributes", DAS_QUEST_CC_NOVICE = "Novice Holli", DAS_QUEST_CC_THISTLE = "Leaps-Over-Thistle", DAS_QUEST_CC_DARO = "Adjunct Daro", DAS_QUEST_CC_TILELLE = "Intiate Tilelle", - DAS_QUEST_W_OUFA = "Sergeant Oufa", DAS_QUEST_W_USHANG = "Ushang the Untamed", - DAS_QUEST_W_BIRKHU = "Birkhu the Bold", - - DAS_QUEST_DB_ARVINA = "Cleric Arvina", - - DAS_QUEST_DB_BOUNTY = "Bounty Board", - - + DAS_QUEST_DB_ARVINA = "Cleric Arvina", + DAS_QUEST_DB_BOUNTY = "Bounty Board", -- don't need translation for anyone but the russians - I think - DAS_QUEST_DB_LARONEN = "Laronen", DAS_QUEST_DB_FINIA = "Finia Sele", DAS_QUEST_DB_CODUS = "Codus ap Dugal", - - DAS_QUEST_W_NEDNOR = "Nednor", - DAS_QUEST_W_THAZEK = "Thazeg", + DAS_QUEST_W_NEDNOR = "Nednor", + DAS_QUEST_W_THAZEK = "Thazeg", DAS_QUEST_W_ARUSHNA = "Arushna", DAS_QUEST_W_LILYAMEH = "Lilyameh", DAS_QUEST_W_BAGRUBESH = "Bagrugbesh", @@ -181,7 +142,6 @@ local strings = { DAS_QUEST_W_MENNINIA = "Menninia", DAS_QUEST_W_SONOLIA = "Sonolia Muspidius", DAS_QUEST_W_RAYNOR = "Raynor Vanos", -- maybe not include Raynor? - DAS_QUEST_M_TRAYLAN = "Traylan Omoril", DAS_QUEST_M_BELERU = "Beleru Omoril", DAS_QUEST_M_NUMANI = "Numani-Rasi", @@ -196,22 +156,15 @@ local strings = { DAS_QUEST_M_ALVES = "Alves Droth", DAS_QUEST_M_DREDASE = "Dredase-Hlarar", DAS_QUEST_M_VORAR = "Vorar Vendu", - DAS_QUEST_CC_ORC = "Razgurug", DAS_QUEST_CC_COOK = "Aveberl Tremouille", DAS_QUEST_CC_MINDORA = "Mindora", DAS_QUEST_CC_NJORD = "Njordemar", DAS_QUEST_CC_IGMUND = "Igmund", - DAS_QUEST_W_GURUZUG = "Guruzug", DAS_QUEST_W_ARZORAG = "Arzorag", - - - } - DAS_STRINGS_LOCALE.ru = strings - for stringId, stringValue in pairs(strings) do ZO_CreateStringId(stringId, stringValue) SafeAddVersion(stringId, 2) diff --git a/questData/00_ExampleQuestData.lua b/questData/00_ExampleQuestData.lua index baf0fb5..81e5493 100644 --- a/questData/00_ExampleQuestData.lua +++ b/questData/00_ExampleQuestData.lua @@ -1,114 +1,81 @@ -- If I suddenly drop dead and you want to maintain this AddOn - -- specify the zone ID as local variable local zoneId = 666 - - -- have two local tables. The first is for quest names, the second is for the corresponding bingo codes. local tbl = {} local tbl2 = {} - - - ---[[ - - set up the tables. Order of quests in the UI depends on the order you add them here. - +--[[ + set up the tables. Order of quests in the UI depends on the order you add them here. Important: You have to use GetString(YOUR_QUEST_NAME_CONSTANT) here, or localization won't work. Localization strings are defined in ../locale/<lang>.lua - --]] - table.insert(tbl, GetString(YOUR_QUEST_NAME_CONSTANT)) table.insert(tbl2, {[1] = "bingo", [2] = "das", [3] = "DailyAutoshare", [4] = "example", [5] = "inviteme", [6] = "test"}) - -- rinse and repeat, until all your corresponding quest names / bingo strings are in your tables table.insert(tbl, GetString(YOUR_QUEST_NAME_CONSTANT2)) table.insert(tbl2, "bingo") - -- ... - - -- now set the table with the quest names for the zone DAS.shareables[zoneId] = tbl - -- call the func to make the bingo table. -DAS.makeBingoTable(zoneId, tbl2) - +DAS.makeBingoTable(zoneId, tbl2) --[[ you now have two maps: -- {questName -> questId} -- {bingoCode -> questId} - -- to save performance, the quest ID is stored in the control, on top of that there's a table somewhere in the DAS table that holds - -- the active quest IDs. There's a lot of redundancy in this AddOn, since I've dropped dead, feel free to optimize. + -- the active quest IDs. There's a lot of redundancy in this AddOn, since I've dropped dead, feel free to optimize. -- ]] - --- If there are subzones, you register them like this: - +-- If there are subzones, you register them like this: DAS.subzones[zoneId+1] = zoneId DAS.subzones[zoneId+2] = zoneId DAS.subzones[zoneId+3] = zoneId - --- Quest lookup happens via - +-- Quest lookup happens via local zoneId = DAS.GetZoneId() local quests = DAS.shareables[zoneId] or DAS.shareables[DAS.subzones[zoneId]] or {} ---[[ +--[[ That way, if you're in a zone's subzone, it will show the zone's parent quests, unless you feel like setting up extra tables for those that only show the current (delve) quest. See Morrowind.lua for examples of that. -- ]] - --- set up auto quest accept: +-- set up auto quest accept: DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_YOUR_NPC1)] = true, -- Questgiver 1 [GetString(DAS_QUEST_YOUR_NPC2)] = true, -- Questgiver 2 [GetString(DAS_QUEST_YOUR_NPC3)] = true, -- Questgiver 3 } - --- set up auto quest turnin: +-- set up auto quest turnin: DAS.questFinisher[zoneId] = { - [GetString(DAS_QUEST_YOUR_NPC1)] = true, - [GetString(DAS_QUEST_YOUR_NPC2)] = true, + [GetString(DAS_QUEST_YOUR_NPC1)] = true, + [GetString(DAS_QUEST_YOUR_NPC2)] = true, -- fictional NPC3 just hands out, doesn't accept } - ---[[ - I'm matching against the quest IDs for auto accepting quest shares. - Reason: Comparing numbers is a tonne cheaper than comparing strings. - Make sure you register the quest IDs. Unfortunately, you can only see them - when you get a quest shared OR via iteration after yu have completed those. +--[[ + I'm matching against the quest IDs for auto accepting quest shares. + Reason: Comparing numbers is a tonne cheaper than comparing strings. + Make sure you register the quest IDs. Unfortunately, you can only see them + when you get a quest shared OR via iteration after yu have completed those. -- ]] - --- Set up like below (Morrowind example): +-- Set up like below (Morrowind example): DAS.questIds[zoneId] = { [5924] = true, -- "Relics of Yasammidan", [5925] = true, -- "Relics of Assarnatamat", } - --- or by loop (Summerset example) +-- or by loop (Summerset example) DAS.questIds[zoneId] = {} - for i=6082, 6087 do DAS.questIds[zoneId][i] = true DAS_QUEST_IDS[i] = true end - -- now hook up additiona subzone IDs (like Clockwork City - Brass Citadel has its own ID - DAS.zoneHasAdditionalId(zoneId2, zoneId) - ---[[ - Don't forget to register the zone ID in the options. If the AddOn isn't detecting active in the settings - for its zone ID, it won't show. +--[[ + Don't forget to register the zone ID in the options. If the AddOn isn't detecting active in the settings + for its zone ID, it won't show. ..\00_startup defaults.tracked[zoneId] - - You also need to register a menu setting so users can toggle it on and off + You also need to register a menu setting so users can toggle it on and off ..\DASMenu.lua - - Hook up your new quest data file in the AddOn's manifest file: + Hook up your new quest data file in the AddOn's manifest file: ..\DailyAutoShare.txt - ... and you're good to go. ]] \ No newline at end of file diff --git a/questData/00_ids.lua b/questData/00_ids.lua index 27d908d..619c66c 100644 --- a/questData/00_ids.lua +++ b/questData/00_ids.lua @@ -1,71 +1,55 @@ DailyAutoShare = DailyAutoShare or {} DAS = DailyAutoShare - DAS.subzones = { - -- CC [985] = 980, -- Halls of Regulation [986] = 980, -- Shadow Cleft [993] = 980, -- Planisphere - -- Gold Coast [824] = 823, -- Hrota Cave - -- Wrothgar [689] = 684, -- Nikolovara's Kennel - [690] = 684, -- - [691] = 684, -- - [692] = 684, -- + [690] = 684, -- + [691] = 684, -- + [692] = 684, -- [693] = 684, -- Argent Mine [694] = 684, -- Argent Mine } - - - DAS_QUEST_IDS = { - - -- Murkmire - + -- Murkmire -- Summerset [6152] = true, -- Pilgrimage's End - [6153] = true, -- - [6154] = true, -- - [6155] = true, -- + [6153] = true, -- + [6154] = true, -- + [6155] = true, -- [6156] = true, -- Snuffing Out the Light - [6157] = true, -- - [6158] = true, -- + [6157] = true, -- + [6158] = true, -- [6159] = true, -- Culling Serpents - [6083] = true, -- Taming the Wild [6084] = true, -- The Abyssal Alchemist [6085] = true, -- [6086] = true, -- Never Forgotten - -- Clockwork City - [6076] = true, -- Inciting the Imperfect, - [6077] = true, -- A Fine-Feathered Foe, - - [6039] = true, -- Loose Strands, - [6040] = true, -- A Sticky Solution, - [6041] = true, -- Enchanted Accumulation, - [6038] = true, -- A Daily Grind, - [6042] = true, -- A Bitter Pill, - [6037] = true, -- Fuel for our Fires, - - [6088] = true, -- Changing the Filters, - [6081] = true, -- Oiling the Fans, - [6089] = true, -- Replacing the Commutators, - [6080] = true, -- A Shadow Malfunction, - [6073] = true, -- A Shadow Misplaced, - [6079] = true, -- Again Into the Shadows, - - [6110] = true, -- Glitter and Gleam, - [6106] = true, -- A Matter of Tributes, - [6070] = true, -- Nibbles and Bits, - [6071] = true, -- Morsels and Pecks, - [6072] = true, -- A Matter of Respect, - - + [6076] = true, -- Inciting the Imperfect, + [6077] = true, -- A Fine-Feathered Foe, + [6039] = true, -- Loose Strands, + [6040] = true, -- A Sticky Solution, + [6041] = true, -- Enchanted Accumulation, + [6038] = true, -- A Daily Grind, + [6042] = true, -- A Bitter Pill, + [6037] = true, -- Fuel for our Fires, + [6088] = true, -- Changing the Filters, + [6081] = true, -- Oiling the Fans, + [6089] = true, -- Replacing the Commutators, + [6080] = true, -- A Shadow Malfunction, + [6073] = true, -- A Shadow Misplaced, + [6079] = true, -- Again Into the Shadows, + [6110] = true, -- Glitter and Gleam, + [6106] = true, -- A Matter of Tributes, + [6070] = true, -- Nibbles and Bits, + [6071] = true, -- Morsels and Pecks, + [6072] = true, -- A Matter of Respect, -- Morrowind dailies [5924] = true, -- "Relics of Yasammidan", [5925] = true, -- "Relics of Assarnatamat", @@ -74,7 +58,6 @@ DAS_QUEST_IDS = { [5928] = true, -- "Relics of Ebernanit", [5929] = true, -- "Relics of Dushariran", [5930] = true, -- "Relics of Ashalmawia", - [5907] = true, -- "Great Zexxin Hunt", [5908] = true, -- "Tarra-Suj Hunt", [5909] = true, -- "Writhing Sveeth Hunt", @@ -82,7 +65,6 @@ DAS_QUEST_IDS = { [5911] = true, -- "Ash-Eater Hunt", [5912] = true, -- "Old Stomper Hunt", [5913] = true, -- "King Razor-Tusk Hunt", - -- Cave dailies (Hall of Justice) [5956] = true, -- "Daedric Disruptions", [5958] = true, -- "Unsettled Syndicate", @@ -91,7 +73,6 @@ DAS_QUEST_IDS = { [5934] = true, -- "Tax Deduction", [5915] = true, -- "Tribal Troubles", [5958] = true, -- "Unsettled Syndicate", - -- World boss dailies (Hall of Justice) [5916] = true, -- "The Anxious Apprentice", [5918] = true, -- "A Creeping Hunger", @@ -99,9 +80,6 @@ DAS_QUEST_IDS = { [5866] = true, -- "Oxen Free", [5904] = true, -- "Salothan's Curse", [5906] = true, -- "Siren's Song", - - - -- wrothgar dailies [5518] = true, -- "Meat for the Masses", [5519] = true, -- "Scholarly Salvage", @@ -110,8 +88,6 @@ DAS_QUEST_IDS = { [5522] = true, -- "Heresy of Ignorance", [5523] = true, -- "Snow and Steam", [5524] = true, -- "Reeking of Foul Play", - - -- wrothgar single [5507] = true, -- "Breakfast of the Bizarre", [5515] = true, -- "Free Spirits", @@ -119,15 +95,11 @@ DAS_QUEST_IDS = { [5509] = true, -- "Parts of the Whole", [5504] = true, -- "The Skin Trade", [5505] = true, -- "Fire in the Hold", - - - -- gold coast [5603] = true, -- "Buried Evil", [5604] = true, -- "The Common Good", [5605] = true, -- "Looming Shadows", [5606] = true, -- "The Roar of the Crowds", - -- new life [5845] = true, -- "Castle Charm Challenge", [5837] = true, -- "Lava Foot Stomp", @@ -138,7 +110,6 @@ DAS_QUEST_IDS = { [5834] = true, -- "The Trial of Five-Clawed Guile", [5856] = true, -- "Stonetooth Bash", [5811] = true, -- "Snow Bear Plunge", - -- craglorn -- lower [5108] = true, -- "Critical Mass", @@ -148,7 +119,6 @@ DAS_QUEST_IDS = { [5754] = true, -- "Waters Run Foul", [5755] = true, -- "Supreme Power", [5762] = true, -- "The Reason We Fight", - -- upper [5767] = true, -- "The Blood of Nirn", [5777] = true, -- "The Gray Passage", @@ -157,35 +127,27 @@ DAS_QUEST_IDS = { [5765] = true, -- "Taken Alive", [5764] = true, -- "The Truer Fangs", [5772] = true, -- "Uncaged", - - -- guild [5733] = true, -- Ancient Armaments in Bangkorai [5734] = true, -- The Spirit Trap in Malabal Tor [5735] = true, -- Ancestor Wards in Deshaan - [5737] = true, -- Dwarven Relics of Stonefalls + [5737] = true, -- Dwarven Relics of Stonefalls [5738] = true, -- Ayleid Trinkets in Grahtwood [5739] = true, -- Red Rook Ransack in Glenumbra - [5740] = true, -- Ancestor Wards in Deshaan - [5744] = true, -- Mascot Theft in Reaper's March [5745] = true, -- Molten Pearls of Alik'r Desert - [5778] = true, -- Give and Take in Shadowfen [5779] = true, -- Icy Intrigue in Eastmarch [5798] = true, -- Veiled Darkness in Auridon - [5800] = true, -- Cursed Baubles of Stormhaven ?? [5802] = true, -- Inflamed Pyres of the Rift [5808] = true, -- Darkness Blooms in Rivenspire [5853] = true, -- Culinary Justice in Greenshade - } - for questId=5814, 5830 do -- Madness in... DAS_QUEST_IDS[questId] = true end for questId=5780, 5796 do -- Dark Anchors in... DAS_QUEST_IDS[questId] = true -end +end \ No newline at end of file diff --git a/questData/ClockworkCity.lua b/questData/ClockworkCity.lua index f7e00c9..a65a197 100644 --- a/questData/ClockworkCity.lua +++ b/questData/ClockworkCity.lua @@ -1,62 +1,41 @@ DAS.shareables = DAS.shareables or {} DAS.bingo = DAS.bingo or {} - local zoneId = 980 local zoneId2 = 981 local zoneId3 = 983 - local halls_of_regulation_id = 985 local shadow_cleft_id = 986 local planisphere_id = 993 local wellspring_id = 992 - - DAS.subzones[zoneId2] = zoneId DAS.subzones[zoneId3] = zoneId - - -- =============================================================================================== -- -- Clockwork City -- =============================================================================================== -- - local bingo = {} local tbl = {} - - - -- boss dailies - table.insert(tbl, GetString(DAS_CLOCK_IMP)) table.insert(bingo, "imp") - table.insert(tbl, GetString(DAS_CLOCK_FOE)) table.insert(bingo, "foe") - -local questListBoss = { +local questListBoss = { [GetString(DAS_CLOCK_IMP)] = true, [GetString(DAS_CLOCK_FOE)] = true, } - -- slag town dailies - table.insert(tbl, GetString(DAS_CLOCK_CRAFT_CLOTH)) table.insert(bingo, "strands") - table.insert(tbl, GetString(DAS_CLOCK_CRAFT_WATER)) table.insert(bingo, "sticky") - table.insert(tbl, GetString(DAS_CLOCK_CRAFT_RUNE)) table.insert(bingo, "acc") - table.insert(tbl, GetString(DAS_CLOCK_CRAFT_SMITH)) table.insert(bingo, "grind") - table.insert(tbl, GetString(DAS_CLOCK_CRAFT_ALCH)) table.insert(bingo, "pill") - table.insert(tbl, GetString(DAS_CLOCK_CRAFT_WOOD)) table.insert(bingo, "fuel") - local questListCraft = { [GetString(DAS_CLOCK_CRAFT_CLOTH)] = true, [GetString(DAS_CLOCK_CRAFT_WATER)] = true, @@ -65,27 +44,19 @@ local questListCraft = { [GetString(DAS_CLOCK_CRAFT_ALCH)] = true, [GetString(DAS_CLOCK_CRAFT_WOOD)] = true, } - -- delve dailies - table.insert(tbl, GetString(DAS_CLOCK_DELVE_FILT)) table.insert(bingo, "filter") - table.insert(tbl, GetString(DAS_CLOCK_DELVE_FANS)) table.insert(bingo, "fan") - table.insert(tbl, GetString(DAS_CLOCK_DELVE_COMM)) table.insert(bingo, "comm") - table.insert(tbl, GetString(DAS_CLOCK_DELVE_MALF)) table.insert(bingo, "malfunc") - table.insert(tbl, GetString(DAS_CLOCK_DELVE_MISP)) table.insert(bingo, "misplaced") - table.insert(tbl, GetString(DAS_CLOCK_DELVE_AGAI)) table.insert(bingo, "shadows") - local questListDelve = { [GetString(DAS_CLOCK_DELVE_FILT)] = true, [GetString(DAS_CLOCK_DELVE_FANS)] = true, @@ -94,27 +65,19 @@ local questListDelve = { [GetString(DAS_CLOCK_DELVE_MISP)] = true, [GetString(DAS_CLOCK_DELVE_AGAI)] = true, } - -- crow dailies - table.insert(tbl, GetString(DAS_CLOCK_CROW_GLIT)) table.insert(bingo, "gleam") - table.insert(tbl, GetString(DAS_CLOCK_CROW_TRIB)) table.insert(bingo, "tribute") - table.insert(tbl, GetString(DAS_CLOCK_CROW_NIBB)) table.insert(bingo, "bits") - table.insert(tbl, GetString(DAS_CLOCK_CROW_MORS)) table.insert(bingo, "morsels") - table.insert(tbl, GetString(DAS_CLOCK_CROW_RESP)) table.insert(bingo, "respect") - table.insert(tbl, GetString(DAS_CLOCK_CROW_LEIS)) table.insert(bingo, "leisure") - local questListCrow = { [GetString(DAS_CLOCK_CROW_GLIT)] = true, [GetString(DAS_CLOCK_CROW_TRIB)] = true, @@ -123,12 +86,9 @@ local questListCrow = { [GetString(DAS_CLOCK_CROW_RESP)] = true, [GetString(DAS_CLOCK_CROW_LEIS)] = true, } - DAS.shareables[zoneId] = tbl DAS.makeBingoTable(zoneId, bingo) - -- Halls of Regulation - bingo = {} local tbl2 = {} table.insert(tbl2, GetString(DAS_CLOCK_DELVE_FILT)) @@ -139,11 +99,8 @@ table.insert(tbl2, GetString(DAS_CLOCK_CRAFT_WOOD)) table.insert(bingo, "fuel") table.insert(tbl2, GetString(DAS_CLOCK_DELVE_COMM)) table.insert(bingo, "comm") - - DAS.shareables[shadow_cleft_id] = tbl2 DAS.makeBingoTable(shadow_cleft_id, bingo) - -- Shadow Cleft local tbl3 = {} bingo = {} @@ -155,47 +112,36 @@ table.insert(tbl3, GetString(DAS_CLOCK_CRAFT_RUNE)) table.insert(bingo, "acc") table.insert(tbl3, GetString(DAS_CLOCK_DELVE_AGAI)) table.insert(bingo, "shadows") - DAS.shareables[shadow_cleft_id] = tbl3 DAS.makeBingoTable(shadow_cleft_id, bingo) - -- Planisphere local tbl4 = {} bingo = {} table.insert(tbl4, GetString(DAS_CLOCK_CRAFT_CLOTH)) DAS.shareables[planisphere_id] = tbl4 DAS.makeBingoTable(planisphere_id, bingo) - -- Everwound Wellspring local tbl5 = {} bingo = {} table.insert(tbl5, GetString(DAS_CLOCK_CRAFT_ALCH)) table.insert(bingo, "strands") - DAS.shareables[wellspring_id] = tbl5 DAS.makeBingoTable(planisphere_id, bingo) - DAS.QuestLists[zoneId] = { ["boss"] = questListBoss, ["craft"] = questListCraft, ["crow"] = questListCrow, ["delve"] = questListDelve, } - - - - DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_CC_ROBOT)] = true, [GetString(DAS_QUEST_CC_NOVICE)] = true, [GetString(DAS_QUEST_CC_ORC)] = true, [GetString(DAS_QUEST_CC_CROW)] = true, } - DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_CC_ROBOT)] = true, [GetString(DAS_QUEST_CC_CROW)] = true, - [GetString(DAS_QUEST_CC_THISTLE )] = true, [GetString(DAS_QUEST_CC_COOK )] = true, [GetString(DAS_QUEST_CC_MINDORA )] = true, @@ -203,33 +149,27 @@ DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_CC_IGMUND )] = true, [GetString(DAS_QUEST_CC_DARO )] = true, [GetString(DAS_QUEST_CC_TILELLE )] = true, - } - DAS.questIds[zoneId] = { - [6076] = true, -- Inciting the Imperfect, - [6077] = true, -- A Fine-Feathered Foe, - - [6039] = true, -- Loose Strands, - [6040] = true, -- A Sticky Solution, - [6041] = true, -- Enchanted Accumulation, - [6038] = true, -- A Daily Grind, - [6042] = true, -- A Bitter Pill, - [6037] = true, -- Fuel for our Fires, - - [6088] = true, -- Changing the Filters, - [6081] = true, -- Oiling the Fans, - [6089] = true, -- Replacing the Commutators, - [6080] = true, -- A Shadow Malfunction, - [6073] = true, -- A Shadow Misplaced, - [6079] = true, -- Again Into the Shadows, - - [6110] = true, -- Glitter and Gleam, - [6106] = true, -- A Matter of Tributes, - [6070] = true, -- Nibbles and Bits, - [6071] = true, -- Morsels and Pecks, - [6072] = true, -- A Matter of Respect, + [6076] = true, -- Inciting the Imperfect, + [6077] = true, -- A Fine-Feathered Foe, + [6039] = true, -- Loose Strands, + [6040] = true, -- A Sticky Solution, + [6041] = true, -- Enchanted Accumulation, + [6038] = true, -- A Daily Grind, + [6042] = true, -- A Bitter Pill, + [6037] = true, -- Fuel for our Fires, + [6088] = true, -- Changing the Filters, + [6081] = true, -- Oiling the Fans, + [6089] = true, -- Replacing the Commutators, + [6080] = true, -- A Shadow Malfunction, + [6073] = true, -- A Shadow Misplaced, + [6079] = true, -- Again Into the Shadows, + [6110] = true, -- Glitter and Gleam, + [6106] = true, -- A Matter of Tributes, + [6070] = true, -- Nibbles and Bits, + [6071] = true, -- Morsels and Pecks, + [6072] = true, -- A Matter of Respect, } - DAS.zoneHasAdditionalId(zoneId2, zoneId) DAS.zoneHasAdditionalId(zoneId3, zoneId) \ No newline at end of file diff --git a/questData/Cyrodiil.lua b/questData/Cyrodiil.lua index c4fe28f..aba1de2 100644 --- a/questData/Cyrodiil.lua +++ b/questData/Cyrodiil.lua @@ -1,21 +1,14 @@ local zoneId = 181 - -DAS.shareables[zoneId] = { +DAS.shareables[zoneId] = { } - local tbl2 = {} - DAS.makeBingoTable(zoneId, tbl2) - DAS.questIds[zoneId] = { - } - DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_CRY_BATTLE)] = true, [GetString(DAS_QUEST_CRY_BOUNTY)] = true, [GetString(DAS_QUEST_CRY_SCOUT)] = true, [GetString(DAS_QUEST_CRY_WARFR)] = true, } - -DAS.questFinisher[zoneId] = DAS.questStarter[zoneId] +DAS.questFinisher[zoneId] = DAS.questStarter[zoneId] \ No newline at end of file diff --git a/questData/Festival.lua b/questData/Festival.lua index 5d7c5b2..7881844 100644 --- a/questData/Festival.lua +++ b/questData/Festival.lua @@ -1,9 +1,23 @@ local zoneId = 101 - local tbl = {} - local NL = "newLife" +DAS.subLists[NL] = { + 19 , + 41 , + 101, + 104, + 117, + 383, + 382, + 535, -- Bethnik + 381, +} + +for _, zoneId in pairs(DAS.subLists[NL]) do + DAS.festivals[zoneId] = NL +end + table.insert(tbl, GetString(DAS_NL_STORMHAVEN)) table.insert(tbl, GetString(DAS_NL_STONEFALLS)) table.insert(tbl, GetString(DAS_NL_ALIKR)) @@ -14,39 +28,48 @@ table.insert(tbl, GetString(DAS_NL_BETNIKH)) table.insert(tbl, GetString(DAS_NL_AURIDON)) table.insert(tbl, GetString(DAS_NL_EASTMARCH)) -local function makeNestedZoneTable(id, quest) - DAS.shareables[id] = DAS.shareables[id] or {} - DAS.bingo[id] = DAS.bingo[id] or {} - DAS.shareables[id][NL] = {} - table.insert(DAS.shareables[id][NL], quest) - table.insert(DAS.bingo[id], NL) +local function makeNestedZoneTable(tmpZoneId, quest) + DAS.shareables[tmpZoneId] = DAS.shareables[tmpZoneId] or {} + DAS.bingo[tmpZoneId] = DAS.bingo[tmpZoneId] or {} + DAS.shareables[tmpZoneId][NL] = {} + table.insert(DAS.shareables[tmpZoneId][NL], quest) + DAS.bingo[tmpZoneId][quest] = NL end -DAS.shareables[zoneId] = DAS.shareables[zoneId] or {} -DAS.shareables[zoneId][NL] = tbl - -DAS.QuestLists = DAS.QuestLists or {} +DAS.shareables[zoneId] = DAS.shareables[zoneId] or {} +DAS.shareables[zoneId][NL] = tbl DAS.QuestLists[zoneId] = { [NL] = { - [GetString(DAS_NL_STORMHAVEN)] = true, - [GetString(DAS_NL_STONEFALLS)] = true, - [GetString(DAS_NL_ALIKR)] = true, - [GetString(DAS_NL_SHADOWFEN)] = true, - [GetString(DAS_NL_GRAHTWOOD)] = true, - [GetString(DAS_NL_REAPERSMARCH)] = true, - [GetString(DAS_NL_BETNIKH)] = true, - [GetString(DAS_NL_AURIDON)] = true, - [GetString(DAS_NL_EASTMARCH)] = true, + [GetString(DAS_NL_STORMHAVEN)] = true, + [GetString(DAS_NL_STONEFALLS)] = true, + [GetString(DAS_NL_ALIKR)] = true, + [GetString(DAS_NL_SHADOWFEN)] = true, + [GetString(DAS_NL_GRAHTWOOD)] = true, + [GetString(DAS_NL_REAPERSMARCH)] = true, + [GetString(DAS_NL_BETNIKH)] = true, + [GetString(DAS_NL_AURIDON)] = true, + [GetString(DAS_NL_EASTMARCH)] = true, }, } - - - makeNestedZoneTable(19 , GetString(DAS_NL_STORMHAVEN)) -- Stormhaven makeNestedZoneTable(41 , GetString(DAS_NL_STONEFALLS)) -- Stonefalls -makeNestedZoneTable(117, GetString(DAS_NL_SHADOWFEN)) -- Shadowfen -makeNestedZoneTable(104, GetString(DAS_NL_ALIKR)) -- Alik'r -makeNestedZoneTable(383, GetString(DAS_NL_GRAHTWOOD)) -- Grahtwood -makeNestedZoneTable(382, GetString(DAS_NL_REAPERSMARCH)) -- Reaper's March -makeNestedZoneTable(535, GetString(DAS_NL_BETNIKH)) -- Betnikh -makeNestedZoneTable(381, GetString(DAS_NL_AURIDON)) -- Auridon +makeNestedZoneTable(117, GetString(DAS_NL_SHADOWFEN)) -- Shadowfen +makeNestedZoneTable(104, GetString(DAS_NL_ALIKR)) -- Alik'r +makeNestedZoneTable(383, GetString(DAS_NL_GRAHTWOOD)) -- Grahtwood +makeNestedZoneTable(382, GetString(DAS_NL_REAPERSMARCH)) -- Reaper's March +makeNestedZoneTable(535, GetString(DAS_NL_BETNIKH)) -- Betnikh +makeNestedZoneTable(381, GetString(DAS_NL_AURIDON)) -- Auridon + +DAS.questStarter[zoneId] = { + [GetString(DAS_QUEST_NL_BREDA)] = true, + [GetString(DAS_QUEST_NL_LIZARD)] = true, + [GetString(DAS_QUEST_NL_ORC)] = true, + [GetString(DAS_QUEST_NL_CAT)] = true, +} + +DAS.questFinisher[zoneId] = { + [GetString(DAS_QUEST_NL_BREDA)] = true, + [GetString(DAS_QUEST_NL_LIZARD)] = true, + [GetString(DAS_QUEST_NL_ORC)] = true, + [GetString(DAS_QUEST_NL_CAT)] = true, +} \ No newline at end of file diff --git a/questData/GoldCoast.lua b/questData/GoldCoast.lua index 7219bff..cacac38 100644 --- a/questData/GoldCoast.lua +++ b/questData/GoldCoast.lua @@ -1,45 +1,34 @@ DAS.shareables = DAS.shareables or {} DAS.bingo = DAS.bingo or {} - - local zoneId = 823 local zoneId2 = 825 -- Hrota Cave local zoneId3 = 826 -- Garlas Agea - - local tbl = {} - table.insert(tbl, GetString(DAS_DB_MINO)) table.insert(tbl, GetString(DAS_DB_ARENA)) table.insert(tbl, GetString(DAS_DB_GOOD)) table.insert(tbl, GetString(DAS_DB_EVIL)) - DAS.shareables[zoneId] = tbl DAS.shareables[zoneId2] = DAS.shareables[zoneId] DAS.shareables[zoneId3] = DAS.shareables[zoneId] - local tbl2 = {} table.insert(tbl2, {[1] = "mino", [2] = "m"}) table.insert(tbl2, {[1] = "arena",[2] = "a"}) table.insert(tbl2, {[1] = "good", [2] = "common", [3] = "cg"}) table.insert(tbl2, {[1] = "evil", [2] = "buried", [3] = "be"}) - -DAS.makeBingoTable(zoneId, tbl2) +DAS.makeBingoTable(zoneId, tbl2) DAS.bingo[zoneId2] = DAS.bingo[zoneId] DAS.bingo[zoneId3] = DAS.bingo[zoneId] - DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_DB_BOUNTY)] = true, } - DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_DB_ARVINA)] = true, [GetString(DAS_QUEST_DB_LARONEN)] = true, [GetString(DAS_QUEST_DB_FINIA)] = true, [GetString(DAS_QUEST_DB_CODUS)] = true, } - -DAS.questIds[zoneId] = { +DAS.questIds[zoneId] = { -- gold coast [5603] = true, -- "Buried Evil", [5604] = true, -- "The Common Good", diff --git a/questData/GuildQuests.lua b/questData/GuildQuests.lua index 409fed4..18bc56b 100644 --- a/questData/GuildQuests.lua +++ b/questData/GuildQuests.lua @@ -1,29 +1,41 @@ -DAS.shareables = DAS.shareables or {} -DAS.bingo = DAS.bingo or {} -DAS.questFinisher = DAS.questFinisher or {} -DAS.questStarter = DAS.questStarter or {} -DAS.QuestLists = DAS.QuestLists or {} - local zoneId = 57 -- Deshaan local zoneId2 = 19 -- Stormhaven local zoneId3 = 383 -- Grahtwood - local tbl1 = {} local tbl2 = {} - local fgBingo = {[1] = "fg", [2] = "fighters", [3] = "cardea"} local mgBingo = {[1] = "mg", [2] = "mages", [3] = "alvur"} local udBingo = {[1] = "ud", [2] = "undaunted", [3] = "bolgrul"} - DAS.QuestLists[zoneId] = { ["fg"] = {}, ["mg"] = {}, ["ud"] = {}, } +DAS.subLists.guilds = { + 104, + 381, + 92, + 57, + 101, + 3, + 383, + 104, + 58, + 382, + 103, + 20, + 117, + 41, + 19, +} + +DAS.subLists.fg = DAS.subLists.guilds +DAS.subLists.mg = DAS.subLists.guilds +DAS.subLists.ud = DAS.subLists.guilds + DAS.QuestLists[zoneId2] = DAS.QuestLists[zoneId] DAS.QuestLists[zoneId3] = DAS.QuestLists[zoneId] - local zoneIds = { [104] = GetString(DAS_UD_ALIKR), -- Alik'r Desert [381] = GetString(DAS_UD_AURID), -- Auridon @@ -41,19 +53,16 @@ local zoneIds = { [41 ] = GetString(DAS_UD_STONE), -- Stonefalls [19 ] = GetString(DAS_UD_STORM), -- Stormhaven } - -for id, udString in pairs(zoneIds) do +for id, udString in pairs(zoneIds) do local zoneName = GetZoneNameByIndex(GetZoneIndex(id)) local fgString = GetString(DAS_GUILD_ANCHORS) .. zoneName local mgString = GetString(DAS_GUILD_MADNESS) .. zoneName - DAS.shareables[id] = DAS.shareables[id] or {} DAS.QuestLists[id] = DAS.QuestLists[id] or {} DAS.QuestLists[id].fg = DAS.QuestLists[id].fg or {} DAS.QuestLists[id].mg = DAS.QuestLists[id].mg or {} DAS.QuestLists[id].ud = DAS.QuestLists[id].ud or {} local bingoTable = DAS.bingo[id] or {} - table.insert(DAS.shareables[id], fgString) table.insert(bingoTable, fgBingo) table.insert(DAS.shareables[id], mgString) @@ -61,16 +70,13 @@ for id, udString in pairs(zoneIds) do table.insert(DAS.shareables[id], udString) table.insert(bingoTable, udBingo) DAS.makeBingoTable(id, bingoTable) - table.insert(DAS.QuestLists[zoneId].fg, fgString) table.insert(DAS.QuestLists[zoneId].mg, mgString) table.insert(DAS.QuestLists[zoneId].ud, udString) end - table.insert(tbl1, DAS.QuestLists[zoneId].fg) table.insert(tbl2, fgBingo) - table.insert(tbl1, DAS.QuestLists[zoneId].mg) table.insert(tbl2, mgBingo) @@ -82,14 +88,12 @@ end DAS.shareables[zoneId] = tbl1 DAS.shareables[zoneId2] = DAS.shareables[zoneId] DAS.shareables[zoneId3] = DAS.shareables[zoneId] - DAS.bingo[zoneId] = DAS.makeBingoTable(zoneId, tbl2) DAS.bingo[zoneId2] = DAS.bingo[zoneId] DAS.bingo[zoneId3] = DAS.bingo[zoneId] --- Alik'r Desert, Auridon, Bangkorai, Deshaan, Eastmarch, Glenumbra, Grahtwood, Greenshade, Malabal Tor, +-- Alik'r Desert, Auridon, Bangkorai, Deshaan, Eastmarch, Glenumbra, Grahtwood, Greenshade, Malabal Tor, -- Reaper's March, The Rift, Rivenspire, Shadowfen, Stonefalls, Stormhaven - DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_CAP_CARDEA)] = true, -- Cardea Gallus, FG [GetString(DAS_QUEST_CAP_ALVUR)] = true, -- Alvur Baren, MG @@ -97,41 +101,33 @@ DAS.questStarter[zoneId] = { } DAS.questStarter[zoneId2] = DAS.questStarter[zoneId] DAS.questStarter[zoneId3] = DAS.questStarter[zoneId] - DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_CAP_CARDEA)] = true, -- Cardea Gallus, FG [GetString(DAS_QUEST_CAP_ALVUR)] = true, -- Alvur Baren, MG [GetString(DAS_QUEST_CAP_BOLGRUL)] = true, -- Bolgrul, UD } + DAS.questFinisher[zoneId2] = DAS.questFinisher[zoneId] DAS.questFinisher[zoneId3] = DAS.questFinisher[zoneId] - - DAS.questIds[zoneId] = { -- guild [5733] = true, -- Ancient Armaments in Bangkorai [5734] = true, -- The Spirit Trap in Malabal Tor [5735] = true, -- Ancestor Wards in Deshaan - [5737] = true, -- Dwarven Relics of Stonefalls + [5737] = true, -- Dwarven Relics of Stonefalls [5738] = true, -- Ayleid Trinkets in Grahtwood [5739] = true, -- Red Rook Ransack in Glenumbra - [5740] = true, -- Ancestor Wards in Deshaan - [5744] = true, -- Mascot Theft in Reaper's March [5745] = true, -- Molten Pearls of Alik'r Desert - [5778] = true, -- Give and Take in Shadowfen [5779] = true, -- Icy Intrigue in Eastmarch [5798] = true, -- Veiled Darkness in Auridon - [5800] = true, -- Cursed Baubles of Stormhaven ?? [5802] = true, -- Inflamed Pyres of the Rift [5808] = true, -- Darkness Blooms in Rivenspire [5853] = true, -- Culinary Justice in Greenshade - } - for questId=5814, 5830 do -- Madness in... DAS.questIds[zoneId][questId] = true end diff --git a/questData/HewsBane.lua b/questData/HewsBane.lua index 7f5ced3..b7bd5ef 100644 --- a/questData/HewsBane.lua +++ b/questData/HewsBane.lua @@ -1,19 +1,10 @@ DAS.shareables = DAS.shareables or {} DAS.bingo = DAS.bingo or {} - - local zoneId = 816 local zoneId2 = 821 - DAS.shareables[zoneId] = { - } - local tbl2 = {} - DAS.makeBingoTable(zoneId, tbl2) - - DAS.questIds[zoneId] = { - } \ No newline at end of file diff --git a/questData/Morrowind.lua b/questData/Morrowind.lua index ae92152..a000fd0 100644 --- a/questData/Morrowind.lua +++ b/questData/Morrowind.lua @@ -2,13 +2,9 @@ DAS.shareables = DAS.shareables or {} DAS.bingo = DAS.bingo or {} DAS.questFinisher = DAS.questFinisher or {} DAS.questStarter = DAS.questStarter or {} - - local zoneId = 849 - local tbl = {} local tbl2 = {} - DAS.QuestLists = DAS.QuestLists or {} DAS.QuestLists[zoneId] = { ["relic"] = { @@ -19,7 +15,7 @@ DAS.QuestLists[zoneId] = { [5] = GetString(DAS_M_REL_EBERN), [6] = GetString(DAS_M_REL_MAELK), [7] = GetString(DAS_M_REL_YASAM), - }, + }, ["hunt"] = { [1] = GetString(DAS_M_HUNT_EATER), [2] = GetString(DAS_M_HUNT_ZEXXI), @@ -27,7 +23,7 @@ DAS.QuestLists[zoneId] = { [4] = GetString(DAS_M_HUNT_JAGGE), [5] = GetString(DAS_M_HUNT_STOMP), [6] = GetString(DAS_M_HUNT_TARRA), - [7] = GetString(DAS_M_HUNT_SVEET), + [7] = GetString(DAS_M_HUNT_SVEET), }, ["delve"] = { [1] = GetString(DAS_M_DELVE_DAEDR), @@ -46,11 +42,8 @@ DAS.QuestLists[zoneId] = { [6] = GetString(DAS_M_BOSS_APPRE), }, } - - table.insert(tbl, DAS.QuestLists[zoneId].relic) table.insert(tbl2, "relic") - table.insert(tbl, GetString(DAS_M_HUNT_EATER)) table.insert(tbl2, "ash") table.insert(tbl, GetString(DAS_M_HUNT_ZEXXI)) @@ -65,7 +58,6 @@ table.insert(tbl, GetString(DAS_M_HUNT_TARRA)) table.insert(tbl2, "tarra") table.insert(tbl, GetString(DAS_M_HUNT_SVEET)) table.insert(tbl2, "sveeth") - table.insert(tbl, GetString(DAS_M_DELVE_DAEDR)) table.insert(tbl2, "daedra") table.insert(tbl, GetString(DAS_M_DELVE_KWAMA)) @@ -78,7 +70,6 @@ table.insert(tbl, GetString(DAS_M_DELVE_TRIBA)) table.insert(tbl2, "tribe") table.insert(tbl, GetString(DAS_M_DELVE_SYNDI)) table.insert(tbl2, "syndicate") - table.insert(tbl, GetString(DAS_M_BOSS_WUYWU)) table.insert(tbl2, {[1] = "wuyu", [2] = "wyu", [3] = "wuyuvus", [4] = "wuju", [5] = "sul", [6] = "sulipund"}) table.insert(tbl, GetString(DAS_M_BOSS_SWARM)) @@ -91,9 +82,6 @@ table.insert(tbl, GetString(DAS_M_BOSS_SIREN)) table.insert(tbl2, {[1] ="siren", [2] = "song", [3] = "songbird", [4] = "ss", [5] = "sirene"}) table.insert(tbl, GetString(DAS_M_BOSS_APPRE)) table.insert(tbl2, {[1] = "dub", [2] = "dubdil" }) - - - table.insert(tbl, GetString(DAS_M_REL_ASHAL)) table.insert(tbl2, "ashal") table.insert(tbl, GetString(DAS_M_REL_ASSAR)) @@ -108,9 +96,7 @@ table.insert(tbl, GetString(DAS_M_REL_MAELK)) table.insert(tbl2, "maelk") table.insert(tbl, GetString(DAS_M_REL_YASAM)) table.insert(tbl2, "yasam") - DAS.shareables[zoneId] = tbl - -- Khartag point DAS.shareables[921] = { [1] = DAS.shareables[zoneId][20], @@ -135,16 +121,12 @@ DAS.shareables[925] = { DAS.shareables[961] = { [1] = DAS.shareables[zoneId][9], } - DAS.subzones[921] = zoneId DAS.subzones[922] = zoneId DAS.subzones[923] = zoneId DAS.subzones[924] = zoneId DAS.subzones[961] = zoneId - -DAS.makeBingoTable(zoneId, tbl2) - - +DAS.makeBingoTable(zoneId, tbl2) DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_M_BELERU)] = true, -- Hall of Justice [GetString(DAS_QUEST_M_TRAYLAN)] = true, -- Hall of Justice @@ -152,31 +134,27 @@ DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_M_NUMANI)] = true, -- Ashlander Relics [GetString(DAS_QUEST_M_RIVYN)] = true, -- Battlegrounds } - DAS.questFinisher[zoneId] = { - [GetString(DAS_QUEST_M_ASHLANDER)] = true, - [GetString(DAS_QUEST_M_NUMANI)] = true, - - [GetString(DAS_QUEST_M_NARA)] = true, - [GetString(DAS_QUEST_M_TRAYLAN )] = true, - [GetString(DAS_QUEST_M_BELERU )] = true, - [GetString(DAS_QUEST_M_NUMANI )] = true, - [GetString(DAS_QUEST_M_NARA )] = true, - [GetString(DAS_QUEST_M_TIRVINA )] = true, - [GetString(DAS_QUEST_M_DINOR )] = true, - [GetString(DAS_QUEST_M_BRAVOSI )] = true, - [GetString(DAS_QUEST_M_IVULEN )] = true, - [GetString(DAS_QUEST_M_SAVILE )] = true, - [GetString(DAS_QUEST_M_KYLIA )] = true, - [GetString(DAS_QUEST_M_EVOS )] = true, - [GetString(DAS_QUEST_M_ALVES )] = true, - [GetString(DAS_QUEST_M_DREDASE )] = true, - [GetString(DAS_QUEST_M_VORAR )] = true, - [GetString(DAS_QUEST_M_VALGA )] = true, + [GetString(DAS_QUEST_M_ASHLANDER)] = true, + [GetString(DAS_QUEST_M_NUMANI)] = true, + [GetString(DAS_QUEST_M_NARA)] = true, + [GetString(DAS_QUEST_M_TRAYLAN )] = true, + [GetString(DAS_QUEST_M_BELERU )] = true, + [GetString(DAS_QUEST_M_NUMANI )] = true, + [GetString(DAS_QUEST_M_NARA )] = true, + [GetString(DAS_QUEST_M_TIRVINA )] = true, + [GetString(DAS_QUEST_M_DINOR )] = true, + [GetString(DAS_QUEST_M_BRAVOSI )] = true, + [GetString(DAS_QUEST_M_IVULEN )] = true, + [GetString(DAS_QUEST_M_SAVILE )] = true, + [GetString(DAS_QUEST_M_KYLIA )] = true, + [GetString(DAS_QUEST_M_EVOS )] = true, + [GetString(DAS_QUEST_M_ALVES )] = true, + [GetString(DAS_QUEST_M_DREDASE )] = true, + [GetString(DAS_QUEST_M_VORAR )] = true, + [GetString(DAS_QUEST_M_VALGA )] = true, [GetString(DAS_QUEST_M_RIVYN)] = true, -- Battlegrounds } - - DAS.questIds[zoneId] = { -- Morrowind dailies [5924] = true, -- "Relics of Yasammidan", @@ -186,7 +164,6 @@ DAS.questIds[zoneId] = { [5928] = true, -- "Relics of Ebernanit", [5929] = true, -- "Relics of Dushariran", [5930] = true, -- "Relics of Ashalmawia", - [5907] = true, -- "Great Zexxin Hunt", [5908] = true, -- "Tarra-Suj Hunt", [5909] = true, -- "Writhing Sveeth Hunt", @@ -194,7 +171,6 @@ DAS.questIds[zoneId] = { [5911] = true, -- "Ash-Eater Hunt", [5912] = true, -- "Old Stomper Hunt", [5913] = true, -- "King Razor-Tusk Hunt", - -- Cave dailies (Hall of Justice) [5956] = true, -- "Daedric Disruptions", [5958] = true, -- "Unsettled Syndicate", @@ -203,7 +179,6 @@ DAS.questIds[zoneId] = { [5934] = true, -- "Tax Deduction", [5915] = true, -- "Tribal Troubles", [5958] = true, -- "Unsettled Syndicate", - -- World boss dailies (Hall of Justice) [5916] = true, -- "The Anxious Apprentice", [5918] = true, -- "A Creeping Hunger", diff --git a/questData/Murkmire.lua b/questData/Murkmire.lua index 7c793c9..0d65898 100644 --- a/questData/Murkmire.lua +++ b/questData/Murkmire.lua @@ -1,8 +1,6 @@ local zoneId = 726 - local tbl = {} local tbl2 = {} - DAS.QuestLists[zoneId] = { ["root"] = { [1] = GetString(DAS_SLAVES_ROOT_1), @@ -25,123 +23,94 @@ DAS.QuestLists[zoneId] = { [3] = GetString(DAS_SLAVES_BOSS_3), [4] = GetString(DAS_SLAVES_BOSS_4), [5] = GetString(DAS_SLAVES_BOSS_5), + [5] = GetString(DAS_SLAVES_BOSS_6), }, } - - -- Grave Circumstances -table.insert(tbl, GetString(DAS_SLAVES_BOSS_1)) +table.insert(tbl, GetString(DAS_SLAVES_BOSS_1)) table.insert(tbl2, {[1] = "circ" }) - -- Grave Expectations -table.insert(tbl, GetString(DAS_SLAVES_BOSS_2)) +table.insert(tbl, GetString(DAS_SLAVES_BOSS_2)) table.insert(tbl2, {[1] = "expe" }) - -- Old Baubles -table.insert(tbl, GetString(DAS_SLAVES_BOSS_3)) +table.insert(tbl, GetString(DAS_SLAVES_BOSS_3)) table.insert(tbl2, {[1] = "baubles"}) - -- Old Enemies -table.insert(tbl, GetString(DAS_SLAVES_BOSS_4)) -table.insert(tbl2, {[1] = "enemy", [2] = "enemies"}) - +table.insert(tbl, GetString(DAS_SLAVES_BOSS_4)) +table.insert(tbl2, {[1] = "enemy", [2] = "enemies"}) -- Old Growth -table.insert(tbl, GetString(DAS_SLAVES_BOSS_5)) -table.insert(tbl2, {[1] = "growth"}) - - +table.insert(tbl, GetString(DAS_SLAVES_BOSS_5)) +table.insert(tbl2, {[1] = "growth"}) +-- Grave Mementos +table.insert(tbl, GetString(DAS_SLAVES_BOSS_6)) +table.insert(tbl2, {[1] = "mementos", [2] = "meme"}) -- Antique Armor table.insert(tbl, GetString(DAS_SLAVES_DELVE_1)) table.insert(tbl2, {[1] = "armor", [2] = "armour" }) - -- Grave Subject Matter table.insert(tbl, GetString(DAS_SLAVES_DELVE_2)) -table.insert(tbl2, {[1] = "subject"}) - +table.insert(tbl2, {[1] = "subject"}) -- Old Scrolls table.insert(tbl, GetString(DAS_SLAVES_DELVE_3)) -table.insert(tbl2, {[1] = "scrolls"}) - +table.insert(tbl2, {[1] = "scrolls"}) -- Sacred Candles -table.insert(tbl, GetString(DAS_SLAVES_DELVE_4)) -table.insert(tbl2, {[1] = "candle", [2] = "candles"}) - +table.insert(tbl, GetString(DAS_SLAVES_DELVE_4)) +table.insert(tbl2, {[1] = "candle", [2] = "candles"}) -- Tools of Slaughter table.insert(tbl, GetString(DAS_SLAVES_DELVE_5)) table.insert(tbl2, {[1] = "tools" }) - -- The Weight of Words -table.insert(tbl, GetString(DAS_SLAVES_DELVE_6)) +table.insert(tbl, GetString(DAS_SLAVES_DELVE_6)) table.insert(tbl2, {[1] = "words"}) - - -- Aloe That Heals table.insert(tbl, GetString(DAS_SLAVES_ROOT_1)) table.insert(tbl2, {[1] = "aloe" }) - -- Envoys Who Cower table.insert(tbl, GetString(DAS_SLAVES_ROOT_2)) table.insert(tbl2, {[1] = "envoys"}) - -- Leather That Protects table.insert(tbl, GetString(DAS_SLAVES_ROOT_3)) table.insert(tbl2, {[1] = "leather" }) - -- Mushrooms That Nourish table.insert(tbl, GetString(DAS_SLAVES_ROOT_4)) table.insert(tbl2, {[1] = "mushrooms", [2] = "nourish" , [3] = "shroom", [4] = "shrooms" }) - -- Offerings That Hide table.insert(tbl, GetString(DAS_SLAVES_ROOT_5)) table.insert(tbl2, {[1] = "offer", [2] = "hide" }) - - - - DAS.questStarter[zoneId] = { [GetString(DAS_SLAVES_QUEST1)] = true, [GetString(DAS_SLAVES_QUEST2)] = true, [GetString(DAS_SLAVES_QUEST3)] = true, } - DAS.questFinisher[zoneId] = { [GetString(DAS_SLAVES_QUEST1)] = true, [GetString(DAS_SLAVES_QUEST2)] = true, [GetString(DAS_SLAVES_QUEST3)] = true, } - DAS.questIds[zoneId] = { - } - DAS.prequests[GetString(DAS_SLAVES_ROOT_1)] = { -- Aloe That Heals prequestName = "By River and Root", - prequestId = 6165, + prequestId = 6165, } - DAS.prequests[GetString(DAS_SLAVES_ROOT_2)] = { -- Envoys Who Cower prequestName = "By River and Root", - prequestId = 6165, + prequestId = 6165, } - DAS.prequests[GetString(DAS_SLAVES_ROOT_3)] = { -- Leather That Protects prequestName = "By River and Root", - prequestId = 6165, + prequestId = 6165, } - DAS.prequests[GetString(DAS_SLAVES_ROOT_4)] = { -- Mushrooms That Nourish prequestName = "By River and Root", - prequestId = 6165, + prequestId = 6165, } - DAS.prequests[GetString(DAS_SLAVES_ROOT_5)] = { -- Offerings That Hide prequestName = "By River and Root", - prequestId = 6165, + prequestId = 6165, } - DAS.shareables[zoneId] = tbl DAS.makeBingoTable(zoneId, tbl2) - -- for i=6082, 6087 do -- DAS.questIds[zoneId][i] = true -- DAS_QUEST_IDS[i] = true @@ -150,12 +119,9 @@ DAS.makeBingoTable(zoneId, tbl2) -- DAS.questIds[zoneId][i] = true -- DAS_QUEST_IDS[i] = true -- end - -- DAS.questIds[zoneId][6202] = true -- DAS_QUEST_IDS[6202] = true - - -- DAS.prequests[GetString(DAS_ELF_GEYSER)] = { -- Sinking Summerset -- prequestName = "The Abyssal Cabal", - -- prequestId = 6165, + -- prequestId = 6165, -- } \ No newline at end of file diff --git a/questData/Summerset.lua b/questData/Summerset.lua index 5163dc1..62432d3 100644 --- a/questData/Summerset.lua +++ b/questData/Summerset.lua @@ -1,24 +1,19 @@ local zoneId = 1011 local zoneId2 = 1012 - local tbl = {} local tbl2 = {} - - -table.insert(tbl, GetString(DAS_ELF_ALCHE)) +table.insert(tbl, GetString(DAS_ELF_ALCHE)) table.insert(tbl2, {[1] = "korgen", [2] = "b'korgen", [3] = "korg", [4] = "corgi"}) table.insert(tbl, GetString(DAS_ELF_GRAVE)) -table.insert(tbl2, {[1] = "graveld", [2] = "grave", [3] = "grav"}) -table.insert(tbl, GetString(DAS_ELF_QUEEN)) -table.insert(tbl2, {[1] = "queen"}) -table.insert(tbl, GetString(DAS_ELF_GRIFFIN)) +table.insert(tbl2, {[1] = "graveld", [2] = "grave", [3] = "grav"}) +table.insert(tbl, GetString(DAS_ELF_QUEEN)) +table.insert(tbl2, {[1] = "queen"}) +table.insert(tbl, GetString(DAS_ELF_GRIFFIN)) table.insert(tbl2, {[1] = "griffon", [2] = "griffin", [3] = "gryphon", [4] = "gryffon"}) -table.insert(tbl, GetString(DAS_ELF_SNAKE)) -table.insert(tbl2, {[1] = "keel", [2] = "snake"}) -table.insert(tbl, GetString(DAS_ELF_WILD)) +table.insert(tbl, GetString(DAS_ELF_SNAKE)) +table.insert(tbl2, {[1] = "keel", [2] = "snake"}) +table.insert(tbl, GetString(DAS_ELF_WILD)) table.insert(tbl2, {[1] = "caan", [2] = "indrik", [3] = "wild", [4] = "ward"}) - - table.insert(tbl, GetString(DAS_ELF_RELIC)) table.insert(tbl2, {[1] = "relics"}) table.insert(tbl, GetString(DAS_ELF_PILGR)) @@ -31,38 +26,28 @@ table.insert(tbl, GetString(DAS_ELF_MEMO )) table.insert(tbl2, {[1] = "memory"}) table.insert(tbl, GetString(DAS_ELF_ROSE )) table.insert(tbl2, {[1] = "rose"}) - table.insert(tbl, GetString(DAS_ELF_GEYSER )) table.insert(tbl2, {[1] = "geyser"}) - - DAS.shareables[zoneId] = tbl DAS.shareables[zoneId2] = DAS.shareables[zoneId] - - -DAS.makeBingoTable(zoneId, tbl2) +DAS.makeBingoTable(zoneId, tbl2) DAS.bingo[zoneId2] = DAS.bingo[zoneId] - for i=1012, 1019 do DAS.shareables[i] = DAS.shareables[zoneId] DAS.bingo[i] = DAS.bingo[zoneId] DAS.subzones[i] = zoneId end - DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_SS_TANO)] = true, [GetString(DAS_QUEST_SS_FARO)] = true, [GetString(DAS_QUEST_SS_TANE)] = true, } - DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_SS_TANO)] = true, [GetString(DAS_QUEST_SS_FARO)] = true, [GetString(DAS_QUEST_SS_TANE)] = true, } - DAS.questIds[zoneId] = { - } for i=6082, 6087 do DAS.questIds[zoneId][i] = true @@ -72,12 +57,9 @@ for i=6152, 6160 do DAS.questIds[zoneId][i] = true DAS_QUEST_IDS[i] = true end - DAS.questIds[zoneId][6202] = true DAS_QUEST_IDS[6202] = true - - DAS.prequests[GetString(DAS_ELF_GEYSER)] = { -- Sinking Summerset prequestName = "The Abyssal Cabal", - prequestId = 6165, + prequestId = 6165, } \ No newline at end of file diff --git a/questData/Wrothgar.lua b/questData/Wrothgar.lua index 31e8600..94c0df6 100644 --- a/questData/Wrothgar.lua +++ b/questData/Wrothgar.lua @@ -2,27 +2,22 @@ DAS.shareables = DAS.shareables or {} DAS.bingo = DAS.bingo or {} DAS.questFinisher = DAS.questFinisher or {} DAS.questStarter = DAS.questStarter or {} - local zoneId = 684 - DAS.shareables[zoneId] = { - [1] = GetString(DAS_W_POACHERS), - [2] = GetString(DAS_W_EDU), - [3] = GetString(DAS_W_NYZ), - [4] = GetString(DAS_W_CORI), + [2] = GetString(DAS_W_EDU), + [3] = GetString(DAS_W_NYZ), + [4] = GetString(DAS_W_CORI), [5] = GetString(DAS_W_DOLMEN), - [6] = GetString(DAS_W_OGRE), - - [7] = GetString(DAS_W_HARPIES), - [8] = GetString(DAS_W_SPIRITS), - [9] = GetString(DAS_W_DURZOGS), - [10] = GetString(DAS_W_DWEMER), + [6] = GetString(DAS_W_OGRE), + [7] = GetString(DAS_W_HARPIES), + [8] = GetString(DAS_W_SPIRITS), + [9] = GetString(DAS_W_DURZOGS), + [10] = GetString(DAS_W_DWEMER), [11] = GetString(DAS_W_WEREWOLVES), - [12] = GetString(DAS_W_THAT_OTHER), + [12] = GetString(DAS_W_THAT_OTHER), } local tbl2 = {} - DAS.questIds[zoneId] = { -- wrothgar dailies [5518] = true, -- "Meat for the Masses", @@ -32,8 +27,6 @@ DAS.questIds[zoneId] = { [5522] = true, -- "Heresy of Ignorance", [5523] = true, -- "Snow and Steam", [5524] = true, -- "Reeking of Foul Play", - - -- wrothgar single [5507] = true, -- "Breakfast of the Bizarre", [5515] = true, -- "Free Spirits", @@ -42,32 +35,26 @@ DAS.questIds[zoneId] = { [5504] = true, -- "The Skin Trade", [5505] = true, -- "Fire in the Hold", } - table.insert(tbl2, {[1] = "poa", [2] = "poacher"}) table.insert(tbl2, "edu") table.insert(tbl2, "nyz") table.insert(tbl2, {[1] = "cori", [2] = "nb"}) table.insert(tbl2, {[1] = "zan", [2] = "dolmen", [3] = "dol", [4] = "ud"}) table.insert(tbl2, {[1] = "ogre", [2] = "mad", [3] = "shrek"}) - table.insert(tbl2, {[1] = "eggs", [2] = "harpy"}) table.insert(tbl2, "spirits") table.insert(tbl2, "durzog") table.insert(tbl2, {[1] ="dwemer", [2] = "parts"}) table.insert(tbl2, {[1] = "skin", [2] = "skintrade", [3] = "wolf"}) table.insert(tbl2, {[1] = "bandit", [2] = "fire"}) - -DAS.makeBingoTable(zoneId, tbl2) - +DAS.makeBingoTable(zoneId, tbl2) DAS.questStarter[zoneId] = { [GetString(DAS_QUEST_W_GURUZUG)] = true, [GetString(DAS_QUEST_W_ARZORAG)] = true, } - DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_W_OUFA )] = true, [GetString(DAS_QUEST_W_USHANG )] = true, - [GetString(DAS_QUEST_W_NEDNOR )] = true, [GetString(DAS_QUEST_W_THAZEK )] = true, [GetString(DAS_QUEST_W_ARUSHNA )] = true, @@ -78,10 +65,7 @@ DAS.questFinisher[zoneId] = { [GetString(DAS_QUEST_W_MENNINIA )] = true, [GetString(DAS_QUEST_W_SONOLIA )] = true, -- [GetString(DAS_QUEST_W_RAYNOR )] = true, - } - - DAS.questIds[zoneId] = { -- wrothgar boss [5518] = true, -- "Meat for the Masses", @@ -90,7 +74,7 @@ DAS.questIds[zoneId] = { [5521] = true, -- "Nature's Bounty", [5522] = true, -- "Heresy of Ignorance", [5523] = true, -- "Snow and Steam", - [5524] = true, -- "Reeking of Foul Play", + [5524] = true, -- "Reeking of Foul Play", -- wrothgar delve [5507] = true, -- "Breakfast of the Bizarre", [5515] = true, -- "Free Spirits", @@ -98,4 +82,4 @@ DAS.questIds[zoneId] = { [5509] = true, -- "Parts of the Whole", [5504] = true, -- "The Skin Trade", [5505] = true, -- "Fire in the Hold", -} +} \ No newline at end of file diff --git a/textures/down_down.dds b/textures/down_down.dds index 996ddbb..aa6037a 100644 Binary files a/textures/down_down.dds and b/textures/down_down.dds differ diff --git a/textures/down_over.dds b/textures/down_over.dds index 591a635..799bdc7 100644 Binary files a/textures/down_over.dds and b/textures/down_over.dds differ diff --git a/textures/invite_active.dds b/textures/invite_active.dds index 2bcf8a7..02a2c6a 100644 Binary files a/textures/invite_active.dds and b/textures/invite_active.dds differ diff --git a/textures/invite_up.dds b/textures/invite_up.dds index c338bd7..f539342 100644 Binary files a/textures/invite_up.dds and b/textures/invite_up.dds differ diff --git a/textures/speaker_down.dds b/textures/speaker_down.dds index d0c5e14..755415f 100644 Binary files a/textures/speaker_down.dds and b/textures/speaker_down.dds differ diff --git a/textures/speaker_up.dds b/textures/speaker_up.dds index e665115..888442f 100644 Binary files a/textures/speaker_up.dds and b/textures/speaker_up.dds differ diff --git a/textures/speechbubble_down.dds b/textures/speechbubble_down.dds index 6fc7c2a..77f4e3e 100644 Binary files a/textures/speechbubble_down.dds and b/textures/speechbubble_down.dds differ diff --git a/textures/up_down.dds b/textures/up_down.dds index c553b2c..c7861bc 100644 Binary files a/textures/up_down.dds and b/textures/up_down.dds differ diff --git a/textures/up_up.dds b/textures/up_up.dds index a2f7f06..92910ce 100644 Binary files a/textures/up_up.dds and b/textures/up_up.dds differ