View Single Post
01-01-15, 10:31 AM   #4
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
so I figured it out (kinda on my own :P)

in Phanx's original code the linkType the T was no capitalized in the function code so it was not finding the table.
Code:
		local linktypes = {
			-- These use GameTooltip:
			achievement    = true,
			enchant        = true,
			glyph          = true,
			item           = true,
			instancelock   = true,
			quest          = true,
			spell          = true,
			talent         = true,
			unit           = true,
			-- This uses FloatingBattlePetTooltip:
			battlepet      = true,
			-- This uses FloatingPetBattleAbilityTooltip:
			battlePetAbil = true,
			-- This uses FloatingGarrisonFollowerTooltip:
			garrfollower  = true,
			-- This uses FloatingGarrisonFollowerAbilityTooltip:
			garrfollowerability = true,
			-- This uses FloatingGarrisonMissionTooltip:
			garrmission   = true,
		}

		local function OnHyperlinkEnter(frame, link, text)
			local linkType = strsplit(":", link)
			if linktypes[linkType] and not IsModifiedClick() then
				ChatFrame_OnHyperlinkShow(frame, link, text, "LeftButton")
			end
		end	
		
		local function OnHyperlinkLeave(frame, link, text)
			local linkType = strsplit(":", link)
			if linktypes[linkType] and not IsModifiedClick() then
				ChatFrame_OnHyperlinkShow(frame, link, text, "LeftButton")
			end
		end		
		
		local function ModChat(self)
			local chat = _G[self]


			chat:HookScript('OnHyperlinkEnter', OnHyperlinkEnter)
			chat:HookScript('OnHyperlinkLeave', OnHyperlinkLeave)
               end
Now mouse over shows and hides.

Coke

Last edited by cokedrivers : 01-01-15 at 10:43 AM.
  Reply With Quote