Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mod:GetActionName(button)
- local action;
- if ( type(button) == "number" ) then
- action = button;
- else
- action = button.action;
- end
- if ( not action ) then
- return false;
- end
- local type, id = GetActionInfo(action);
- if ( (type == "spell" or type == "macro") and id ~= 0 ) then
- local spellName;
- if ( type == "spell" ) then
- spellName = GetSpellInfo(id);
- elseif ( type == "macro" ) then
- spellName = GetMacroSpell(id);
- end
- if ( spellName ) then
- return spellName;
- end
- end
- return false;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement