Fix crash on TMTRAINER + spindown dice
This commit is contained in:
1 parent
1a514cd6e4
commit
128a6a6214
1 file changed
+3
-1
+3
-1
@@ -756,10 +756,12 @@ end
|
|||||||
-- Converts a given CollectibleID into the respective Spindown dice result
|
-- Converts a given CollectibleID into the respective Spindown dice result
|
||||||
function EID:getSpindownResult(collectibleID)
|
function EID:getSpindownResult(collectibleID)
|
||||||
local newID = collectibleID
|
local newID = collectibleID
|
||||||
|
local attempts = 0
|
||||||
repeat
|
repeat
|
||||||
newID = newID - 1
|
newID = newID - 1
|
||||||
|
attempts = attempts + 1
|
||||||
--note: the order of the SkipLocked check statement is important so that the item is checked for being in a pool either way (to display a ? if it isn't)
|
--note: the order of the SkipLocked check statement is important so that the item is checked for being in a pool either way (to display a ? if it isn't)
|
||||||
until (EID.itemConfig:GetCollectible(newID) and (EID:isCollectibleUnlockedAnyPool(newID) or not EID.Config["SpindownDiceSkipLocked"]) and not EID.itemConfig:GetCollectible(newID).Hidden) or newID == CollectibleType.COLLECTIBLE_NULL
|
until (EID.itemConfig:GetCollectible(newID) and (EID:isCollectibleUnlockedAnyPool(newID) or not EID.Config["SpindownDiceSkipLocked"]) and not EID.itemConfig:GetCollectible(newID).Hidden) or newID == CollectibleType.COLLECTIBLE_NULL or attempts > 10
|
||||||
return newID
|
return newID
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user