Added feature to display preview results when having the Spindown Dice equipped

This commit is contained in:
Wofsauge committed 2021-04-18 18:50:56 +02:00
1 parent 82a01fcda7
commit 51b22b38b4
6 files changed
+57 -1

No files matched your search

+20
View File
@@ -403,6 +403,26 @@ local function onRender(t)
descriptionObj.Description = "{{CustomTransformation}} {{ColorGray}}"..playerName.."{{CR}}#"..birthrightDesc[3]
end
end
-- Handle Spindown Dice description addition
if player:GetActiveItem() == 723 then
descriptionObj.Description = descriptionObj.Description.."#{{Collectible723}} :"
local results = {}
local refID = closest.SubType
for i = 1,3 do
local spinnedID = EID:getSpindownResult(refID)
refID = spinnedID
if spinnedID > 0 then
descriptionObj.Description = descriptionObj.Description.."{{Collectible"..spinnedID.."}}"
if i ~=3 then
descriptionObj.Description = descriptionObj.Description.." ->"
end
else
local errorMsg = EID.descriptions[EID.Config["Language"]]["spindownError"] or EID.descriptions["en_us"]["spindownError"] or nil
descriptionObj.Description = descriptionObj.Description..errorMsg
break
end
end
end
EID:printDescription(descriptionObj)
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
--Handle Cards & Runes