@@ -7,6 +7,9 @@ TLM._ns = ns;
77
88_G .TalentLoadoutManager = TLM ;
99
10+ local BLIZZ_ATLAS = CreateAtlasMarkup (" gmchat-icon-blizz" , 16 , 16 );
11+ local XP_ATLAS = CreateAtlasMarkup (" GarrMission_CurrencyIcon-Xp" , 16 , 16 );
12+
1013ns .SERIALIZATION_NODE_SEPARATOR = " \n " ;
1114--- format: nodeID_entryID_spellIDOrSubTreeID_rank
1215ns .SERIALIZATION_VALUE_SEPARATOR = " _" ;
@@ -225,7 +228,7 @@ function TLM:RebuildLoadoutByIDCache()
225228 for specID , playerList in pairs (specList ) do
226229 for playerName , loadoutList in pairs (playerList ) do
227230 for configID , loadoutInfo in pairs (loadoutList ) do
228- local displayName = CreateAtlasMarkup ( " gmchat-icon-blizz " , 16 , 16 ) .. loadoutInfo .name ;
231+ local displayName = BLIZZ_ATLAS .. ( loadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ;
229232 if playerName ~= self .playerName then
230233 displayName = displayName .. " (" .. playerName .. " )" ;
231234 end
@@ -249,10 +252,10 @@ function TLM:RebuildLoadoutByIDCache()
249252 for classID , specList in pairs (self .db .customLoadouts ) do
250253 for specID , loadoutList in pairs (specList ) do
251254 for loadoutID , loadoutInfo in pairs (loadoutList ) do
252- local namePrefix = loadoutInfo .levelingOrder and CreateAtlasMarkup ( " GarrMission_CurrencyIcon-Xp " , 16 , 16 ) or " " ;
255+ local namePrefix = loadoutInfo .levelingOrder and XP_ATLAS or " " ;
253256 local displayInfo = {
254257 id = loadoutID ,
255- displayName = namePrefix .. loadoutInfo .name ,
258+ displayName = namePrefix .. ( loadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ,
256259 loadoutInfo = loadoutInfo ,
257260 owner = nil ,
258261 playerIsOwner = true ,
@@ -442,7 +445,7 @@ function TLM:UpdateBlizzardLoadout(configID, specID)
442445 id = configID ,
443446 };
444447 self .db .blizzardLoadouts [classID ][specID ][self .playerName ][configID ] = loadoutInfo ;
445- local displayName = CreateAtlasMarkup ( " gmchat-icon-blizz " , 16 , 16 ) .. loadoutInfo .name ;
448+ local displayName = BLIZZ_ATLAS .. ( loadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ;
446449 local displayInfo = {
447450 id = configID ,
448451 displayName = displayName ,
@@ -476,10 +479,10 @@ function TLM:UpdateCustomLoadout(customLoadoutID, selectedNodes, levelingOrder,
476479 loadoutInfo .selectedNodes = selectedNodes ;
477480 loadoutInfo .levelingOrder = levelingOrder ;
478481
479- local namePrefix = loadoutInfo .levelingOrder and CreateAtlasMarkup ( " GarrMission_CurrencyIcon-Xp " , 16 , 16 ) or " " ;
482+ local namePrefix = loadoutInfo .levelingOrder and XP_ATLAS or " " ;
480483 local displayInfo = {
481484 id = customLoadoutID ,
482- displayName = namePrefix .. loadoutInfo .name ,
485+ displayName = namePrefix .. ( loadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ,
483486 loadoutInfo = loadoutInfo ,
484487 owner = nil ,
485488 playerIsOwner = true ,
@@ -846,10 +849,10 @@ function TLM:ApplyCustomLoadout(loadoutInfo, autoApply)
846849 end
847850
848851 self .charDb .selectedCustomLoadoutID [self .playerSpecID ] = loadoutInfo .id ;
849- local namePrefix = loadoutInfo .levelingOrder and CreateAtlasMarkup ( " GarrMission_CurrencyIcon-Xp " , 16 , 16 ) or " " ;
852+ local namePrefix = loadoutInfo .levelingOrder and XP_ATLAS or " " ;
850853 local displayInfo = {
851854 id = loadoutInfo .id ,
852- displayName = namePrefix .. loadoutInfo .name ,
855+ displayName = namePrefix .. ( loadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ,
853856 loadoutInfo = loadoutInfo ,
854857 owner = nil ,
855858 playerIsOwner = true ,
@@ -1016,11 +1019,11 @@ function TLM:CreateCustomLoadoutFromLoadoutData(loadoutInfo, classIDOrNil, specI
10161019 newLoadoutInfo .parentMapping [self .playerName ] = self :GetActiveBlizzardLoadoutConfigID ();
10171020 end
10181021 self .db .customLoadouts [classID ][specID ][id ] = newLoadoutInfo ;
1019- local namePrefix = newLoadoutInfo .levelingOrder and CreateAtlasMarkup ( " GarrMission_CurrencyIcon-Xp " , 16 , 16 ) or " " ;
1022+ local namePrefix = newLoadoutInfo .levelingOrder and XP_ATLAS or " " ;
10201023 --- @type TLM_LoadoutDisplayInfo
10211024 local displayInfo = {
10221025 id = id ,
1023- displayName = namePrefix .. newLoadoutInfo .name ,
1026+ displayName = namePrefix .. ( newLoadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ,
10241027 loadoutInfo = newLoadoutInfo ,
10251028 owner = nil ,
10261029 playerIsOwner = true ,
@@ -1086,10 +1089,10 @@ function TLM:RenameCustomLoadout(classIDOrNil, specIDOrNil, loadoutID, newName)
10861089 local loadoutInfo = self .db .customLoadouts [classID ][specID ][loadoutID ];
10871090 loadoutInfo .name = newName ;
10881091
1089- local namePrefix = loadoutInfo .levelingOrder and CreateAtlasMarkup ( " GarrMission_CurrencyIcon-Xp " , 16 , 16 ) or " " ;
1092+ local namePrefix = loadoutInfo .levelingOrder and XP_ATLAS or " " ;
10901093 local displayInfo = {
10911094 id = loadoutID ,
1092- displayName = namePrefix .. loadoutInfo .name ,
1095+ displayName = namePrefix .. ( loadoutInfo .name ): gsub ( ' .-|| ' , ' ' , 1 ) ,
10931096 loadoutInfo = loadoutInfo ,
10941097 owner = nil ,
10951098 playerIsOwner = true ,
0 commit comments