Skip to content

Commit 452ee53

Browse files
committed
Show an error when WoW is using a different talent loadout export version than the addon
1 parent ad308a1 commit 452ee53

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

core.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ local ITEM_MOD_TYPE_DROP_LEVEL = 9
5050
local ITEM_MOD_TYPE_CRAFT_STATS_1 = 29
5151
local ITEM_MOD_TYPE_CRAFT_STATS_2 = 30
5252

53+
local SUPPORTED_LOADOUT_SERIALIZATION_VERSION = 1
54+
5355
local WeeklyRewards = _G.C_WeeklyRewards
5456

5557
-- New talents for Dragonflight
@@ -887,6 +889,20 @@ function Simulationcraft:GetSimcProfile(debugOutput, noBags, showMerchant, links
887889
elseif ClassTalents then
888890
-- DRAGONFLIGHT
889891
-- new dragonflight talents
892+
if Traits.GetLoadoutSerializationVersion() ~= SUPPORTED_LOADOUT_SERIALIZATION_VERSION then
893+
simcPrintError = 'This version of the SimC addon does not work with this version of WoW.\n'
894+
simcPrintError = simcPrintError .. 'There is a mismatch in the version of talent string exports.\n'
895+
simcPrintError = simcPrintError .. '\n'
896+
if Traits.GetLoadoutSerializationVersion() > SUPPORTED_LOADOUT_SERIALIZATION_VERSION then
897+
simcPrintError = simcPrintError .. 'WoW is using a newer version - you probably need to update your addon.\n'
898+
else
899+
simcPrintError = simcPrintError .. 'WoW is using an older version - you may be running an alpha/beta addon that is not currently ready for retail.\n'
900+
end
901+
simcPrintError = simcPrintError .. '\n'
902+
simcPrintError = simcPrintError .. 'WoW talent string export version = ' .. Traits.GetLoadoutSerializationVersion() .. '\n'
903+
simcPrintError = simcPrintError .. 'Addon talent string export version = ' .. SUPPORTED_LOADOUT_SERIALIZATION_VERSION .. '\n'
904+
end
905+
890906
local currentConfigId = ClassTalents.GetActiveConfigID()
891907

892908
simulationcraftProfile = simulationcraftProfile .. GetExportString(currentConfigId) .. '\n'

0 commit comments

Comments
 (0)