Fixes for Kel'Thuzad and Painsmith encounters

This commit is contained in:
Tercio Jose
2021-07-10 22:10:37 -03:00
parent 6f6d796134
commit caf27f4ff0
9 changed files with 356 additions and 65 deletions
+1 -1
View File
@@ -63,4 +63,4 @@ function DFPixelUtil.SetStatusBarValue(statusBar, value)
else
statusBar:SetValue(value);
end
end
end
+12 -10
View File
@@ -1,7 +1,6 @@
local dversion = 260
local dversion = 261
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -3798,15 +3797,18 @@ function DF:AddRoleIconToText(text, role, size)
return text
end
-- TODO: maybe make this auto-generaded some day?...
DF.CLEncounterID = {
{ID = 2144, Name = "Taloc"},
{ID = 2141, Name = "MOTHER"},
{ID = 2128, Name = "Fetid Devourer"},
{ID = 2136, Name = "Zek'voz"},
{ID = 2134, Name = "Vectis"},
{ID = 2145, Name = "Zul"},
{ID = 2135, Name = "Mythrax the Unraveler"},
{ID = 2122, Name = "G'huun"},
{ID = 2423, Name = "The Tarragrue"},
{ID = 2433, Name = "The Eye of the Jailer"},
{ID = 2429, Name = "The Nine"},
{ID = 2432, Name = "Remnant of Ner'zhul"},
{ID = 2434, Name = "Soulrender Dormazain"},
{ID = 2430, Name = "Painsmith Raznal"},
{ID = 2436, Name = "Guardian of the First Ones"},
{ID = 2431, Name = "Fatescribe Roh-Kalo"},
{ID = 2422, Name = "Kel'Thuzad"},
{ID = 2435, Name = "Sylvanas Windrunner"},
}
function DF:GetPlayerRole()
+1 -1
View File
@@ -20,4 +20,4 @@ function DF.Language.RegisterLanguage(self, addonGlobalName, language)
addonObject.__language = addonObject.__language or {}
addonObject.__language[language] = {}
return addonObject.__language[language]
end
end
+9 -7
View File
@@ -6196,7 +6196,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
return
end
local hasEncounter
for _, ID in ipairs (loadTable.encounter_ids) do
for _, ID in pairs (loadTable.encounter_ids) do
if (ID == encounterID) then
hasEncounter = true
break
@@ -6213,7 +6213,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
local uiMapID = C_Map.GetBestMapForUnit ("player")
local hasMapID
for _, ID in ipairs (loadTable.map_ids) do
for _, ID in pairs (loadTable.map_ids) do
if (ID == zoneMapID or ID == uiMapID) then
hasMapID = true
break
@@ -6608,8 +6608,10 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
local textEntryRefresh = function (self)
local idList = f.OptionsTable [self.DBKey]
self:SetText ("")
for i = 1, #idList do
self:SetText (self:GetText() .. " " .. idList [i])
for _, id in pairs(idList) do
if tonumber(id) then
self:SetText (self:GetText() .. " " .. id)
end
end
self:SetText (self:GetText():gsub ("^ ", ""))
end
@@ -6618,7 +6620,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
wipe (f.OptionsTable [self.DBKey])
local text = self:GetText()
for _, ID in ipairs ({strsplit ("", text)}) do
for _, ID in ipairs ({strsplit (" ", text)}) do
ID = DF:trim (ID)
ID = tonumber (ID)
if (ID) then
@@ -6635,7 +6637,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
encounterIDEditbox:SetPoint ("topleft", encounterIDLabel, "bottomleft", 0, -2)
encounterIDEditbox.DBKey = "encounter_ids"
encounterIDEditbox.Refresh = textEntryRefresh
encounterIDEditbox.tooltip = "Enter multiple IDs separating with a semicolon ()\nExample: 35 45 95\n\nUldir:\n"
encounterIDEditbox.tooltip = "Enter multiple IDs separating with a whitespace.\nExample: 35 45 95\n\nSanctum of Domination:\n"
for _, encounterTable in ipairs (DF:GetCLEncounterIDs()) do
encounterIDEditbox.tooltip = encounterIDEditbox.tooltip .. encounterTable.ID .. " - " .. encounterTable.Name .. "\n"
end
@@ -6649,7 +6651,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
mapIDEditbox:SetPoint ("topleft", mapIDLabel, "bottomleft", 0, -2)
mapIDEditbox.DBKey = "map_ids"
mapIDEditbox.Refresh = textEntryRefresh
mapIDEditbox.tooltip = "Enter multiple IDs separating with a semicolon ()\nExample: 35 45 95"
mapIDEditbox.tooltip = "Enter multiple IDs separating with a whitespace\nExample: 35 45 95"
mapIDEditbox:SetHook ("OnEnterPressed", textEntryOnEnterPressed)
tinsert (f.AllTextEntries, mapIDEditbox)
+1 -1
View File
@@ -64,4 +64,4 @@ end
function DF.Schedules.SetName(object, name)
object.name = name
end
end