• 0

    posted a message on Getting the new cooking professions ranks
    You didn't misunderstand. I could indeed get the starting rank and the max rank for a toon by using IsPlayerSpell(spell_id) where spell_id is 125584, 125586, etc. (the Way of the ... spells) but I was looking for the current level.

    They do act like normal professions in the sense that you have to cook stuff in the proper specialty for the skill to go up and GetTradeSkillLine() return "Way of the ..." for those lines instead of "Cooking". When the Cooking trade skill window is displayed, you get 5xx/600 skill ranks when you hover over the header for each Way of the ... specialties unlike Gnomish and Goblin Engineering which are just requirement to get particular recipes.

    I'll keep looking but something tells me that I'll be a sad panda.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Getting the new cooking professions ranks
    Hey guys, I'm trying to find a way to get the rank and max rank for the new Mists cooking professions (Way of the Brew, Grill, Wok, etc.).

    Those are not listed in the profession page of the spellbook so GetProfessionInfo() doesn't do me any good. I'm looking for a way to get the rank and max rank without having to visit the trainer or scanning the trade skill window. GetTradeSkillInfo() has the rank information but it's valid when the cooking trade skill window is open.

    If anyone has a clue of a tooltip I can scan or a function I may have overlook, please let know.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Postal (was GMail2): Updated
    I had to tweak the placement of the buttons and checkboxes for the Select module. Here's the code is case it's of any use for you :

    function Postal_Select:OnEnable()
    	
    	--Postal:Print("Postal_Select:OnEnable")
    
    	--create the open button
    	if not openButton then
    		openButton = CreateFrame("Button", "PostalSelectOpenButton", InboxFrame, "UIPanelButtonTemplate")
    		openButton:SetWidth(120)
    		openButton:SetHeight(25)
    --		openButton:SetPoint("RIGHT", InboxFrame, "TOP", 5, -53)
    		openButton:SetPoint("RIGHT", InboxFrame, "TOP", 5, -44)
    		openButton:SetText(L["Open"])
    		openButton:SetScript("OnClick", function() Postal_Select:HandleSelect(1) end)
    		--openButton:SetFrameLevel(openButton:GetFrameLevel() + 1)
    	end
    
    	--create the return button
    	if not returnButton then
    		returnButton = CreateFrame("Button", "PostalSelectReturnButton", InboxFrame, "UIPanelButtonTemplate")
    		returnButton:SetWidth(120)
    		returnButton:SetHeight(25)
    		returnButton:SetPoint("LEFT", InboxFrame, "TOP", 10, -53)
    		returnButton:SetPoint("LEFT", InboxFrame, "TOP", 10, -44)
    		returnButton:SetText(L["Return"])
    		returnButton:SetScript("OnClick", function() Postal_Select:HandleSelect(2) end)
    		--returnButton:SetFrameLevel(returnButton:GetFrameLevel() + 1)
    	end
    
    	--indent to make room for the checkboxes
    	--MailItem1:SetPoint("TOPLEFT", "InboxFrame", "TOPLEFT", 48, -80)
    	MailItem1:SetPoint("TOPLEFT", "InboxFrame", "TOPLEFT", 34, -68)
    	for i = 1, 7 do
    --		_G["MailItem"..i.."ExpireTime"]:SetPoint("TOPRIGHT", "MailItem"..i, "TOPRIGHT", 10, -4)
    --		_G["MailItem"..i]:SetWidth(280)
    		_G["MailItem"..i]:SetWidth(293)
    	end
    
    Posted in: General AddOns
  • 0

    posted a message on Updating Elkano's Buff Bars for 5.0
    Elk, the pre-alpha is very nice. I'm pretty sure the finish product will be as good as the old Ace2 one.

    Looking forward to it.

    On a site note, I didn't find the option I need to hack to filter to whitelist or blacklist buff, is it possible that it is not code yet?
    Posted in: AddOn HELP!
  • 0

    posted a message on Updating Elkano's Buff Bars for 5.0
    Quote from Elkano
    small update:


    Arggghhh... stop with the teasing!!! Can we download the alpha from somewhere?
    Posted in: AddOn HELP!
  • 0

    posted a message on Grid — compact party/raid unit frames
    Quote from mateo007
    Is there a way to disable grid on certain characters in-game? (Rather than turn off the addon on the character select screen.)


    In layout, select None everywhere.
    Posted in: Grid & Grid2
  • 0

    posted a message on MinimapCluster positioning
    Quote from Phanx

    Anyway, if you're using _G.SomeThing because you "like seeing it", that's your choice, but you should be aware that it's at least as slow as getting SomeThing directly as a global. Adding a comment nearby may be a better solution if you really can't remember that UnitAura is an API function instead of something defined by your code, but upvaluing UnitAura would be the best solution.


    This is a very nice explanation Phanx, thanks for sharing it. I'll take that into consideration in the future and probably change my ways.

    I think this should become an article in WoWPedia.
    Posted in: Lua Code Discussion
  • 0

    posted a message on MinimapCluster positioning
    Quote from Phanx
    Blindly upvaluing _G is not necessarily useful. If there are specific globals you're accessing frequently -- like UnitHealth or UnitAura -- you should upvalue them individually, as accessing a local variable is still faster than looking up a value in a local table. If you're only accessing a global (such as MinimapBorderTop) once when your addon loads, or once each time the user changes the related option, then there is not really any value in upvaluing it. FindGlobals is a useful debugging tool -- eg. to help you avoid leaking globals -- but its existence does not mean there is necessarily anything wrong with accessing global variables in your code.


    Agreed, still by upvaluing everything and running FindGlobals, I find a lot of typos in my code that would not otherwise be easy to debug. For this alone, it's quite valuable. I also like to see _G. for variables and function that are not define in my code. It makes them easier to spot.

    I guess it's a question of preference.
    Posted in: Lua Code Discussion
  • 0

    posted a message on MinimapCluster positioning
    Quote from Phanx
    Not really related to your question or solution, but doing _G.MinimapBorderTop is actually slower than just doing MinimapBorderTop. Getting the frame directly only costs 1 global lookup; getting _G and then getting the frame from _G costs 1 global lookup (to find _G) and then an additional 1 table lookup (to find the frame in _G).

    The only reason to use _G.MinimapBorderTop would be if you had a local variable named MinimapBorderTop that pointed to something else (which is probably a sign of bad variable naming) or if you used setfenv to run your code in a custom environment.


    There is a local _G = _G at the top of LibJostle where the code came from. I prefer local _G = getfenv(0) but it should work to.

    It's a good point that Phanx make, many addons use upvalued version of _G in accordance with FindGlobals but if you are just copying the code without setting up the upvalue, you are doing yourself a disservice.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Updating Elkano's Buff Bars for 5.0
    Rumour of EBB3 have been around for quite a while. Let's just hope it's not the next Duke Nukem Forever :-).
    Posted in: AddOn HELP!
  • 0

    posted a message on ncHoverBind
    That's nice, it does the same thing that Dominios and AutoBar do with LibKeyBound-1.0 except if you don't have either of them. Not sure if you use the library or your own code but you might want to look into LibKeyBound if you haven't.

    One suggestion, add a check-box that allow to choose whether to bind for the Account or for the Character.

    Best
    Posted in: General AddOns
  • 0

    posted a message on API Bug GetAccountExpansionLevel() returns 4 for accounts that have pre-ordered Mists
    The TOC version cannot tell you the maximum level the current logged toon can go which is why you usualy need the GetExpansionLevel() or GetAccountExpansionLevel() info.
    Posted in: Lua Code Discussion
  • 0

    posted a message on API Bug GetAccountExpansionLevel() returns 4 for accounts that have pre-ordered Mists
    It's not a bug, the account is already at level 4. GetExpansionLevel() returns 3 i.e. the expansion level for the installed client.

    From FrameXML\ReputationFrame.lua in the live client:
    -- Hard coded =(, will need to add entries for each expansion
    MAX_PLAYER_LEVEL_TABLE = {};
    MAX_PLAYER_LEVEL_TABLE[0] = 60;
    MAX_PLAYER_LEVEL_TABLE[1] = 70;
    MAX_PLAYER_LEVEL_TABLE[2] = 80;
    MAX_PLAYER_LEVEL_TABLE[3] = 85;
    MAX_PLAYER_LEVEL = 0;
    REPUTATIONFRAME_ROWSPACING = 23;
    
    function ReputationFrame_OnLoad(self)
    	self:RegisterEvent("UPDATE_FACTION");
    	-- Initialize max player level
    	MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL_TABLE[GetExpansionLevel()];
    	--[[for i=1, NUM_FACTIONS_DISPLAYED, 1 do
    		_G["ReputationBar"..i.."FactionStanding"]:SetPoint("CENTER",_G["ReputationBar"..i.."ReputationBar"]);
    	end
    	--]]
    end
    


    The easy fix is to use GetExpansionLevel() instead of GetAccountExpansionLevel()
    Posted in: Lua Code Discussion
  • 0

    posted a message on REQ: Auction House Bargain Hunter
    There is already a function in Auctioneer that do pretty much that. It's called Snatch.
    Posted in: Addon Ideas
  • 0

    posted a message on looking for GMT time
    Try time(date("!*t")).
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.