Download
(6 Kb)
Download
Updated: 12-29-12 03:32 PM
Pictures
File Info
Compatibility:
Landfall (5.1)
Updated:12-29-12 03:32 PM
Created:03-01-10 04:26 PM
Downloads:1,650
Favorites:48
MD5:
Linkmate: Quests
Version: 0.4
by: Tuhljin [More]
Linkmate: Quests does two simple things:
  • Transform the name of quests in "Quest accepted" chat log messages into links to the newly accepted quests. (See the screenshot.)

  • Allow you to ctrl+click on quest links to open the quest log to that quest (if you are on it).

No configuration necessary. Just drop the LinkmateQuests folder into your AddOns folder!



Click here to lend your support!
Buy Tuhljin a snack so he'll feel guilty about not yet implementing that suggestion you made. Or maybe just to show your support. That works, too.
v0.4
- Updated for WoW patch 5.1.
- Fixed an issue where the quest accepted message would only show in one chat tab even if multiple tabs were set to display system messages.

v0.3
- TOC updated for WoW 4.0.x.

v0.2
- Now compatible with the addon QuestGuru.
- Fixed an issue where Ctrl+clicking on quest links didn't always open the quest log.

v0.1
- Initial release.
Archived Files (3)
File Name
Version
Size
Author
Date
0.3
6kB
Tuhljin
11-25-10 09:46 PM
0.2
6kB
Tuhljin
03-15-10 05:14 PM
0.1
5kB
Tuhljin
03-01-10 04:26 PM


Post A Reply Comment Options
Old 12-31-12, 05:05 PM  
natassja72
A Fallenroot Satyr

Forum posts: 28
File comments: 45
Uploads: 0
Thanks for the update. Works well with WiM too.

Happy new year
Last edited by natassja72 : 12-31-12 at 05:25 PM.
natassja72 is offline Report comment to moderator  
Reply With Quote
Old 12-29-12, 03:59 PM  
Tuhljin
A Flamescale Wyrmkin
 
Tuhljin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 101
File comments: 229
Uploads: 11
A much belated thanks to Valik. The latest version of the addon doesn't use your exact method, but they pointed me in a good direction so those problems shouldn't be an issue.
Tuhljin is offline Report comment to moderator  
Reply With Quote
Old 04-30-11, 12:55 PM  
natassja72
A Fallenroot Satyr

Forum posts: 28
File comments: 45
Uploads: 0
@Valik

Thanks alot for your code - it did solve the Wim incompatibility as well

Edit on 29 Nov. 2012 - in case anyone is wondering - this little addon plus Valik's modification works well still in MoP.
I truly recommend it.
Last edited by natassja72 : 11-29-12 at 02:08 PM.
natassja72 is offline Report comment to moderator  
Reply With Quote
Old 02-11-11, 08:48 AM  
essmene
A Murloc Raider

Forum posts: 4
File comments: 28
Uploads: 0
error with 4.06

while picking up the JC daily:

Code:
1x Interface\FrameXML\ChatFrame.lua:2776: bad argument #1 to 'strlen' (string expected, got nil):
Interface\FrameXML\ChatFrame.lua:2776: in function <Interface\FrameXML\ChatFrame.lua:2755>:
(tail call): ?:
(tail call): ?:
LinkmateQuests-0.3\core.lua:28: in function `func'
LinkmateQuests-0.3\TjQuestLog.lua:126: in function <LinkmateQuests\TjQuestLog.lua:113>

Locals:
self = ChatFrame1 {
 downButton = <unnamed> {}
 isInitialized = 1
 ScrollUp = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:87:
 tellTimer = 129019.787
 resizeBottomLeft = ChatFrame1ResizeBottomLeft {}
 background = ChatFrame1Background {}
 oldAlpha = 1.000000059139
 channelList = <table> {}
 ScrollToBottom = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:87:
 name = "General"
 ScrollToTop = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:87:
 AddMessage = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:100:
 messageTypeList = <table> {}
 checkedGMOTD = true
 flashTimer = 0
 PageUp = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:87:
 copyButton = <unnamed> {}
 defaultLanguage = "Orcish"
 PageDown = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:87:
 buttonFrame = ChatFrame1ButtonFrame {}
 ScrollDown = <function> @ Ace3\AceHook-3.0\AceHook-3.0.lua:87:
 0 = <userdata>
 resizeTopRight = ChatFrame1ResizeTopRight {}
 resizeTopLeft = ChatFrame1ResizeTopLeft {}
 resizeBottom = ChatFrame1ResizeBottom {}
 clickAnywhereButton = ChatFrame1ClickAnywhereButton {}
 isStaticDocked = true
 resizeTop = ChatFrame1ResizeTop {}
 editBox = ChatFrame1EditBox {}
 resizeLeft = ChatFrame1ResizeLeft {}
 isLocked = 1
 resizeBottomRight = ChatFrame1ResizeBottomRight {}
 buttonSide = "left"
 resizeButton = ChatFrame1ResizeButton {}
 zoneChannelList = <table> {}
 isDocked = 1
 resizeRight = ChatFrame1ResizeRight {}
}
event = "CHAT_MSG_SYSTEM"
arg1 = <table> {
}
arg2 = nil
arg3 = nil
arg4 = nil
arg5 = nil
arg6 = nil
arg7 = nil
arg8 = nil
arg9 = nil
arg10 = nil
arg11 = nil
arg12 = nil
arg13 = nil
arg14 = nil
arg15 = nil
type = "SYSTEM"
info = <table> {
 colorNameByClass = false
 flashTab = false
 b = 0
 r = 1.000000059139
 id = 1
 sticky = 0
 flashTabOnGeneral = false
 g = 1.000000059139
}
filter = false
coloredName = nil
chatFilters = <table> {
 CHAT_MSG_PARTY_LEADER = <table> {}
 CHAT_MSG_DND = <table> {}
 CHAT_MSG_LOOT = <table> {}
 CHAT_MSG_WHISPER_INFORM = <table> {}
 CHAT_MSG_SAY = <table> {}
 CHAT_MSG_CHANNEL = <table> {}
 CHAT_MSG_WHISPER = <table> {}
 CHAT_MSG_BN_WHISPER = <table> {}
 CHAT_MSG_PARTY = <table> {}
 CHAT_MSG_SYSTEM = <table> {}
 CHAT_MSG_RAID = <table> {}
 CHAT_MSG_OFFICER = <table> {}
 CHAT_MSG_BN_CONVERSATION = <table> {}
 CHAT_MSG_AFK = <table> {}
 CHAT_MSG_YELL = <table> {}
 CHAT_MSG_BATTLEGROUND_LEADER = <table> {}
 CHAT_MSG_RAID_WARNING = <table> {}
 CHAT_MSG_RAID_LEADER = <table> {}
 CHAT_MSG_GUILD = <table> {}
 CHAT_MSG_EMOTE = <table> {}
 CHAT_MSG_BN_WHISPER_INFORM = <table> {}
 CHAT_MSG_BN_INLINE_TOAST_ALERT = <table> {}
 CHAT_MSG_BATTLEGROUND = <table> {}
}

  ---
I hope the changes below will fix this.
essmene is offline Report comment to moderator  
Reply With Quote
Old 12-02-10, 11:48 AM  
Valik
A Defias Bandit

Forum posts: 2
File comments: 12
Uploads: 0
I'm not sure if you check here or Curse more so I'm posting this information in both locations.

I've found 2 bugs with Linkmate: Quests:
  1. If there are multiple chat frames set to show System Messages then only the last frame will display the message. This is because the filter function is called multiple times with each successive call overwriting the previous frame.
  2. Nothing is displayed when WIM is enabled. I tried to debug this and as best I could tell the message should be displayed but wasn't.

In either case, I've fixed the bugs with the following code. This is the entire contents of my core.lua file. The changes I've made are as follows:
  • Use frame:AddMessage() which seems to a work-around the WIM incompatibility.
  • Stores a table of frames so that when the message is displayed it can be displayed for each frame.
  • Removed the blockFilter code since it's not needed when calling frame:AddMessage().

The code:
Code:
--
--  Linkmate: Quests
--    by Tuhljin
--

local TjQuestLog = TjQuestLog


local ADDON_QUESTGURU = IsAddOnLoaded("QuestGuru")


-- REPLACE "QUEST ACCEPTED" CHAT
----------------------------------

local acceptedQuests

-- Takes a table of frames and prints
-- the data to each frame.
local function PrintQuest(frames, ...)
	for frame in pairs(frames) do
		frame:AddMessage(...)
	end
end

local function OnQuestLogChange()
	if (not acceptedQuests) then  return;  end
	local info = ChatTypeInfo["SYSTEM"]
	local log = TjQuestLog.GetDataTable(true)
	local frames
	for id,tab in pairs(log) do
		frames = acceptedQuests[tab.questTitle]
		if (frames) then
			local msg = GetQuestLink(tab.index)
			msg = ERR_QUEST_ACCEPTED_S:format(msg)
			PrintQuest(frames, msg, info.r, info.g, info.b, info.id)
			acceptedQuests[tab.questTitle] = nil
		end
	end
	TjQuestLog.ResetHeaderStates()
	for name, frames in pairs(acceptedQuests) do
	-- If a quest somehow wasn't found, print a bare "accepted" message:
		local msg = ERR_QUEST_ACCEPTED_S:format(name)
		PrintQuest(frames, msg, info.r, info.g, info.b, info.id)
	end
	acceptedQuests = nil
end
TjQuestLog.Register_OnChange(OnQuestLogChange)

local SearchQuestAccepted = gsub(ERR_QUEST_ACCEPTED_S, "%%s", "(.+)")  -- Get quest name from "Quest accepted: %s"

local function filter(self, event, arg1, ...)
	local _, _, name = strfind(arg1, SearchQuestAccepted);
	if (name) then
	-- The quest log is not updated at the time we receive this message so the message is filtered out for now:
		acceptedQuests = acceptedQuests or {}
		-- Push all frames this event occurs for onto a table.
		acceptedQuests[name] = acceptedQuests[name] or { }

		-- Previously the frame was pushed onto a table but
		-- it appears WIM calls the filter function twice which
		-- results in the same frame being pushed multiple time.
		-- Change code to store the frame as an index so WIM
		-- can screw around all it wants without causing duplicate
		-- messages.  The value of true is unused and can be anything.
		acceptedQuests[name][self] = true
		return true;
	end
end
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", filter)


-- HYPERLINK HOOK
-------------------

local orig_SetItemRef = SetItemRef
SetItemRef = function(link, text, button, ...)
	if (strsub(link, 1, 6) == "quest:") then
		if (IsControlKeyDown()) then
			local _, id = strsplit(":", link)
			id = tonumber(id)
			local q = TjQuestLog.GetDataTable(true)[id]
			if (q) then
				QuestLog_OpenToQuest(q.index)
				TjQuestLog.ResetHeaderStates()
				local i, isCollapsed = TjQuestLog.GetHeaderInfo(q.header)
				if (i and isCollapsed) then  ExpandQuestHeader(i);  end
				if (ADDON_QUESTGURU) then  QuestLogFrame:Show(); end
			else
				TjQuestLog.ResetHeaderStates()
			end
			return;
		end
	end
	return orig_SetItemRef(link, text, button, ...)
end
Edit: I updated the code to fix an issue where the message was displayed twice with WIM enabled. I suspect making WIM an optional dependency may have also served to fix the issue but I didn't test that, I just re-factored the code to eliminate the problem.
Last edited by Valik : 12-03-10 at 01:04 PM.
Valik is offline Report comment to moderator  
Reply With Quote
Old 03-26-10, 01:44 AM  
Byakko
A Deviate Faerie Dragon

Forum posts: 19
File comments: 45
Uploads: 0
Just what I needed, since I use Blitz to auto-accept alot of my dailies, but then must check up again which dailies they actually are. This works very well with it
Byakko is offline Report comment to moderator  
Reply With Quote
Old 03-16-10, 10:11 AM  
PatoDaia
A Defias Bandit

Forum posts: 2
File comments: 43
Uploads: 0
Now it works flawlessly Thanks a lot !

Originally posted by Tuhljin
I think I found a workaround for this. Expect an update in a day or two.

Update 3/15/10: Fixed with v0.2.
PatoDaia is offline Report comment to moderator  
Reply With Quote
Old 03-14-10, 04:16 PM  
Tuhljin
A Flamescale Wyrmkin
 
Tuhljin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 101
File comments: 229
Uploads: 11
Originally posted by PatoDaia
Update: Playing with the addons I've found the cause... If the addon QuestGuru is running, the quest log refuses to be opened when ctrl+click. With QuestGuru disabled, LinkMateQuests works fine.
I think I found a workaround for this. Expect an update in a day or two.

Update 3/15/10: Fixed with v0.2.
Last edited by Tuhljin : 03-15-10 at 05:16 PM.
Tuhljin is offline Report comment to moderator  
Reply With Quote
Old 03-09-10, 09:26 AM  
PatoDaia
A Defias Bandit

Forum posts: 2
File comments: 43
Uploads: 0
Very usefull indeed. But I am having a problem... the ctrl+click feature doesnt seems to work with esES language pack installed... nothing happens when I ctrl+click on a quest link.

Update: Playing with the addons I've found the cause... If the addon QuestGuru is running, the quest log refuses to be opened when ctrl+click. With QuestGuru disabled, LinkMateQuests works fine.

Anyway, thanks for the addon !
Last edited by PatoDaia : 03-09-10 at 09:36 AM.
PatoDaia is offline Report comment to moderator  
Reply With Quote
Old 03-09-10, 05:22 AM  
ckramme
Premium Member
 
ckramme's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 187
File comments: 168
Uploads: 1
I agree, very nice idea.
ckramme is online now Report comment to moderator  
Reply With Quote
Old 03-08-10, 10:13 AM  
High Five
A Kobold Labourer
 
High Five's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 30
Uploads: 2
Nice idea.
High Five is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.