diff --git a/scripts/_00e_theriantrophist_alchemycontrol.pex b/scripts/_00e_theriantrophist_alchemycontrol.pex index 6b9f8168..802bfe51 100644 Binary files a/scripts/_00e_theriantrophist_alchemycontrol.pex and b/scripts/_00e_theriantrophist_alchemycontrol.pex differ diff --git a/scripts/_00e_theriantrophist_update_12.pex b/scripts/_00e_theriantrophist_update_12.pex index 9ff7a184..f3a58ecc 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_alchemycontrol.psc b/source/scripts/_00e_theriantrophist_alchemycontrol.psc index 4e310827..1060f96a 100644 --- a/source/scripts/_00e_theriantrophist_alchemycontrol.psc +++ b/source/scripts/_00e_theriantrophist_alchemycontrol.psc @@ -110,16 +110,28 @@ function _addNamedPotion(Potion aPotion, string sName, string sModel) int i = aCreatedPotions.Find(aPotion) - if i == -1 + if i >= 0 + aPotionNames[i] = sName + aPotionModels[i] = sModel + else i = aCreatedPotions.Find(none) - if i > -1 + if i >= 0 aCreatedPotions[i] = aPotion aPotionNames[i] = sName aPotionModels[i] = sModel + else + ; No more slots left, let's forget what we do not have in our inventory + int n = 0 + while n < 128 + if PlayerREF.GetItemCount(aCreatedPotions[n]) == 0 + aCreatedPotions[n] = aPotion + aPotionNames[n] = sName + aPotionModels[n] = sModel + return + endif + n += 1 + endwhile endif - else - aPotionNames[i] = sName - aPotionModels[i] = sModel endif endfunction diff --git a/source/scripts/_00e_theriantrophist_update_12.psc b/source/scripts/_00e_theriantrophist_update_12.psc index 1c78dd40..0e7d31fb 100644 --- a/source/scripts/_00e_theriantrophist_update_12.psc +++ b/source/scripts/_00e_theriantrophist_update_12.psc @@ -1,5 +1,4 @@ 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