Correct cancelaura button to be by name instead of by id
This commit is contained in:
+3
-2
@@ -125,10 +125,11 @@ local function MakeMountButton(name, forceGround)
|
|||||||
self:SetAttribute("type1", "item")
|
self:SetAttribute("type1", "item")
|
||||||
self:SetAttribute("item1", mount.bag .. " " .. mount.slot)
|
self:SetAttribute("item1", mount.bag .. " " .. mount.slot)
|
||||||
elseif mount and type(mount) == "number" then
|
elseif mount and type(mount) == "number" then
|
||||||
if C_UnitAuras.GetPlayerAuraBySpellID(mount) then
|
local aura = C_UnitAuras.GetPlayerAuraBySpellID(mount)
|
||||||
|
if aura ~= nil then
|
||||||
self:SetAttribute("type1", "cancelaura")
|
self:SetAttribute("type1", "cancelaura")
|
||||||
self:SetAttribute("item1", nil)
|
self:SetAttribute("item1", nil)
|
||||||
self:SetAttribute("spell1", mount)
|
self:SetAttribute("spell1", aura["name"])
|
||||||
else
|
else
|
||||||
self:SetAttribute("type1", "spell")
|
self:SetAttribute("type1", "spell")
|
||||||
self:SetAttribute("item1", nil)
|
self:SetAttribute("item1", nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user