Download
(6Kb)
Download
Updated: 12-29-12 04:32 PM
Pictures
File Info
Updated:12-29-12 04:32 PM
Created:03-01-10 05:26 PM
Downloads:2,498
Favorites:47
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.
Post A Reply Comment Options
Unread 12-31-12, 06:05 PM  
natassja72
A Wyrmkin Dreamwalker

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

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

Forum posts: 106
File comments: 233
Uploads: 10
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.
Report comment to moderator  
Reply With Quote
Unread 04-30-11, 12:55 PM  
natassja72
A Wyrmkin Dreamwalker

Forum posts: 59
File comments: 73
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 03:08 PM.
Report comment to moderator  
Reply With Quote
Unread 02-11-11, 09:48 AM  
essmene
A Murloc Raider

Forum posts: 5
File comments: 30
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.
Report comment to moderator  
Reply With Quote
Unread 12-02-10, 12:48 PM  
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 02:04 PM.
Report comment to moderator  
Reply With Quote
Unread 03-26-10, 01:44 AM  
Byakko
A Fallenroot Satyr

Forum posts: 21
File comments: 36
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
Report comment to moderator  
Reply With Quote
Unread 03-16-10, 10:11 AM  
PatoDaia
A Defias Bandit

Forum posts: 2
File comments: 36
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.
Report comment to moderator  
Reply With Quote
Unread 03-14-10, 04:16 PM  
Tuhljin
A Flamescale Wyrmkin
 
Tuhljin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 106
File comments: 233
Uploads: 10
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.
Report comment to moderator  
Reply With Quote
Unread 03-09-10, 10:26 AM  
PatoDaia
A Defias Bandit

Forum posts: 2
File comments: 36
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 10:36 AM.
Report comment to moderator  
Reply With Quote
Unread 03-09-10, 06:22 AM  
karmamuscle
A Cobalt Mageweaver
 
karmamuscle's Avatar
AddOn Author - Click to view AddOns

Forum posts: 205
File comments: 173
Uploads: 1
I agree, very nice idea.
Report comment to moderator  
Reply With Quote
Unread 03-08-10, 11: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.
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.