Thread Tools Display Modes
08-08-16, 05:57 AM   #1
melicon
A Deviate Faerie Dragon
 
melicon's Avatar
Join Date: Jul 2016
Posts: 10
Adding text to default tooltip

Good morning.

I was wondering if it would be possible to add the text (rare) to the default tooltip.

Perhaps adding classcolors to names to....but I am maily concerned with rare mobs.
  Reply With Quote
08-08-16, 06:36 AM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
http://wow.gamepedia.com/API_GameTooltip_AddLine
Code:
if UnitClassification("mouseover") == "rare" then
    GameTooltip:AddLine("Rare")
end

if UnitIsPlayer("mouseover") then
    local className, class = UnitClass("mouseover")
    local colour = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS[class])
    GameTooltip:AddLine(className, colour.r, colour.g, colour.b)
end
  Reply With Quote
08-08-16, 06:57 AM   #3
melicon
A Deviate Faerie Dragon
 
melicon's Avatar
Join Date: Jul 2016
Posts: 10
Thank you got it working

Last edited by melicon : 08-08-16 at 07:22 AM.
  Reply With Quote
08-08-16, 07:27 AM   #4
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Good! If you added or changed something, post your code so others can see the working result.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Adding text to default tooltip

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off