From 9e66194a2e9c5395cb1f02be43f6d0b3d40864ae Mon Sep 17 00:00:00 2001 From: Cilraaz Date: Tue, 3 Sep 2024 09:21:28 -0400 Subject: [PATCH] feat(Equipment): Add Player:GladiatorsBadgeIsEquipped function --- HeroLib/Class/Unit/Player/Equipment.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/HeroLib/Class/Unit/Player/Equipment.lua b/HeroLib/Class/Unit/Player/Equipment.lua index 6e01ef8a..e7e0db1f 100755 --- a/HeroLib/Class/Unit/Player/Equipment.lua +++ b/HeroLib/Class/Unit/Player/Equipment.lua @@ -183,6 +183,16 @@ local TierSets = { }, } +local GladiatorBadges = { + -- DF Badges + 201807, -- Crimson + 205708, -- Obsidian + 209343, -- Verdant + 216279, -- Draconic + -- TWW Badges + 218713, -- Forged +} + -- Usable items that may not become active until an event or threshold. -- Adding an item to this list forces it into the UseableItems table. local UsableItemOverride = { @@ -507,3 +517,14 @@ function Player:HasTier(Tier, Pieces) return Cache.Persistent.TierSets[Tier][Pieces.."pc"] end end + +-- Check if a Gladiator's Badge is equipped +function Player:GladiatorsBadgeIsEquipped() + local Trinket1, Trinket2 = Player:GetTrinketItems() + for _, v in pairs(GladiatorBadges) do + if Trinket1:ID() == v or Trinket2:ID() == v then + return true + end + end + return false +end