Skip to content

Commit

Permalink
force a data purge request popup if the major version number (SMARTBU…
Browse files Browse the repository at this point in the history
…FF_VERSIONNR) changes

Signed-off-by: speedwaystar <[email protected]>
  • Loading branch information
speedwaystar committed Feb 4, 2023
1 parent 7977169 commit c8244a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SmartBuff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3066,12 +3066,15 @@ function SMARTBUFF_Options_Init(self)
end
end

if (O.VersionNr == nil or O.VersionNr < SMARTBUFF_VERSIONNR) then
-- major version changes are backwards incompatible by definition, so trigger a RESET ALL
O.VersionNr = O.VersionNr or SMARTBUFF_VERSIONNR -- don't reset if O.VersionNr == nil
if O.VersionNr < SMARTBUFF_VERSIONNR then
O.VersionNr = SMARTBUFF_VERSIONNR;
StaticPopup_Show("SMARTBUFF_DATA_PURGE");
SMARTBUFF_SetBuffs();
InitBuffOrder(true);
SMARTBUFF_AddMsg("Upgraded SmartBuff to "..SMARTBUFF_VERSION);
end
SMARTBUFF_AddMsg("Upgraded SmartBuff to " .. SMARTBUFF_VERSION);

if (SMARTBUFF_OptionsGlobal == nil) then SMARTBUFF_OptionsGlobal = { }; end
OG = SMARTBUFF_OptionsGlobal;
Expand Down

0 comments on commit c8244a1

Please sign in to comment.