View Single Post
01-16-15, 08:59 AM   #18
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Ok it works now for normal tooltips but gives error with Gnosis when trying too mouseover PetLinks,
When I disable Gnosis it gives error with BadBoy etc ...

So disabeling all AddOns give this error:
Code:
4x FrameXML\ItemRef.lua:252: ItemRefTooltip:SetHyperlink(): Unknown link type
[C]: in function `SetHyperlink'
FrameXML\ItemRef.lua:252: in function <FrameXML\ItemRef.lua:1>
...aceBlizzard_CombatLog\Blizzard_CombatLog.lua:3593: in function `SetItemRef'
LinkHover\LinkHover-1.4.lua:29: in function <LinkHover\LinkHover.lua:21>

Locals:
link = "|cff0070dd|Hbattlepet:183:25:3:1481:276:276:BattlePet-0-000003F5E154|h[Astraler Seelenhändler]|h|r"
text = nil
button = "LeftButton"
chatFrame = ChatFrame1 {
 0 = <userdata>
 isUninteractable = false
 flashTimer = 0
 isInitialized = 1
 mouseOutTime = 0
 tellTimer = 9420.223
 resizeButton = ChatFrame1ResizeButton {
 }
 buttonFrame = ChatFrame1ButtonFrame {
 }
 oldAlpha = 0
 channelList = <table> {
 }
 hasBeenFaded = true
 clickAnywhereButton = ChatFrame1ClickAnywhereButton {
 }
 isDocked = 1
 mouseInTime = 0
 editBox = ChatFrame1EditBox {
 }
 checkedGMOTD = true
 isLocked = true
 name = "All"
 buttonSide = "left"
 isStaticDocked = true
 zoneChannelList = <table> {
 }
 defaultLanguage = "Orcisch"
 messageTypeList = <table> {
 }
}
Code right now:
Lua Code:
  1. local showLinkType = {
  2.         -- Normal tooltip things:
  3.         achievement  = true,
  4.         enchant      = true,
  5.         glyph        = true,
  6.         item         = true,
  7.         instancelock = true,
  8.         quest        = true,
  9.         spell        = true,
  10.         talent       = true,
  11.         unit         = true,
  12.         currency       = true,
  13.         -- Special tooltip things:
  14.         battlepet           = false,
  15.         battlePetAbil       = false,
  16.         garrfollowerability = false,
  17.         garrfollower        = false,
  18.         garrmission         = false,
  19.     }
  20.      
  21.     local function OnHyperlinkEnter(frame, linkData, link)
  22.         local normal = showLinkType[linkData:match("^(.-):")]
  23.         if normal == true then
  24.             GameTooltip:SetOwner(ChatFrame1Tab, "ANCHOR_TOPLEFT", 30, 20)
  25.             GameTooltip:SetHyperlink(link)
  26.             GameTooltip:Show()
  27.         elseif normal == false then
  28.             -- Uses a special tooltip, just let the default function handle it.
  29.             SetItemRef(link, text, "LeftButton", frame)
  30.         end
  31.     end
  32.  
  33.     local function OnHyperlinkLeave(frame, linkData, link)
  34.         local normal = showLinkType[linkData:match("^(.-):")]
  35.         if normal == true then
  36.             GameTooltip:Hide()
  37.         elseif normal == false then
  38.             -- Uses a special tooltip, just let the default function handle it.
  39.             SetItemRef(link, text, "LeftButton", frame)
  40.         end
  41.     end
  42.      
  43.     local function RegisterFrame(frame)
  44.         frame:SetScript("OnHyperlinkEnter", OnHyperlinkEnter)
  45.         frame:SetScript("OnHyperlinkLeave", OnHyperlinkLeave)
  46.     end
  47.      
  48.     local f = CreateFrame("Frame")
  49.     f:RegisterEvent("PLAYER_LOGIN")
  50.     f:SetScript("OnEvent", function(self, event, name)
  51.         if event == "PLAYER_LOGIN" then
  52.             for i = 1, NUM_CHAT_WINDOWS do
  53.                 RegisterFrame(_G["ChatFrame"..i])
  54.             end
  55.         end
  56.         if GuildBankMessageFrame then
  57.             RegisterFrame(GuildBankMessageFrame)
  58.             self:UnregisterAllEvents()
  59.             self:SetScript("OnEvent", nil)
  60.             RegisterFrame = nil
  61.         else
  62.             self:RegisterEvent("ADDON_LOADED")
  63.         end
  64.     end)
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 01-16-15 at 09:01 AM.
  Reply With Quote