4
Fork 0

_00E_Theriantrophist_AlchemyControl: when we are out of slots, forget items player does not have

master
Eddoursul 2 years ago
parent 8a6ba329d9
commit 9e088bb673
  1. BIN
      scripts/_00e_theriantrophist_alchemycontrol.pex
  2. BIN
      scripts/_00e_theriantrophist_update_12.pex
  3. 22
      source/scripts/_00e_theriantrophist_alchemycontrol.psc
  4. 1
      source/scripts/_00e_theriantrophist_update_12.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

@ -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

Loading…
Cancel
Save