View Single Post
02-22-15, 09:46 PM   #2
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
This script eliminate the use of #showtooltip:
Lua Code:
  1. hooksecurefunc(GameTooltip,"SetAction",function(self,action)
  2.     local action_type,macro_id = GetActionInfo(action)
  3.     if action_type=="macro" then
  4.         local _,_,spell_id = GetMacroSpell(macro_id)
  5.         if spell_id then
  6.             GameTooltip:SetSpellByID(spell_id)
  7.         else
  8.             local _,link = GetMacroItem(macro_id)
  9.             if link then
  10.                 local item_id = tonumber(link:match("item:(%d+)"))
  11.                 GameTooltip:SetItemByID(item_id)
  12.             end
  13.         end
  14.         GameTooltip:Show()
  15.     end
  16. end)
So a macro like:
Code:
#showtooltip
/cast [@focus,harm][]Wind Shear
becomes

Code:
/cast [@focus,harm][]Wind Shear
but if you have something like this

Code:
#showtooltip Hex
/cast Nature's Swiftness
/cast Hex
you will not get benefit from it, you will still need to use the whole line.
  Reply With Quote