Skip to content

Commit

Permalink
feat(Equipment): Add Player:GladiatorsBadgeIsEquipped function
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilraaz committed Sep 3, 2024
1 parent 310f881 commit 9e66194
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions HeroLib/Class/Unit/Player/Equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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

0 comments on commit 9e66194

Please sign in to comment.