diff --git a/scripts/_00e_theriantrophist_update_12.pex b/scripts/_00e_theriantrophist_update_12.pex index 5d1650a6..9ff7a184 100644 Binary files a/scripts/_00e_theriantrophist_update_12.pex and b/scripts/_00e_theriantrophist_update_12.pex differ diff --git a/source/scripts/_00e_theriantrophist_update_12.psc b/source/scripts/_00e_theriantrophist_update_12.psc index 49c8588c..1c78dd40 100644 --- a/source/scripts/_00e_theriantrophist_update_12.psc +++ b/source/scripts/_00e_theriantrophist_update_12.psc @@ -1,19 +1,26 @@ scriptname _00E_Theriantrophist_Update_12 Hidden +{Moved to a separate script to remove the JContainers dependency from _00E_Theriantrophist_AlchemyControl} function Run(_00E_Theriantrophist_AlchemyControl PlayerAlias) global - Potion k - int potionNames = JMap.getObj(JDB.root(), "EnderalFS.RenamedPotions") - int potionModels = JMap.getObj(JDB.root(), "EnderalFS.ModelChangedPotions") - - if potionNames > 0 - k = JFormMap.nextKey(potionNames, previousKey = None, endKey = None) as Potion - while k != None - PlayerAlias._addNamedPotion(k, JFormMap.getStr(potionNames, k), JFormMap.getStr(potionModels, k)) - k = JFormMap.nextKey(potionNames, k, endKey = None) as Potion - endwhile - JFormMap.clear(potionNames) - JFormMap.clear(potionModels) + Int SKSEVer = SKSE.GetVersion() + + if SKSEVer >= 2 && (SKSE.GetPluginVersion("JContainers64") > 0 || SKSE.GetPluginVersion("JContainersVR") > 0) + + Potion k + int potionNames = JMap.getObj(JDB.root(), "EnderalFS.RenamedPotions") + int potionModels = JMap.getObj(JDB.root(), "EnderalFS.ModelChangedPotions") + + if potionNames > 0 + k = JFormMap.nextKey(potionNames, previousKey = None, endKey = None) as Potion + while k != None + PlayerAlias._addNamedPotion(k, JFormMap.getStr(potionNames, k), JFormMap.getStr(potionModels, k)) + k = JFormMap.nextKey(potionNames, k, endKey = None) as Potion + endwhile + JFormMap.clear(potionNames) + JFormMap.clear(potionModels) + endif + endif endfunction