delete character now working properly

AssemblerManiac [08-31-18 - 16:40]
delete character now working properly
Filename
IIfA/IIfA.lua
IIfA/IIfA.txt
IIfA/IIfABackpack.lua
IIfA/IIfADataCollection.lua
IIfA/IIfAMenu.lua
IIfA/IIfASettingsAdapter.lua
IIfA/IIfATooltip.lua
IIfA/libs/LibCustomTitles/LibCustomTitles.lua
diff --git a/IIfA/IIfA.lua b/IIfA/IIfA.lua
index 47dbf7e..713e592 100644
--- a/IIfA/IIfA.lua
+++ b/IIfA/IIfA.lua
@@ -15,7 +15,7 @@ if IIfA == nil then IIfA = {} end
 --local IIfA = IIfA

 IIfA.name 				= "Inventory Insight"
-IIfA.version 			= "3.18"
+IIfA.version 			= "3.19"
 IIfA.author 			= "AssemblerManiac & manavortex"
 IIfA.defaultAlertSound 	= nil
 IIfA.colorHandler 		= nil
diff --git a/IIfA/IIfA.txt b/IIfA/IIfA.txt
index c86ab24..f1f1517 100644
--- a/IIfA/IIfA.txt
+++ b/IIfA/IIfA.txt
@@ -1,14 +1,13 @@
 ## Title: Inventory Insight
 ## Author: manavortex, AssemblerManiac
-## Version: 3.18
-## APIVersion: 100023 100024
+## Version: 3.19
+## APIVersion: 100024 100025
 ## SavedVariables: IIfA_Settings IIfA_Data
 ## OptionalDependsOn: libFilters pChat FCOItemSaver

 libs\LibStub\LibStub.lua
 libs\LibAsync\LibAsync.lua
 libs\LibCustomTitles\LibCustomTitles.lua
-libs\LibScroll\LibScroll.lua
 libs\LibMediaProvider-1.0\LibMediaProvider-1.0.lua
 libs\LibAddonMenu-2.0\LibAddonMenu-2.0.lua
 libs\LibAddonMenu-2.0\controls\panel.lua
@@ -26,8 +25,6 @@ libs\LibAddonMenu-2.0\controls\texture.lua
 libs\LibAddonMenu-2.0\controls\iconpicker.lua
 libs\LibAddonMenu-2.0\controls\divider.lua
 libs\LibCustomMenu\LibCustomMenu.lua
-libs\LibAsync\LibAsync.lua
-

 IIfA_Preload.lua

diff --git a/IIfA/IIfABackpack.lua b/IIfA/IIfABackpack.lua
index e75c900..85ce979 100644
--- a/IIfA/IIfABackpack.lua
+++ b/IIfA/IIfABackpack.lua
@@ -599,21 +599,20 @@ function IIfA:CreateInventoryScroll()
 end

 function IIfA:GetCharacterList()
-	local charInventories = {}
+	local charList = {}
 	for i=1, GetNumCharacters() do
 		local charName, _, _, _, _, _, _, _ = GetCharacterInfo(i)
 		charName = charName:sub(1, charName:find("%^") - 1)
-		if (nil == charInventories[charName]) then
-			table.insert(charInventories, charName)
+		if (nil == charList[charName]) then
+			table.insert(charList, charName)
 		end
 	end
-	return charInventories
+	return charList
 end

 function IIfA:GetAccountInventoryList()
 	local accountInventories = IIfA.dropdownLocNames

-
 -- get character names, will present in same order as character selection screen
 	for idx, charName in ipairs(IIfA:GetCharacterList()) do
 		if (nil == accountInventories[charName]) then
@@ -939,10 +938,14 @@ function IIfA:FMC(control, WhoSeesIt)
 		[55] = 2097,	-- Dreadhorn
 		[56] = 2044,	-- Apostle
 		[57] = 2045,	-- Ebonshadow
+		[58] = 2190,	-- Fang Lair
+		[59] = 2189,	-- Scalecaller
 		[60] = 2120,	-- Worm Cult
 		[61] = 2186, 	-- Psijic
 		[62] = 2187,	-- Sapiarch
+		[63] = 2188,	-- Dremora
 		[64] = 2285,	-- Pyandonean
+		[67] = 2319,	-- Welkynar
 		}

 --		local i, a
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index c34b239..4c63ed3 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -35,9 +35,11 @@ end
 function IIfA:DeleteCharacterData(name)
 	if (name) then
 		--delete selected character
-		for characterName, character in pairs(IIfA.data.accountCharacters) do
+		for characterName, charId in pairs(IIfA.CharNameToId) do
 			if(characterName == name) then
-				IIfA.data.accountCharacters[name] = nil
+--d("Deleting char " .. name .. ", Id=" .. charId)
+				IIfA.CharNameToId[name] = nil
+				IIfA.CharIdToName[charId] = nil
 			end
 		end
 	end
@@ -125,12 +127,6 @@ function IIfA:CollectGuildBank(curGuild)
 end

 function IIfA:ScanCurrentCharacter()
-
-	local playerName = GetUnitName('player')
-
-	IIfA.data.accountCharacters 			= IIfA.data.accountCharacters or {}
-	IIfA.data.accountCharacters[playerName] = IIfA.data.accountCharacters[playerName] or {}
-
 	IIfA:ClearLocationData(IIfA.currentCharacterId)

 	if not IIfA:IsCharacterEquipIgnored() then
diff --git a/IIfA/IIfAMenu.lua b/IIfA/IIfAMenu.lua
index 0a5e6cc..71a521c 100644
--- a/IIfA/IIfAMenu.lua
+++ b/IIfA/IIfAMenu.lua
@@ -6,20 +6,6 @@ local LMP = LibStub("LibMediaProvider-1.0")

 local id, guildName, deleteHouse, restoreHouse, name

-local function getCharacterInventories()
-
-	local accountInventories = {}
-
-	if nil ~= IIfA:GetCharacterList() then
-		for characterName, character in pairs(IIfA:GetCharacterList()) do
-			d("inserting " .. characterName)
-			table.insert(accountInventories, characterName)
-		end
-	end
-
-	return accountInventories
-end
-
 local function getGuildBanks()
 	local guildBanks = {}
 	if(IIfA.data.guildBanks) then
diff --git a/IIfA/IIfASettingsAdapter.lua b/IIfA/IIfASettingsAdapter.lua
index 3e913c9..9001864 100644
--- a/IIfA/IIfASettingsAdapter.lua
+++ b/IIfA/IIfASettingsAdapter.lua
@@ -36,10 +36,6 @@ function IIfA:IgnoreCharacterEquip(value)
 	IIfA:RefreshInventoryScroll()
 end

-function IIfA:GetCharacterList()
-	return IIfA.data.accountCharacters
-end
-
 function IIfA:GetIgnoredCharacterList()
 	local ret = {}
 	local wasAdded = {}
diff --git a/IIfA/IIfATooltip.lua b/IIfA/IIfATooltip.lua
index 9d58c86..6c6d361 100644
--- a/IIfA/IIfATooltip.lua
+++ b/IIfA/IIfATooltip.lua
@@ -138,8 +138,8 @@ IIfA.racialTextures = {
 	[74] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(74)), styleTexture = getTex(IIfA.EMPTY_STRING)}, 	-- Dremora
 	[75] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(75)), styleTexture = getTex(IIfA.EMPTY_STRING)}, 	-- Pyandonean
 	[76] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(76)), styleTexture = getTex(IIfA.EMPTY_STRING)}, 	-- Divine Prosecution
-	[77] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(77)), styleTexture = getTex(IIfA.EMPTY_STRING)}, -- Unused
-	[78] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(78)), styleTexture = getTex(IIfA.EMPTY_STRING)}, -- Unused
+	[77] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(77)), styleTexture = getTex(IIfA.EMPTY_STRING)}, 	-- Huntsman
+	[78] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(78)), styleTexture = getTex(IIfA.EMPTY_STRING)}, 	-- Silver Dawn
 	[79] 	= { styleName = zo_strformat("<<1>>", GetItemStyleName(79)), styleTexture = getTex(IIfA.EMPTY_STRING)}, -- Unused
 }

diff --git a/IIfA/libs/LibCustomTitles/LibCustomTitles.lua b/IIfA/libs/LibCustomTitles/LibCustomTitles.lua
index 7149d51..441c396 100644
--- a/IIfA/libs/LibCustomTitles/LibCustomTitles.lua
+++ b/IIfA/libs/LibCustomTitles/LibCustomTitles.lua
@@ -1,9 +1,7 @@
 --[[
-Original Author: Ayantir
-Current Author: Dolgubon
-Past Author: Kyoma
+Author: Ayantir
 Filename: LibCustomTitles.lua
-Version: 10
+Version: 20
 ]]--

 --[[
@@ -31,170 +29,463 @@ http://creativecommons.org/licenses/by-nc-sa/4.0/legalcode

 ]]--

+local libLoaded
+local LIB_NAME, VERSION = "LibCustomTitles", 20
+local LibCustomTitles, oldminor = LibStub:NewLibrary(LIB_NAME, VERSION)
+if not LibCustomTitles then return end

---[[
-
-Author: Dolgubon
-NOTE: Used Kyoma's version as a base. Starting version number back at 1
-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
-	- If no title is given for a player in a certain language, then no custom title will be used
-	- The only exception is non official game translations - In that case, the English title will be used
-	- Removed the Modules from Kyoma's version
-	- 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
-	- Moved table with custom titles into seperate section with register function
-	- 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
+function LibCustomTitles:Init()

-	(v18)
-	- Added support for colors and even a simple gradient
-	- Moved language check to title registration
+	local CT_NO_TITLE = 0
+	local CT_TITLE_ACCOUNT = 1
+	local CT_TITLE_CHARACTER = 2

-	(v19)
-	- Fixed problems with UTF8 characters and color gradients
+	-- Default override
+	local overriden = {
+		en = "Volunteer",
+		fr = "Volontaire",
+		de = "Freiwillige",
+	}
+
+	local customTitles = {

-	(v20)
-	- Added option to replace a title globally.
-]]--
-local libName = "LibCustomTitles"
-LibStub:NewLibrary(libName, 100)
-EVENT_MANAGER:UnregisterForEvent(libName, EVENT_ADD_ON_LOADED)
+		["@Ayantir"] = { -- Dev / EU. v1
+			ov = true,
+			en = "The Enlightened",
+			fr = "Mangeuse de Gâteaux",
+			de = "Die Erleuchtete",
+		},
+
+		["@Baertram"] = { -- Dev / EU. v4
+			ov = true,
+			en = "Ursa Major",
+			fr = "Ursa Major",
+			de = "Ursa Major",
+		},
+
+		["@sirinsidiator"] = { -- Dev / EU. v5
+			["Illonia Ithildû"] = {
+				ov = true,
+				en = "Planeswalker",
+				fr = "Arpenteuse de Mondes",
+				de = "Weltenwanderer",
+			},
+			ov = true,
+			en = "Absolutely Not Suspicious",
+			fr = "Carrément pas suspect",
+			de = "Absolut Nicht Verdächtig",
+		},
+
+		["@Randactyl"] = { -- Dev / NA. v6
+			["Vedrasi Rilim"] = {
+				ov = true,
+				en = "Glorious Leader",
+			},
+			ov = true,
+			en = "No Lollygaggin'",
+		},
+
+		["@Wedgez"] = { -- NA. v8
+			ov = true,
+			en = "Golden Light Master",
+		},
+
+		["@Ign0tus"] = { -- NA. v8
+			["Smudgê"] = {
+				ov = true,
+				en = "Infiltrator",
+			},
+			["Nefandus Pravus"] = {
+				ov = true,
+				en = "Nightlord",
+			},
+			["Zero Divisor"] = {
+				ov = true,
+				en = "Executioner",
+			},
+			ov = true,
+			en = "Sweetroll Thief",
+		},
+
+		["@dOpiate"] = { -- Dev / EU. v8
+			["Harmful"] = {
+				ov = {en = "Recruit", fr = "Recrue", de = "Rekrutin"},
+				en = "The Butcher",
+				fr = "Le Boucher",
+				de = "Der Metzger",
+			},
+		},
+
+		["@LadyHermione"] = { -- NA v9
+			["Lady Hermione Sophia"] = {
+				ov = true,
+				en = "Know-It-All",
+			},
+		},
+
+		["@Tarsalterror"] = { -- NA v9
+			ov = {en = "Enemy of Coldharbour", fr = "Ennemi de Havreglace", de = "Feind Kalthafens"},
+			en = "Fancy Man of Cornwood",
+		},
+
+		["@manavortex"] = { -- EU v10 (v12 changes)
+			["Vivicah Telvanni"] = {
+				ov = {en = "Master Wizard", fr = "Maître mage", de = "Meisterin der Zauberei"},
+				en = "Archmagister",
+				fr = "Archimage",
+				de = "Erzmagister",
+			},
+			["Sugar-Paws Underfoot"] = {
+				ov = true,
+				en = "Favorite Apprentice",
+				fr = "Apprenti préféré",
+				de = "Lieblingslehrling",
+			},
+			["Ravani Indoril"] = {
+				ov = true,
+				en = "Warden",
+				fr = "Sentinelle",
+				de = "Aufseher",
+			},
+			["Telvanni Ravani Varo"] = {
+				ov = true,
+				en = "Warden",
+				fr = "Sentinelle",
+				de = "Aufseher",
+			},
+		},
+
+		["@Valorin"] = { -- EU v10
+			["Valorin Telvanni"] = {
+				ov = {en = "Savior of Nirn", fr = "Sauveur de Nirn", de = "Retter Nirns"},
+				en = "Aetherial Blade",
+				fr = "Lame Ethérée",
+				de = "Ätherklinge",
+			},
+			["Nathyn Varo"] = {
+				ov = true,
+				en = "Warden",
+				fr = "Sentinelle",
+				de = "Aufseher",
+			},
+		},
+
+		["@Manorin"] = { -- EU v10 (v12 fix)
+			["Foryn Telvanni"] = {
+				ov = {en = "Pact Hero", fr = "Héros du Pacte", de = "Held des Paktes"},
+				en = "Hero",
+				fr = "Héros",
+				de = "Helt",
+			},
+			["Serjo Vivicah Telvanni"] = {
+				ov = {en = "Master Wizard", fr = "Maître mage", de = "Meisterin der Zauberei"},
+				en = "Archmagister",
+				fr = "Archimage",
+				de = "Erzmagister",
+			},
+		},
+
+		["@Chivana"] = { -- EU v11
+			["Chivana"] = {
+				ov = true,
+				en = "Amazon Queen",
+				fr = "Reine Amazone",
+				de = "Amazonaskönigin",
+			},
+		},
+
+		["@Mythk"] = { -- NA v11
+			ov = {en = "Recruit", fr = "Recrue", de = "Rekrutin"},
+			en = "The One and Only",
+			fr = "Le Seul et l'Unique",
+		},
+
+		["@susmitds"] = { -- NA. v11
+			["Shadow Kitter"] = {
+				ov = true,
+				en = "Emperor Slayer",
+			},
+			["Venom Kitter"] = {
+				ov = true,
+				en = "Poison Angel",
+			},
+			["Wind Kitter"] = {
+				ov = true,
+				en = "Cyclone Walker",
+			},
+			["Lumina Kitter"] = {
+				ov = true,
+				en = "Darklight Seeker",
+			},
+			["Thunder Xyler"] = {
+				ov = true,
+				en = "Unbound Infinium",
+			},
+			["Light Xyler"] = {
+				ov = true,
+				en = "Everglow Hunter",
+			},
+			["Fire Xyler"] = {
+				ov = true,
+				en = "Eternal Inferno",
+			},
+			["Void Xyler"] = {
+				ov = true,
+				en = "Existential Anomaly",
+			},
+		},
+
+		["@JasminTheSecond"] = { -- EU v11
+			["Durac"] = {
+				ov = true,
+				en = "The Lost",
+				fr = "L'égaré",
+				de = "Der Verschollene",
+			},
+		},
+
+		["@Haunted1994"] = { -- v12
+			["Jah'rakal"] = {
+				ov = {en = "Veteran", fr = "Vétéran", de = "Veteran"},
+				en = "Troll Warlord",
+				fr = "Troll Warlord",
+				de = "Troll Warlord",
+			},
+		},
+
+		["@Vortexman11"] = { -- v12
+			["Ålaunus"] = {
+				ov = true,
+				en = "The Silent",
+				fr = "Le Discret",
+				de = "Die Stille",
+			},
+		},

-local libLoaded
-local LIB_NAME, VERSION = "LibCustomTitlesN", 3.0
-local LibCustomTitles, oldminor = LibStub:NewLibrary(LIB_NAME, VERSION)
-if not LibCustomTitles then return end
+		["@Domardal"] = { -- v12
+			ov = true,
+			en = "Coco",
+			fr = "Coco",
+			de = "Coco",
+		},

-local titles = {}
+		["@RaddyBK"] = { -- v12
+			["Radolfus"] = {
+				ov = {en = "Major", fr = "Major", de = "Major"},
+				en = "The Elder Dragon",
+				fr = "Le Vieux Dragon",
+				de = "The Elder Dragon",
+			},
+			["RADOLFUS II"] = {
+				ov = {en = "Executioner", fr = "Exécuteur", de = "Henker"},
+				en = "The Elder Dragon",
+				fr = "Le Vieux Dragon",
+				de = "The Elder Dragon",
+			},
+		},
+
+		["@Dolgubon"] = { -- v12
+			["Relthion"] = {
+				ov = true,
+				en = "Undying",
+				fr = "L'immortel",
+				de = "Undying",
+			},
+		},
+
+		["@Sethize"] = { -- EU v12
+			["Nelvan Telvanni"] = {
+				ov = {en = "Master Wizard", fr = "Maître mage", de = "Meister der Zauberei"},
+				en = "Master",
+				fr = "Maître",
+				de = "Meister",
+			},
+		},
+
+		["@ScattyThePirate"] = { -- EU v13
+			["Teldryn Dreth"] = {
+				ov = true,
+				en = "Warden",
+				fr = "Sentinelle",
+				de = "Aufseher",
+			},
+			["Ralyn Telvanni"] = {
+				ov = true,
+				en = "Spellwright",
+				fr = "Tisseur de Sorts",
+				--de = "Meister",
+			},
+			["Shabar-Jo"] = {
+				ov = true,
+				en = "Tisseur de Sorts",
+				fr = "Spellwright",
+				--de = "Meister",
+			},
+			["Shurkul gro-Kharzog"] = {
+				ov = {en = "Fighters Guild Victor", fr = "Champion de la guilde des guerriers", de = "Sieger der Kriegergilde"},
+				en = "The Monster",
+				fr = "La Bête",
+				de = "Das Monster",
+			},
+			["Azuk gro-Shakh"] = {
+				ov = {en = "Fighters Guild Victor", fr = "Champion de la guilde des guerriers", de = "Sieger der Kriegergilde"},
+				en = "Windsinger",
+				fr = "Ténor des tempêtes",
+				--de = "Das Monster",
+			},
+			["Xal-Shei"] = {
+				ov = {en = "Fighters Guild Victor", fr = "Champion de la guilde des guerriers", de = "Sieger der Kriegergilde"},
+				en = "Swamp Knight",
+				fr = "Chevalier des Marais",
+				--de = "Das Monster",
+			},
+		},
+
+		["@ScattyTheWizard"] = { -- v13
+			["Marukh-do"] = {
+				ov = true,
+				en = "Privateer",
+				fr = "Corsaire",
+				--de = "Meister",
+			},
+		},

-local _, nonHideTitle =  GetAchievementRewardTitle(92)
-local _, nonHideCharTitle =  GetAchievementRewardTitle(93)
+		["@Karstyll"] = { -- v13
+			ov = true,
+			en = "Forsaken",
+			fr = "L'oublié",
+			de = "Die Verlassene",
+		},

+		["@Methuselah86"] = { -- v13
+			ov = true,
+			en = "Wabbajack Warrior",
+			fr = "Guerrier de Wabbajack",
+			--de = "Die Verlassene",
+		},

+		["@DaedricAdept"] = { -- v14
+			ov = {en = "Pact Hero", fr = "Héros du Pacte", de = "Held des Paktes"},
+			en = "Hand of Almalexia",
+			fr = "Main d'Almalexia",
+			--de = "Die Verlassene",
+		},

-local lang = GetCVar("Language.2")
-local supportedLang =
-{
-	['en']=1,
-	['de']=1,
-	['fr']=1,
-}
+		["@Cloudless"] = { -- v14
+			ov = true,
+			en = "Order of Doctrine",
+			fr = "Ordre de la Doctrine",
+			--de = "Die Verlassene",
+		},

+		["@Atomkern"] = { -- v13
+			ov = true,
+			en = "The Refrigerator",
+			fr = "Le glacé",
+			--de = "Die Verlassene",
+		},

-local customTitles = {}
-local playerDisplayName = HashString(GetDisplayName())
-local playerCharName = HashString( GetUnitName('player'))
-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
+		["@Orizonta"] = { -- v13
+			ov = true,
+			en = "Manslayer",
+			fr = "Assassin",
+			--de = "Die Verlassene",
+		},

-		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
+		["@laksikus"] = { -- v13
+			ov = {en = "Veteran", fr = "Vétéran", de = "Veteran"},
+			en = "Sexy Zogger",
+			fr = "Zog-Zog",
+			--de = "Die Verlassene",
+		},

-	if override == true  then
-		if playerDisplayName == displayName then
+		["@flyty"] = { -- v13
+			ov = true,
+			en = "Always Drunk",
+			fr = "Toujours bourré",
+			--de = "Die Verlassene",
+		},
+
+		["@Deltia"] = { -- v13
+			ov = {en = "Tyro", fr = "Première classe", de = "Tyro"},
+			en = "The Destroyer",
+			fr = "Le Destructeur",
+			--de = "Die Verlassene",
+		},

-			if charName == playerCharName then
-				doesCharHaveGlobal = true
-			elseif not charName then
-				doesPlayerHaveGlobal = true
-			end -- otherwise, it's another character
+		["@tannips"] = { -- v13
+			ov = true,
+			en = "Potentate",
+			fr = "Potentat",
+			--de = "Die Verlassene",
+		},

-		end
-	end
+		["@sioniann"] = { -- v13
+			["Uloth The Furious Blade"] = {
+				ov = true,
+				en = "Sinister Turkey",
+				fr = "Dindon Sinistre",
+				--de = "Meister",
+			},
+			["Enid an Gleana"] = {
+				ov = true,
+				en = "Fountain of Auridon",
+				fr = "Fontaine d'Auridia",
+				--de = "Meister",
+			},
+		},
+
+		["@HMS-Dragonfly"] = { -- v16
+			ov = true,
+			en = "Knight of Stendarr",
+			fr = "Chevalier de Stendarr",
+			--de = "Die Verlassene",
+		},

-	local playerGender = GetUnitGender("player")
-	local genderTitle
+		["@Faso"] = { -- v16
+			["Fasò"] = {
+				ov = true,
+				en = "Knights Radiant",
+			},
+		},

-	if type(override) == "boolean" then --override all titles
-		override = override and "-ALL-" or "-NONE-"
-	elseif type(override) == "number" then --get override title from achievementId
-		local hasRewardOfType, titleName = GetAchievementRewardTitle(override, playerGender) --gender is 1 or 2
-		if hasRewardOfType and titleName then
-			genderTitle = select(2, GetAchievementRewardTitle(override, 3 - playerGender))  -- cuz 3-2=1 and 3-1=2
-			override = titleName
-		end
-	elseif type(override) == "table" then --use language table with strings
-		override = override[lang] or override["en"]
-	end
+		["@nifty2g"] = { -- v16
+			["Nifty Jong-Un"] = {
+				ov = true,
+				en = "Dawn of Anu",
+			},
+		},

-	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
-				customTitles[displayName][charName] = {}
-			end
-			charOrAccount = customTitles[displayName][charName]
-		end
-		charOrAccount[override] = title
-		if genderTitle and genderTitle ~= override then
-			charOrAccount[genderTitle] = title
-		end
-	end
-end
+		["@Twirlz"] = { -- v17
+			["Yirel Virith"] = {
+				ov = true,
+				en = "Nightcaller",
+			},
+		},

-local maps=
-{
-	[126]=32,
-	[125]=111,
-	[123]=246,
-	[94]=223,
-	[40]=228,
-	[41]=252,
-	[42]=233,
-	[43] = 232,
-	[47] = 214,
-	[58] = 220,
-	[59] = 196,
-	[60] = 234,
-}
-
-local function stringConvert(str)
-	local t = {string.byte(str, 1, #str)}
-	for i = 1, #t do
-		t[i] = ((t[i] - 38)*3) % 89 + 38
-		t[i] =  maps[t[i]] or t[i]
-	end
-	return string.char(unpack(t))
-end
+		["@Anceane"] = { -- v19
+			ov = true,
+			en = "Dark Emerald",
+			fr = "Emeraude Sombre",
+		},

---= MOD(C1 +24,89)+38
---= MOD(E1 +78,89)+38
+		["@Potato-Salad"] = { -- v19
+			ov = true,
+			en = "Seraphim of Azura",
+			fr = "Séraphin d'Azura",
+		},

---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()
+		["@blakeblox"] = { -- v19
+			["fyboba"] = {
+				ov = {en = "Tyro", fr = "Première classe", de = "Tyro"},
+				en = "Golden Lady",
+			},
+		},
+
+	}
+
+	local lang = GetCVar("Language.2")

-
-	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
@@ -204,67 +495,58 @@ function LibCustomTitles:Init()
 		end
 		return CT_NO_TITLE
 	end
-
-	local function GetCustomTitle(originalTitle, customTitle)
-
-		if customTitle then
-			if customTitle[originalTitle] then
-				return stringConvert(customTitle[originalTitle])
-			elseif originalTitle == "" and customTitle["-NONE-"] then
-				return stringConvert(customTitle["-NONE-"])
-			elseif customTitle["-ALL-"] then
-				return stringConvert(customTitle["-ALL-"])
-			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)
-
+
+	local function GetModifiedTitle(originalTitle, displayName, unitName, registerType)
+
+		local title = originalTitle
 		if registerType == CT_TITLE_CHARACTER then
-			return GetCustomTitle(originalTitle, customTitles[displayName][charName]) or returnTitle
-		elseif registerType == CT_TITLE_ACCOUNT then
-			return GetCustomTitle(originalTitle, customTitles[displayName]) or returnTitle
+			if customTitles[displayName][unitName].ov then
+				if type(customTitles[displayName][unitName].ov) == "boolean" then
+					if originalTitle == overriden[lang] then
+						title = customTitles[displayName][unitName][lang] or originalTitle
+					end
+				elseif originalTitle == customTitles[displayName][unitName].ov[lang] then
+					title = customTitles[displayName][unitName][lang] or originalTitle
+				end
+			end
+		elseif registerType == CT_TITLE_ACCOUNT then
+			if customTitles[displayName].ov then
+				if type(customTitles[displayName].ov) == "boolean" then
+					if originalTitle == overriden[lang] then
+						title = customTitles[displayName][lang] or originalTitle
+					end
+				elseif originalTitle == customTitles[displayName].ov[lang] then
+					title = customTitles[displayName][lang] or originalTitle
+				end
+			end
 		end
-		return returnTitle
+
+		return title
+
 	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)
+		local unitDisplayName = GetUnitDisplayName(unitTag)
+		local unitCharacterName = GetUnitName(unitTag)
+		local registerType = GetCustomTitleType(unitDisplayName, unitCharacterName)
+		if registerType ~= CT_NO_TITLE then
+			return GetModifiedTitle(unitTitleOriginal, unitDisplayName, unitCharacterName, registerType)
+		end
+		return unitTitleOriginal
 	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
-			-- We don't want the title to overwrite everything in the dropdown
-			-- So we only replace volunteer
-
-			if nonHideTitle ~= titleOriginal then
-				if doesPlayerHaveGlobal or doesCharHaveGlobal then
-					return titleOriginal
-				else
-					return title
-				end
-			end
-
-			return title
-		else
-			return title
+		local displayName = GetDisplayName()
+		local characterName = GetUnitName("player")
+		local registerType = GetCustomTitleType(displayName, characterName)
+		if registerType ~= CT_NO_TITLE then
+			return GetModifiedTitle(titleOriginal, displayName, characterName, registerType)
 		end
+		return titleOriginal
 	end

 end
@@ -272,243 +554,10 @@ end
 local function OnAddonLoaded()
 	if not libLoaded then
 		libLoaded = true
-		local LCC = LibStub(LIB_NAME)
+		local LCC = LibStub('LibCustomTitles')
 		LCC:Init()
 		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<];",})
-lct:RT(716725346,4019141728,true,{en="nu{@a/}[;ZvaPZ>w",})
-lct:RT(1540406231,false,true,{en="S<;a0C};>",fr="n;a0C};>",de="0;]a0C};>",})
-lct:RT(755746377,false,628,{en="S<;aM;>;YuX@C]",fr="n;aMZ;>YuZ@;^]",de="0;]aTC<[@b@;]",})
-lct:RT(4141355865,false,92,{en="1^Z[vyu{@;]",fr="1^Z[vyu{@;]",de="1^Z[vyu{@;]",})
-lct:RT(959437082,false,2139,{en="1]}z<C>alu]@",})
-lct:RT(3185324787,false,92,{en="/]X<Z@;X@",fr="/]X<Z@;X@;",de="/]X<Z@;=@",})
-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(1134753014,false,92,{en="q]{ua3uxC]",fr="q]{ua3uxC]",de="q]{ua3uxC]",})
-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(1419169535,false,1330,{en="R^u]@;]yu{@;]",})
-lct:RT(3580024219,false,92,{en="5@C]y<C[va3;]X;>u]}",fr="3;]X;>uZ];av;alC]@FS;yzK@;",de="5@^]yY;{@;a5`[v>;]",})
-lct:RT(347320517,false,92,{en="4C@u@Ca3u{<;]",fr="3u{<;]av;a4Cyy;{av;aS;]];",de="Pu]@CYY;[{@uyzY;]",})
-lct:RT(87490740,false,92,{en="5u>w^Z>;apC{;",de="5u>w^Z>;{apC{;",})
-lct:RT(2550321801,false,92,{en="l[^YY}a4uA{alZw<@}ak[uA{",fr="l[^YY}a4uA{alZw<@}ak[uA{",})lct:RT(2550321801,1979421257,1810,{en="Su>=Z@@}Fku@",fr="Su>=Z@@}Fku@",})
-lct:RT(3995154142,false,92,{en="N@;]>u[ak<uyzZC>",fr="k<uyzZC>aa@;]>;[",de="NAZw;]ak<uyzZC>",})
-lct:RT(874548877,false,92,{en="3^v:u[[a3u|;>",fr="3^v:u[[a3u|;>",de="5X<[uyy:u[[a3u|;>",})
-lct:RT(416224960,false,92,{en="6;]}a/>w]}",fr="S]c{a;>aXC[c];",de="5;<]aA'@;>v",})
-lct:RT(2740299925,3886364242,92,{en="0]uwC>a5zZ]Z@",fr="0]uwC>a5zZ]Z@",de="0]uwC>a5zZ]Z@",})
-lct:RT(3196471767,false,92,{en="1u][ZXakC>>CZ{{;^]",fr="kC>>CZ{{;^]aaa[DuZ[",de="P>C:[u^X<FP;>>;]",})
-lct:RT(1731359458,false,92,{en="5u>v:uwa3u{@;]",})
-lct:RT(2392316419,false,true,{en="lZ{@Z=[ZaMu=[u|u",fr="ku>>;aMu=[u|u",de="U^X=;]]C<]aMu=[u|u",})lct:RT(2392316419,1701693549,true,{en="4Z{@uX<ZCaMu=[u|u",fr="ku>>;aMu=[u|u",de="U^X=;]]C<]aMu=[u|u",})
-lct:RT(2402295877,false,92,{en="1];u@a5uw;(aN?^u[aCYaO;u|;>",fr="1]u>va5uZ>@aawu[av^akZ;[",de="1]Ct;]aO;Z[Zw;]aOZyy;[",})
-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",})
-lct:RT(2193066671,false,92,{en="pCX=;@;;]",})lct:RT(2193066671,2274919616,1810,{en="PC{yC>u^@aPZ@@}",})
-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(2455827257,false,92,{en="S<;a5@ZX=a4]Z>X;{{",de="0Z;a5@CX=a4]Z>B;{{Z>",})
-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[^>waY']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>@",})
-lct:RT(188206946,false,92,{en="3u{@;]aCYa3;y;{",fr="3ug@];av;{a3cy;{",de="3;Z{@;]av;]a3;y;{",})
-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(1313177490,false,92,{en="S<;akC^]uw;C^{aP>Zw<@",})lct:RT(1313177490,3582454635,92,{en="S<;amyyC]@u[akC>?^;]C]",})
-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;[",})
-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(3252834201,false,51,{en="S<;a5ZyC>aN_z];{{",fr="n;a5ZyC>aN_z];{{",de="0;]a5ZyC>aN_z];{{",})lct:RT(3252834201,2694506024,92,{en="S<;a5ZyC>aN_z];{{",fr="n;a5ZyC>aN_z];{{",de="0;]a5ZyC>aN_z];{{",})
-lct:RT(2822666538,false,true,{en="S<;a5C^[ap;uz;]",fr="nD/>=C^",de="0;]a5;;[;>a5;>{;>yu>>",})
-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;]a5'vZ>{;[",})
-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>",})
-lct:RT(3836251840,false,true,{en="ku=;{aM}aS<;aoX;u>",fr="1a@;u^au^aMC]vav;anDCXEu>",de="P^X<;>auya3;;]",})lct:RT(3836251840,3297937951,1330,{en="R^;;>aCYaku=;{",fr="p;Z>;av;{a1a@;u^_",de="P`>ZwZ>av;]aP^X<;>",})
-lct:RT(1059334478,false,92,{en="kCu_;{a3;@u[",fr="kCu_;{a3E@u[",de="PCu_;{a3;@u[[",})
-lct:RT(1076342159,false,92,{en="S<;aOC>C]u:[;",fr="nDOC>C]u:[;",de="vZ;aN<]<uY@;>",})
-lct:RT(130665165,false,92,{en="S<;aMCw;}yu>",fr="n;ak]C?^;FyZ@uZ>;",de="0;]aM^<yu>>",})
-
-
---[[
-Author: Kyoma
-Filename: LibTitleLocale.lua
-Version: 3 (Horns of the Reach)
-Total: 95 titles
-]]--
-
-local LocaleTitles =
-{
-	["de"] =
-	{
-		[2] =
-		{
-			[1810] = "Divayth Fyrs Gehilfe",
-			[1838] = "Der Tick-Tack-Peiniger",
-			[1330] = "makelloser Eroberer",
-			[51] = "Monsterjäger",
-			[705] = "Großfeldherr",
-			[92] = "Freiwilliger",
-			[494] = "Meisterangler",
-			[1391] = "dro-m'Athra-Zerstörer",
-			[628] = "Held Tamriels",
-			[1910] = "Held der Eroberung",
-			[1913] = "Großchampion",
-			[2139] = "Greifenherz",
-			[2079] = "Stimme der Vernunft",
-			[2136] = "Lichtbringer",
-			[2075] = "Unsterblicher Erlöser",
-		},
-		[1] =
-		{
-			[1810] = "Divayth Fyrs Gehilfin",
-			[1838] = "Die Tick-Tack-Peinigerin",
-			[1330] = "makellose Eroberin",
-			[51] = "Monsterjägerin",
-			[705] = "Großfeldherrin",
-			[92] = "Freiwillige",
-			[494] = "Meisteranglerin",
-			[1391] = "dro-m'Athra-Zerstörerin",
-			[628] = "Heldin Tamriels",
-			[1910] = "Heldin der Eroberung",
-			[1913] = "Großchampion",
-		},
-	},
-	["en"] =
-	{
-		[2] =
-		{
-			[1810] = "Divayth Fyr's Coadjutor",
-			[1838] = "Tick-Tock Tormentor",
-			[1330] = "The Flawless Conqueror",
-			[51] = "Monster Hunter",
-			[705] = "Grand Overlord",
-			[628] = "Tamriel Hero",
-			[1391] = "Dro-m'Athra Destroyer",
-			[494] = "Master Angler",
-			[92] = "Volunteer",
-			[1910] = "Conquering Hero",
-			[1913] = "Grand Champion",
-			[2079] = "Voice of Reason",
-			[2075] = "Immortal Redeemer",
-			[2139] = "Gryphon Heart",
-			[2136] = "Bringer of Light",
-		},
-		[1] =
-		{
-			[1810] = "Divayth Fyr's Coadjutor",
-			[1838] = "Tick-Tock Tormentor",
-			[1330] = "The Flawless Conqueror",
-			[51] = "Monster Hunter",
-			[705] = "Grand Overlord",
-			[628] = "Tamriel Hero",
-			[1391] = "Dro-m'Athra Destroyer",
-			[494] = "Master Angler",
-			[92] = "Volunteer",
-			[1910] = "Conquering Hero",
-			[1913] = "Grand Champion",
-
-		},
-	},
-	["fr"] =
-	{
-		[2] =
-		{
-			[1810] = "Coadjuteur de Divayth Fyr",
-			[1838] = "Tourmenteur des Tic-tac",
-			[1330] = "Le conquérant implacable",
-			[51] = "Chasseur de monstres",
-			[705] = "Grand maréchal",
-			[628] = "Héros de Tamriel",
-			[1391] = "Destructeur des dro-m'Athra",
-			[494] = "Maître de pêche",
-			[92] = "Volontaire",
-			[1910] = "Héros conquérant",
-			[1913] = "Grand champion",
-			[2075] = "Rédempteur immortel",
-			[2139] = "Cœur-de-griffon",
-			[2136] = "Porteur de lumière",
-			[2079] = "Voix de la raison",
-
-
-		},
-		[1] =
-		{
-
-			[1810] = "Coadjutrice de Divayth Fyr",
-			[1838] = "Tourmenteuse des Tic-tac",
-			[1330] = "La conquérante implacable",
-			[51] = "Chasseuse de monstres",
-			[1391] = "Destructrice des dro-m'Athra",
-			[494] = "Maîtresse de pêche",
-			[705] = "Grand maréchal",
-			[628] = "Héroïne de Tamriel",
-			[92] = "Volontaire",
-			[1910] = "Héroïne conquérante",
-			[1913] = "Grande championne",
-		},
-	},
-}
-
-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)
-		if (hasTitle and gender) then
-			if (LocaleTitles[lang] and LocaleTitles[lang][gender] and LocaleTitles[lang][gender][achievementId]) then
-				title = LocaleTitles[lang][gender][achievementId]
-			end
-		end
-		return hasTitle, title
-	end
-
-	LibCustomTitles.Unload = Unload
-end
-
-if(LibCustomTitles.Unload) then LibCustomTitles.Unload() end
-Load()
+EVENT_MANAGER:RegisterForEvent(LIB_NAME, EVENT_ADD_ON_LOADED, OnAddonLoaded)
\ No newline at end of file