View Single Post
03-21-14, 08:19 PM   #10
Tactica
Not Amused
 
Tactica's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 96
Excellent! Now this is all great, but what about putting GetSpellLink in the message? What would I modify as this currently uses
Code:
.. TRADESKILL_LOG_THIRDPERSON ..
My previous version used the following for a link in the message:
Code:
..sourceName .. " has created " .. GetSpellLink(spellID)..
I attempted some changes with the following but it gives me an error on line 66 which is:
Code:
Addon:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
The attempted changed to announce the conjured item as a clickable link:
Code:
 function Addon:COMBAT_LOG_EVENT_UNFILTERED(_, combatEvent, _, sourceGUID, sourceName, GetSpellLink, GetSpellLink, sourceFlags, _, destGUID, destName, destFlags, _, spellID, spellName)
        if not announceEvents[combatEvent] or not announceSpells[spellID] or bit.band(sourceGUID, FILTER_GROUP) == 0 then return end
       
        -- use this for cauldrons, they show up only for SPELL_CAST_START and have null for destName
        if not destName then
            destName = spellName
        end
       
        local message = format(MESSAGE_TEMPLATE, sourceName, GetSpellLink(spellID))
       
        local now = GetTime()
        local lastTime = lastAnnounced[message]
        if lastTime and now - lastTime < 10 then
            return
        end

Last edited by Tactica : 03-21-14 at 08:49 PM.
  Reply With Quote