Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit f4d3d5b

Browse files
committed
Fix for drag and drop mounts
1 parent cef955f commit f4d3d5b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Objects/ACTIONBUTTON_DragAndDrop.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,16 @@ end
363363

364364
function ACTIONBUTTON:PlaceMount(action1, action2)
365365
local mountName, mountSpellID, mountIcon = C_MountJournal.GetMountInfoByID(action1)
366+
local mountSpell
366367

367368
if action1 == 0 then
368369
return
370+
else
371+
if not mountSpellID or mountSpellID == 0 then
372+
return
373+
else
374+
mountSpell = GetSpellInfo(mountSpellID)
375+
end
369376
end
370377

371378
--The Summon Random Mount from the Mount Journal
@@ -374,7 +381,8 @@ function ACTIONBUTTON:PlaceMount(action1, action2)
374381
self.data.macro_Icon = "Interface\\ICONS\\ACHIEVEMENT_GUILDPERK_MOUNTUP"
375382
self.data.macro_Name = "Random Mount"
376383
else
377-
self.data.macro_Text = "#autowrite\n/cast "..mountName..";"
384+
--self.data.macro_Text = "#autowrite\n/cast "..mountName..";"
385+
self.data.macro_Text = self:AutoWriteMacro(mountSpell)
378386
self.data.macro_Icon = false --will pull icon automatically unless explicitly overridden
379387
self.data.macro_Name = mountName
380388
end
@@ -508,4 +516,4 @@ function ACTIONBUTTON:SetMouseCursor()
508516

509517
--failsafe so there is 'something' on the mouse cursor
510518
PickupItem(1217) --questionmark symbol
511-
end
519+
end

0 commit comments

Comments
 (0)