• 0

    posted a message on Secure headers: Wrapped snippet won't execute
    Quote from egingell
    I'm pretty sure the "thrown" returns from that same function are for all ranged weapons not just thrown, but I have not tested it.

    http://www.wowpedia.org/API_GetWeaponEnchantInfo


    Thanks, seems like it does, http://wowprogramming.com/docs/api/GetWeaponEnchantInfo is outdated.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Secure headers: Wrapped snippet won't execute
    Actually it works, I guess it has something to do with that the Character frame (paperdoll) is hidden and shown by a keypress, it probably wouldn't work if you called Show() / Hide() directly.

    The only strange thing is that I can't hide or show the secure drop down menu anchored to the slot button, it just won't work (no errors, nothing) even outside combat, but I can move it off screen (and back), even in combat.

    One more question: How do you get information about a temporary enchant on your ranged weapon? I know there's GetWeaponEnchantInfo(), but I can't find anything similar for the ranged slot. Is tooltip scanning the only option?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Secure headers: Wrapped snippet won't execute
    Quote from Adirelle
    :IsProtected()

    For what you want to do, you could try to create your own SecureButton anchored to the slot button, but I'm not sure it would work.


    I think it would, the only problem is I'm not sure what will happen if you close the inventory frame while in combat, it would also hide the secure button and probably be blocked.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Secure headers: Wrapped snippet won't execute
    I think I've answered my own question, apparently WrapScript() requires the frame it wraps to be secure, otherwise it fails silently. CharacterMainHandSlot is not secure, and therefore the wrapped snippet won't run.

    Still need to find a way to open/close the menu in combat.

    Btw, is there a widget function to check if a given widget is secure? I think I remember that one existed, but can't find it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Secure headers: Wrapped snippet won't execute
    I'm trying to make it open a drop down menu, where you can choose which poison to apply to that weapon. (If an addon like that already exists, please tell me)

    I've got the menu created and setup with secure action buttons, but I need a secure header to be able to open and close the menu while in combat.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Secure headers: Wrapped snippet won't execute
    local secureHeader = CreateFrame("button", nil, UIParent, "SecureHandlerClickTemplate")
    secureHeader:WrapScript(CharacterMainHandSlot, "OnClick", "print('secure onclick')")
    CharacterMainHandSlot:HookScript("OnClick", function() print("on click hook") end)
    


    The "on click hook" will print when clicking your main-hand weapon, but the other one wont, why? Am I missing something?

    How can I get a secure snippet to run when right clicking your main-hand weapon slot?
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to change text on buttons and or frames?
    SampleFormLabel:SetText("text") if that's the name of the fontstring.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Getting/Setting a frame's offset from Anchor using LUA.
    [php]MyFrame:SetUserPlaced(true)[/php] should also work.
    It makes the frame's position to automatically save in your layout-local.txt cache file.
    Useful if you don't want to bother creating a whole db system for just saving the position of a few frames.
    Posted in: Lua Code Discussion
  • 0

    posted a message on nClock, nMinimap, etc
    I just found nClock in a photek ui package, an awesome addon really, think I might try to ask Neal if he can release it, together with some other of his n addons.
    Posted in: AddOn HELP!
  • 0

    posted a message on nClock, nMinimap, etc
    Ah I see, that's what I thought...
    Is his UI available somewhere? I did a quick search but found nothing
    Posted in: AddOn HELP!
  • 0

    posted a message on nClock, nMinimap, etc
    Where can I find these addons? They're not up on any addon site and nor google code.
    Maybe they're not up there for a reason?, but well I might as well ask...
    Posted in: AddOn HELP!
  • 0

    posted a message on Querying the server for item info
    While we're talking about querying the server for item info :)
    Is there anyway to query the server for an item you only know the name of? (not it's itemid)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Time to OOM?
    How is it supposed to be calculated? Mana lost since got in combat / time in combat?
    Posted in: Addon Ideas
  • 0

    posted a message on Number of players near your target
    Are you sure? I'm pretty sure I've tested it before and gotten it to work with most if not all units.
    And if there's really no way to get this to work inside an instance it would be no point trying :/
    Posted in: Addon Ideas
  • 0

    posted a message on Number of players near your target
    I was wondering if it would be possible to somehow get the number of raid/party members in X range of your target, would for example be very useful for quickly deciding whether to cast Wild Growth or not.

    The only ways I can think of is using GetPlayerMapPosition(), but does it still only work outside instances?
    Besides that I guess the only way is get all raid/party members send their range to other members and targets around in the raid/party, but that would require everyone to have the addon installed...
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.