_00E_Theriantrophist_AlchemyControl: when we are out of slots, forget items player does not have
This commit is contained in:
parent
8a6ba329d9
commit
9e088bb673
Binary file not shown.
Binary file not shown.
@ -110,16 +110,28 @@ function _addNamedPotion(Potion aPotion, string sName, string sModel)
|
|||||||
|
|
||||||
int i = aCreatedPotions.Find(aPotion)
|
int i = aCreatedPotions.Find(aPotion)
|
||||||
|
|
||||||
if i == -1
|
if i >= 0
|
||||||
|
aPotionNames[i] = sName
|
||||||
|
aPotionModels[i] = sModel
|
||||||
|
else
|
||||||
i = aCreatedPotions.Find(none)
|
i = aCreatedPotions.Find(none)
|
||||||
if i > -1
|
if i >= 0
|
||||||
aCreatedPotions[i] = aPotion
|
aCreatedPotions[i] = aPotion
|
||||||
aPotionNames[i] = sName
|
aPotionNames[i] = sName
|
||||||
aPotionModels[i] = sModel
|
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
|
endif
|
||||||
else
|
|
||||||
aPotionNames[i] = sName
|
|
||||||
aPotionModels[i] = sModel
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
scriptname _00E_Theriantrophist_Update_12 Hidden
|
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
|
function Run(_00E_Theriantrophist_AlchemyControl PlayerAlias) global
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user