@@ -70,12 +70,19 @@ function Module:PrintSimcProfile()
7070 text = text :gsub (" # Checksum: %x+$" , " " );
7171
7272 local customLoadoutsString = " " ;
73+ local customLoadoutsChecksumString = " " ;
7374 for _ , loadout in ipairs (GlobalAPI :GetLoadouts ()) do
7475 if not loadout .isBlizzardLoadout or not loadout .playerIsOwner then
7576 local importString = GlobalAPI :GetExportString (loadout .id , true );
7677 customLoadoutsString = string.format (
7778 " %s# Saved Loadout: %s\n # talents=%s\n " ,
7879 customLoadoutsString ,
80+ loadout .name ,
81+ importString
82+ );
83+ customLoadoutsChecksumString = string.format (
84+ " %s# Saved Loadout: %s\n # talents=%s\n " ,
85+ customLoadoutsChecksumString ,
7986 loadout .name :gsub (" ||" , " |" ),
8087 importString
8188 );
@@ -84,12 +91,9 @@ function Module:PrintSimcProfile()
8491
8592 if customLoadoutsString == " " then return ; end
8693
87- -- append the custom loadouts to the end of the simc profile
88- text = text .. customLoadoutsString .. " \n "
89-
9094 -- calculate the new checksum
91- local checksum = adler32 (text );
92- text = text .. " # Checksum: " .. string.format (' %x' , checksum );
95+ local checksum = adler32 (text .. customLoadoutsChecksumString .. " \n " );
96+ text = text .. customLoadoutsString .. " \n " .. " # Checksum: " .. string.format (' %x' , checksum );
9397
9498 -- update the simc edit box
9599 SimcEditBox :SetText (text );
0 commit comments