diff --git a/features/eid_itemprediction.lua b/features/eid_itemprediction.lua index 14929e6e..181885cb 100644 --- a/features/eid_itemprediction.lua +++ b/features/eid_itemprediction.lua @@ -408,7 +408,6 @@ function EID:GlyphOfBalancePrediction(player) fullID = "5.10.3" end - --todo: in REPENTOGON, replace this whole function (in the eid_repentogon lua style) local pickupNames = EID:getDescriptionEntry("PickupNames") or {} return pickupNames[fullID] or EID:GetEntityXMLNameByString(fullID) or fullID end diff --git a/features/eid_repentogon.lua b/features/eid_repentogon.lua index 225ad694..25501139 100644 --- a/features/eid_repentogon.lua +++ b/features/eid_repentogon.lua @@ -229,3 +229,20 @@ local function RepentogonModifierConditions(descObj) return false end EID:addDescriptionModifier("EID Repentogon", RepentogonModifierConditions, nil) + +--------------------- Predictions --------------------- + +-- Glyph of Balance -- +-- Override existing function with one that uses Repentogon features +function EID:GlyphOfBalancePrediction(player) + local dropIDTable = player:GetGlyphOfBalanceDrop(Variant, SubType) + + -- build item string based on return value. Only add SubType, if its not equal 0 + local fullID = "5.0" + if dropIDTable[1] ~= -1 then + fullID = "5." .. dropIDTable[1] .. (dropIDTable[2] ~= 0 and ("." .. dropIDTable[2]) or "") + end + local pickupNames = EID:getDescriptionEntry("PickupNames") or {} + return pickupNames[fullID] or EID:GetEntityXMLNameByString(fullID) or fullID +end +