Skip to content

Commit

Permalink
feat(Equipment): Return SpellID and IsUsable in GetTrinketData
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilraaz committed Sep 24, 2024
1 parent 8b866a4 commit 69008e4
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 @@ -225,15 +225,21 @@ function Player:GetTrinketData()
local Trinket2 = Equip[14] and Item(Equip[14]) or Item(0)
local Trinket1Spell = Trinket1:OnUseSpell()
local Trinket2Spell = Trinket2:OnUseSpell()
local Trinket1SpellID = Trinket1Spell and Trinket1Spell:ID() or 0
local Trinket2SpellID = Trinket2Spell and Trinket2Spell:ID() or 0
local Trinket1Range = (Trinket1Spell and Trinket1Spell.MaximumRange > 0 and Trinket1Spell.MaximumRange <= 100) and Trinket1Spell.MaximumRange or 100
local Trinket2Range = (Trinket2Spell and Trinket2Spell.MaximumRange > 0 and Trinket2Spell.MaximumRange <= 100) and Trinket2Spell.MaximumRange or 100
local Trinket1CastTime = Trinket1Spell and Trinket1Spell:CastTime() or 0
local Trinket2CastTime = Trinket2Spell and Trinket2Spell:CastTime() or 0
local Trinket1Usable = Trinket1:IsUsable()
local Trinket2Usable = Trinket2:IsUsable()
local T1 = {
Object = Trinket1,
ID = Trinket1:ID(),
Spell = Trinket1Spell,
SpellID = Trinket1SpellID,
Range = Trinket1Range,
Usable = Trinket1Usable,
CastTime = Trinket1CastTime,
Cooldown = Trinket1:Cooldown(),
Blacklisted = Player:IsItemBlacklisted(Trinket1)
Expand All @@ -242,7 +248,9 @@ function Player:GetTrinketData()
Object = Trinket2,
ID = Trinket2:ID(),
Spell = Trinket2Spell,
SpellID = Trinket2SpellID,
Range = Trinket2Range,
Usable = Trinket2Usable,
CastTime = Trinket2CastTime,
Cooldown = Trinket2:Cooldown(),
Blacklisted = Player:IsItemBlacklisted(Trinket2)
Expand Down

0 comments on commit 69008e4

Please sign in to comment.