• 0

    posted a message on Detect if item is heroic
    local tooltip
    local function create()
        local tip, leftside = CreateFrame("GameTooltip"), {}
        for i = 1, 2 do
            local L,R = tip:CreateFontString(), tip:CreateFontString()
            leftside[i] = L
        tip.leftside = leftside
        return tip
    local function is_heroic_item(item)   -- returns boolean
        tooltip = tooltip or create()
        local t = tooltip.leftside[2]:GetText()
        return (t == ITEM_HEROIC)

    Works great, thank you.
    Posted in: AddOn HELP!
  • 0

    posted a message on Detect if item is heroic
    Is there any way to detect if an item is heroic? My current solution is to check the ilvl, but once the next tier becomes avail this will no longer work. I could make a DB for items, but that seems to large of a solution for such a small scale project that I am working on.
    Posted in: AddOn HELP!
  • 0

    posted a message on What editor do you use?
    I was wondering what editor everyone uses for programming.

    I currently use notepad++, it has basic highlighting and that's about it.

    I've tried a bunch of the ones listed on the wowwiki page but quite frankly I can't find one that has all the features I want, most specifically code formatting. I thought the one for visual studio would have this as the regular visual studio plug-ins all have code formatting but was disappointed when they didn't.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.