CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Getting the spell affected by a glyph?
    What I would suggest, and, in fact, I build a few mock-ups and nearly had a working prototype of, was to use a layout similar to the one in the armory to display glyph, instead of the current UI. A vertical list of glyph names, ordered by type and then name. I have attached one of my mock-up, to give you a better idea.

    This would have been part of Talented, or as a "plugin" to Talented. I will probably not implement it before Cataclysm, though, as most requests were not related to the display of glyphs, but other stuff which I didn't want to do (maintaining a database of glyphs was one of them).

    Blizzard has talked quite a bit about modifying the glyph UI, and I'm planning to make another try then to provide a "Talented"-like approach to glyphs, with glyph templates. I'll probably try to display glyph in a layout similar to that mockup then.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Obvious misuse of string.gsub is not obvious
    It certainly comes from there: http://lua-users.org/wiki/StringReplace
    Posted in: Lua Code Discussion
  • 0

    posted a message on ChatFrame.lua arg13 missing in 3.3.5
    This is indeed a bug in ChatFrame.lua. Setting the "arg13" global looks to me like a valid workaround until Blizzard fixes this error.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Obvious misuse of string.gsub is not obvious
    blob contains specials chars ("[" and "]") that break gsub() functionnality.
    Use replace() instead.
    Posted in: Lua Code Discussion
  • 0

    posted a message on [Grid2] Expanding/Shrinking debuff list indicator
    I'm still using a 32x32 pixels size for Grid2 Unit Frames. I'm not considering anything that would require to expand on that size.
    Posted in: Grid & Grid2
  • 0

    posted a message on LFG Tooltip expanding to the right?
    Sorry, the first line should be:
    LFDSearchStatus:ClearAllPoints()


    Then, it works for me.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LFG Tooltip expanding to the right?
    Add this to RightLFG.lua:
    LFDSearchStatus:ClearAllPoints
    LFDSearchStatus:SetPoint("TOPLEFT", MiniMapLFGFrame, "TOPRIGHT", 0, 0)
    Posted in: Lua Code Discussion
  • 0

    posted a message on LFG Tooltip expanding to the right?
    You need to create a small addon and add the code I gave you in it.

    • Create a new directory in your <wow>\AddOns directory, named "RightLFG" for instance.
    • Create a new file in that directory called "RightLFG.toc" It has to have the same name as the directory, with an ".toc" extension.
    • Edit this file, add 2 lines, the first being "## Interface: 30300" and the second being "RightLFG.lua"
    • Create a new file in the same directory called "RightLFG.lua". Copy the code I gave above in it.

    And you should be done.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LFG Tooltip expanding to the right?
    You sadly need to replace MiniMapLFGFrame_OnEnter() yourself, like this :
    MiniMapLFGFrame:SetScript("OnEnter", function (self)
    
    	local mode, submode = GetLFGMode();
    	if ( mode == "queued" ) then
    		LFDSearchStatus:Show();
    	elseif ( mode == "proposal" ) then
    		GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
    		GameTooltip:SetText(LOOKING_FOR_DUNGEON);
    		GameTooltip:AddLine(DUNGEON_GROUP_FOUND_TOOLTIP, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
    		GameTooltip:AddLine(" ");
    		GameTooltip:AddLine(CLICK_HERE_FOR_MORE_INFO, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
    		GameTooltip:Show();
    	elseif ( mode == "rolecheck" ) then
    		GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
    		GameTooltip:SetText(LOOKING_FOR_DUNGEON);
    		GameTooltip:AddLine(ROLE_CHECK_IN_PROGRESS_TOOLTIP, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
    		GameTooltip:Show();
    	elseif ( mode == "listed" ) then
    		GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
    		GameTooltip:SetText(LOOKING_FOR_RAID);
    		GameTooltip:AddLine(YOU_ARE_LISTED_IN_LFR, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
    		GameTooltip:Show();
    	elseif ( mode == "lfgparty" ) then
    		GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
    		GameTooltip:SetText(LOOKING_FOR_DUNGEON);
    		GameTooltip:AddLine(YOU_ARE_IN_DUNGEON_GROUP, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
    		GameTooltip:Show();
    	end
    end)


    ... which is the default implementation, but with "ANCHOR_RIGHT" instead of "ANCHOR_LEFT".

    Edit: Note that it won't work if you replace the global function, you have to call :SetScript()
    Posted in: Lua Code Discussion
  • 0

    posted a message on Set it and forget it auto restock
    Glyphs are a little problematic, when coupled with multiple specs. How is the addon supposed to handle the case where you have a glyph that removes the necessity for one reagent but only on one spec ?

    Apart from that, the addon you describe is indeed very easy and small. As a base, you can look at mine. The version on googlecode is not up-to-date and contains a few wrong itemid. I've fixed it locally but didn't commit that. It works for all class, it maintains "stacks" of reagents. Adding a check for glyphs would be quite easy, once you've decided how to handle the corner case explained above. And it also automatically sells the junk items too.

    Edit: http://www.wowace.com/addons/vendor-automate/
    Posted in: Lua Code Discussion
  • 0

    posted a message on Detecting Secure Frames
    Quote from Nevcairiel
    For the second problem, well, that will never be solved.


    Furthermore, the answer isn't obvious in most cases. A careful analysis of the code is required to make sure a taint has no consequence for the user.

    You shouldn't need to blindly hook functions and handler for the purpose of profiling. CPU Profiling can be performed by the client, using the scriptProfile cvar.

    You should then be able to get pertinent information on a function basis by calling GetFunctionCPUUsage(). GetFrameCPUUsage() is probably of interest too.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Detecting Secure Frames
    issecurevariable doesn't work on function objects because taint works on object references. So when an insecure code references an object, the reference it gets is tainted, and issecurevariable would always return nil for the reference. That's why an addon can't do :
    ActionButton_OnEvent = ActionButton_OnEvent

    even though it hasn't really modified ActionButton_OnEvent.
    Posted in: Lua Code Discussion
  • 0

    posted a message on question about table inserts
    Quote from myrroddin
    Jerry, ok, strange why?


    Why use one of the few character that has to be escaped ? Why use that character twice ?

    Quote from myrroddin
    And how does one localize a whole table at once?


    Hmm, not quite sure if it works with AceLocale-3.0, but the idea would be :
    -- in locales/enUS.lua
    
    L["QUOTE_TABLE"] = {
      "$p is bringing $t back to life!",
      "Filthy peon! $p has to resurrect $t!",
      -- other entries ...
    }
    
    -- in locales/frFR.lua
    
    L["QUOTE_TABLE"] = {
      "$p ramène $t Ã* la vie!",
      -- other entries, not necessarily direct translation of the english ones
    }
    
    -- in the core
    
    defaults = {
      profile = {
       randChatTbl = L["QUOTE_TABLE"],
     }
    }
    
    -- Note that a version like this has the issue that Xinhuan explained.
    Posted in: Lua Code Discussion
  • 0

    posted a message on question about table inserts
    All this is very easy to test.

    Yes, table.insert, as its name suggests, insert an entry in a table indexed by number, using the next non-nil index, and yes, table.remove removes the entry at the given index, moving all entries after so that the list is still consecutive.

    It seems quite strange to use "%%t%%" as a tag name. I would suggest $T and $P instead:
    local template = "$p is bringing $t back to life!"
    print(template:gsub("$([pt])", {p = sender, t = targetName}))


    I would also suggest not to use Localisation on a line by line basis, but on the whole table, so that language where no real translation exists can have a different number of entries (even more than the english one if one translator feels inspired).
    Posted in: Lua Code Discussion
  • 0

    posted a message on [Grid] Resize pet unitframes, remove from main layout
    I disagree, and I also do not really care if people use or not the addon I write or maintain. I care that it does what I want it to do. If you wanna change to any other raid frame that provide the "customization" you want, then be my guest.
    Posted in: Grid & Grid2
  • To post a comment, please or register a new account.