• 0

    posted a message on Inline Aura - display aura information inside action buttons
    Quote from livejamie
    So there's no way to make Touch of Death glow when my target is at 10%?


    You can edit the Default.lua file to do so.

    Quote from Skullflowerx
    For 5.2, T15 DK 4p enables Soul Reaper to trigger on targets below 45%
    (instead of 35%); can you add this for tracking?

    Thanks!


    I have added two health thresholds (45% for DK and 10% for Monks). However, as IA doesn't check for target type (player/NPC) nor set bonuses, you'll have to change the setting of the spells yourself.
    Posted in: General AddOns
  • 0

    posted a message on Uninstalling Ace3 Addon
    The only thing to do to remove an addon properly is removing its file, and possibly it savedvariables files (though this is not required). There is no additional step. Each time you log in, all the addons are reloaded from their files and that's it. Nothing persists between two sessions but the saved variables, and AceAddon does not use them.

    However, what happens when you rename your addon from "Test" to "ADKP" is that it probably becomes the first addon to load the AceAddon-3.0 library (because addons are loaded in alphabetically order, at least using Windows). It becomes the host of all the libraries it embeds, as long as they are the most up-to-date. And subsequent errors involving one of these libraries will list your addon in their stack trace, even if you addon has nothing to do with the addon that really caused the error.

    So, what I see in your error logs, is that Skinner has an issue, nothing related with ADKP.

    However, maybe you embeded a version of AceAddon that is causing issues with Skinner. That's very unlikely because most Ace3 releases are very stable.
    Posted in: AddOn HELP!
  • 0

    posted a message on Lua List and inclusion in mod
    Phanx, if you changes the id everytime, it is not an id(entifier) -- that should never change -- but an simple index. This prevents removing by identifier.
    Posted in: Lua Code Discussion
  • 0

    posted a message on AceTimer is now animation based
    Yes, but an awful lot of people directly include Ace3 latest revision (given how stable it is), it may have spread already.
    Posted in: Ace3
  • 0

    posted a message on In-Game Addon System (IGAS)
    Random thoughts on and off the topic :

    - Lua doesn't lack OOP support : it is using another paradigm : prototype-oriented programming, like Javascript (though Lua support of prototypes is embryonic). Take a look at functional languages, they do not have OOP support either.

    - Building your own language (a Domain-Specific Language) on top of Lua is not a bad thing per se. Some languages are well suited for building DSL, like LISPs, Ruby, Groovy, ... They includes mechanisms that helps reducing the complexity and overhead of a DSL. But Lua does not. In Lua it has a big cost in term of complexity, memory and CPU time. And addons should be focused of keeping the things simple and light to avoid "wasting" too much CPU time and memory.

    - Ace3 has been designed in several independent modules, in contrast with the monolithic design of its predecessor, Ace2. As already said, every Ace3 modules are independent of the other and even if no module is required, they work very well together. IGAS looks like Ace2, that has been abandoned years ago because of the drawbacks of its monolithic design.
    Posted in: Libraries
  • 0

    posted a message on change frame template ?
    Your "setting" variable is hopefully an upvalue of your SetPoint function and not a global variable, because a global variable with such a common name would have chance to conflict with any other addon (or even Blizzard code) using the same global variable. ;)
    Posted in: Lua Code Discussion
  • 0

    posted a message on AceTimer is now animation based
    Nice. The code looks seems simplier than the old hash-bucket one.

    Not sure if it matters but it seems the animations do not opt out of the animation framerate throttle (cf. http://www.wowpedia.org/API_GetMaxAnimFramerate). Does this impact the minimal delay ?

    Moreover, if an error happened in a callback, woudn't it break the animation callback ? (If not, I assume that with a repeating time it will cause a tonsh*t of errors)
    Posted in: Ace3
  • 0

    posted a message on change frame template ?
    What Phanx tells is that the bar actions are protected frames -- actually, only the action buttons are but the result is the same. If some addon code modifies these frames, e.g. by replacing one of their method, the frames get tainted. In combat, this causes a lot of error and prevents the bars and buttons from working.

    This entire mechanisms has been added by Blizzard long time ago to prevent bots and scripting. Here are more details : http://www.wowpedia.org/Taint

    So basically, you can't just replace or disable :SetPoint(). The only thing you can do is using hooksecurefunc to have your own function called every time the original :SetPoint() is called. In this hook function, you can undo what the original :SetPoint() does.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Notepad++
    Quote from Farmbuyer
    Huh, I know I've seen my gf do it. (She might be doing something like highlighting a block and piping it to GNU indent, but it's apparently all built in -- although it might be a Notepad++ plugin.)


    Actually, it "smart-indents" new lines properly. But if you write messed up code, you can't easily reindent it without using a plugin.
    Posted in: General Chat
  • 0

    posted a message on Notepad++
    Same here ; I'm also using Notepad++. The only efficient way I found to properly indent the code is to pull my fingers out.
    Posted in: General Chat
  • 0

    posted a message on Need your review
    Maybe the initialization of your AceDB database was not in the right addon, e.g. the defaults and AceDB initialization should be in the main addon while you kept all the options in the option addon.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Need your review
    About your saved variables :

    1. Write an initialization function in UnitScanner.lua that gets the database from USopt. Use directly USopt.db.profile ; there is no need for the ugly "current" member you are assigning to your SavedVariables.
    2. Do not put any handler in place before this function is called, so you do not have to test db and db.profile in each of them.
    3. Initialize all the defaults *before* loading the database (line 507 of Core.lua should be before line 506).
    4. Do not mess up with your saved variable when using AceDB (lines 505, 514 and 541 of Core.lua).
    Posted in: Lua Code Discussion
  • 0

    posted a message on Need your review
    1. Properly and consistently indent your code ! Badly indented code is harder to understand and is prone to errors.

    2. Make up your mind about names : choose a naming convention (e.g. StudyCaps, lowercase_with_underscores, ...) for functions, another for variables and stick to them. You're mixing up everything. It makes your code harder to understand and is prone to errors.

    3. Any function or variable you are not going to use outside the file should be declared local :

    function shallowcopy(orig)
    =>
    local function shallowcopy(orig)


    However, you may have to reorder function declaration so local functions are declared before they are used.

    4. You are using ipairs in CopyDefaults, should not it be pairs ?

    5. Do not copy-paste assignments (actually avoid copy-pasting code as much as possible, see DRY). The code looks terrible, with time it will become a chore to maintain and what gets executed is worse :

    defaults.profile["Bars"][1] = {}
    defaults.profile["Bars"][1].enabled = true
    defaults.profile["Bars"][1].name = "Icon bar 1"
    defaults.profile["Bars"][1].rows = 1
    defaults.profile["Bars"][1].icon = 3
    defaults.profile["Bars"][1].dimension = 1


    Should be written as :

    defaults.profile["Bars"][1] = {
        enabled = true,
        name = "Icon bar 1",
        rows = 1,
        icon = 3,
        dimension = 1
    }


    By the way this could be include in your original assignemnt :

    local defaults = {
       profile = {
            Version = "0.5",
            Locked  = false,
            Bars = {
               { -- first value gets assigned to [1]
                   enabled = true,
                   name = "Icon bar 1",
                   rows = 1,
                   icon = 3,
                   dimension = 1
               }
            },
            Charge = {
                    ["Yoff"] = 0,
                    ["Xoff"] = 0,
                    ["Size"] = 16,
                    ["Font"] = "Fonts\\FRIZQT__.TTF",
                    ["Key"] = "Friz Quadrata TT",
                    ["b2n5"] = {1, 0.125, 0},
                    ["b6n10"] = {1, 0.75, 0},
                    ["o10"] = {1, 1, 1,},
            },
      },
    }
    Posted in: Lua Code Discussion
  • 0

    posted a message on Share SVN with a second developer?
    The username in the URL is just a way to provide it before SVN asks it. Should an operation need authentication, SVN would ask you an username and a password. If the repo was private, authentication would be required even for read operations.
    Posted in: Need Help?
  • 0

    posted a message on Addon Template
    This could be of some help : http://www.wowpedia.org/Taint (searched for "wowpedia taint" in google).
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.