Skip to content

Commit

Permalink
Fix flyouts and mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Lardeck committed Feb 21, 2024
1 parent 3807aae commit c6429d5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ImprovedTalentLoadouts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1543,8 +1543,6 @@ function TalentLoadouts:UpdateActionBars(configInfo)
end
elseif actionType == "spell" then
id = FindBaseSpellByID(id)
elseif actionType == "flyout" then
id = self.flyouts[id]
end

actionBars[actionSlot] = {
Expand Down Expand Up @@ -1582,6 +1580,7 @@ function TalentLoadouts:LoadActionBar(actionBars, name)
if not success then return end

self:UpdateMacros()
self:UpdateKnownFlyouts()

if not next(data) then return end

Expand Down Expand Up @@ -1619,10 +1618,17 @@ function TalentLoadouts:LoadActionBar(actionBars, name)
end
elseif slotInfo.type == "summonmount" then
local _, spellID = C_MountJournal.GetMountInfoByID(slotInfo.id)
PickupSpell(spellID)
if spellID then
PickupSpell(spellID)
else
C_MountJournal.Pickup(0)
end
pickedUp = true
elseif slotInfo.type == "companion" then
PickupSpell(slotInfo.id)
pickedUp = true
elseif slotInfo.type == "flyout" then
PickupSpellBookItem(slotInfo.id, BOOKTYPE_SPELL)
PickupSpellBookItem(self.flyouts[slotInfo.id], BOOKTYPE_SPELL)
pickedUp = true
elseif slotInfo.type == "item" then
PickupItem(slotInfo.id)
Expand Down

0 comments on commit c6429d5

Please sign in to comment.