Skip to content

Commit

Permalink
feat(Equipment): Add Player:GetTrinketItems() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilraaz committed Jul 25, 2024
1 parent 3b58e7c commit 2f9f8e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions HeroLib/Class/Unit/Player/Equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ function Player:GetOnUseItems()
return UseableItems
end

-- Retrieve the current player's trinket items
function Player:GetTrinketItems()
local Equip = Player:GetEquipment()
local Trinket1 = Equip[13] and Item(Equip[13]) or Item(0)
local Trinket2 = Equip[14] and Item(Equip[14]) or Item(0)
return Trinket1, Trinket2
end

-- Save the current player's equipment.
function Player:UpdateEquipment()
wipe(Equipment)
Expand Down

0 comments on commit 2f9f8e5

Please sign in to comment.