From 73ca211b9e5d5c613bfad59675c6980f4f055b42 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sun, 5 Sep 2021 16:26:15 +0200 Subject: [PATCH] Add a warning to existing users --- BetterWorldQuests.toc | 2 ++ migrate.lua | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 migrate.lua diff --git a/BetterWorldQuests.toc b/BetterWorldQuests.toc index 4bd0e8c..cc51aed 100644 --- a/BetterWorldQuests.toc +++ b/BetterWorldQuests.toc @@ -4,6 +4,7 @@ ## Title: Better World Quests ## Notes: Improves the World Quest POIs on the map ## OptionalDeps: LibStub, CallbackHandler-1.0, HereBeDragons +## SavedVariables: BetterWorldQuestsMigrate ## X-Curse-Project-ID: 302035 ## X-WoWI-ID: 24797 @@ -27,3 +28,4 @@ Argus/Title.lua Argus/Vindicaar.lua Argus/WorldFlightMap.lua +migrate.lua diff --git a/migrate.lua b/migrate.lua new file mode 100644 index 0000000..b683155 --- /dev/null +++ b/migrate.lua @@ -0,0 +1,21 @@ +local name = ... + +local Handler = CreateFrame('Frame') +Handler:RegisterEvent('ADDON_LOADED') +Handler:SetScript('OnEvent', function(_, _, addon) + if addon ~= name then + return + end + + if BetterWorldQuestsMigrate then + return + else + BetterWorldQuestsMigrate = true + end + + print('|cff90ffffBetterWorldQuests|r no longer has helpers for quests.') + print('Please see the addon named "Quest Automation" on CurseForge/WoWInterface.') + print('This message will not be shown again.') + + Handler:UnregisterEvent('ADDON_LOADED') +end)