Moved 'ItemPoolType' data to 'descriptionObj' (#834)

* remove last item pool function (for now)

* moved item pool data to DescriptionObj

+ restored last item pool function
This commit is contained in:
리셰 authored and GitHub committed 2025-05-01 18:35:31 +02:00
1 parent ea0c9b0209
commit b8523ed630
2 files changed
+22 -4

No files matched your search

+18
View File
@@ -654,6 +654,7 @@ function EID:getDescriptionObj(Type, Variant, SubType, entity, checkModifiers)
description.ModName = tableEntry and tableEntry[4]
description.Quality = EID:getObjectQuality(description)
description.Icon = EID:getObjectIcon(description)
description.ItemPoolType = EID:getObjectItemPool(description)
EID:getObjectItemTypeAndCharge(description)
EID.DifferentEffectPlayers = {}
@@ -2618,6 +2619,23 @@ function EID:getObjectQuality(descObj)
end
end
---Returns the item pool of the described entity
---@param descObj EID_DescObj
---@return integer?
function EID:getObjectItemPool(descObj)
local subType = tonumber(descObj.ObjSubType) ---@cast subType number
if EID.isRepentance and descObj.ObjType == 5 and descObj.ObjVariant == 100 then
if EID.isRepentancePlus then
-- TODO (maybe will require REPENTOGON?)
-- Since D4 exploit is completely fixed in 1.9.7.11, this is no longer viable for full-reroll effect
-- (still useful for initial item pool from rooms though)
return game:GetItemPool():GetLastPool() -- remove this if item pool function should not appear on 1.9.7.11 patch
else
return game:GetItemPool():GetLastPool()
end
end
end
EID.ObjectIcon = {}
---Returns the Inline Icon definition object for a given object.
---@param descObj EID_DescObj