Commit 8ce63cf6 authored by Robin Schoonover's avatar Robin Schoonover

Show Spell ID for mounts in mount collection.

parent 1d4b10ed
......@@ -37,21 +37,29 @@ end
do
local tmp = {}
function addon:TextAppendID(fs, ...)
local function textAppendID(self, fs, div, ...)
local line = self:IDLine(...)
local orig = fs:GetText()
if line == fs._alltheid and strfind(orig, line) then
if line == fs._alltheid and orig ~= nil and strfind(orig, line) then
return
end
wipe(tmp)
tinsert(tmp, orig)
tinsert(tmp, "\n")
tinsert(tmp, div)
tinsert(tmp, line)
fs:SetText(table.concat(tmp, ""))
fs._alltheid = line
end
function addon:TextAppendID(fs, ...)
textAppendID(self, fs, "\n", ...)
end
function addon:TextAppendID_NoNL(fs, ...)
textAppendID(self, fs, "", ...)
end
end
function addon:HookTipScript(handler, func)
......
......@@ -32,6 +32,21 @@ function event_frame:ADDON_LOADED(addon_name)
end
event_frame:RegisterEvent("ADDON_LOADED")
--
-- Mount Collection
--
OnAddOnLoaded("Blizzard_Collections", function()
hooksecurefunc("MountJournal_UpdateMountDisplay", function()
MountJournal.MountDisplay.InfoButton.Lore:SetText(descriptionText)
local spellID = MountJournal.MountDisplay.lastDisplayed
if spellID then
addon:TextAppendID_NoNL(MountJournal.MountDisplay.InfoButton.Lore, "Spell", spellID)
end
end)
end)
--
-- PetJournal
--
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment