• 0

    posted a message on sorting tables redux
    OK, I know how to sort a table within itself, but I can't wrap my head around what I'm trying to do here. I have

    priority = {
            PRIEST,
            PALADIN,
            SHAMAN,
            DRUID,
            MAGE,
            WARLOCK,
            HUNTER,
            DEATHKNIGHT,
            ROGUE,
            WARRIOR,
        }

    Which I want to keep in that order. Add the following:

    local function sortDeadByLevelAndClassAndPriority(a, b, c)
            if a.level == b.level then
                return (b.level < a.level) and c.priority-- highest to lowest level. think "b < a" is the same as "80 comes before 79". if equal levels, then doesn't matter
            else
                return (b.level < a.level) and c.priority
            end
        end
        
        table.sort(self.Dead, sortDeadByLevelAndClassAndPriority)


    Where self.Dead is a table containing the class and level of every dead person in the party or raid. What I want to do is keep all the level 80s together, followed by 79s, etc. So the finished, sorted self.Dead might look like the following psuedocode:

    self.Dead = {
        Priest, 80,
        Paladin, 80,
        Priest, 79,
        Druid, 63,
        Shaman, 60, -- because the Shaman is lower level than the Druid
        Mage, 80,
        Warrior, 80,
    }


    Am I on the correct track?
    Posted in: Lua Code Discussion
  • 0

    posted a message on What AddOn is this? I'm not sure if it's Cartographer 2
    Your chat addon is Prat, but I bet you already know that. I noticed you don't have all the subfolders of Prat, enabled or not. Not sure what is causing the text dump, but it wouldn't hurt to make sure you have the newest version of your addons. If you use the Curse Client, I suggest clicking Manage Games, and setting the pulldown menu to Beta, applying to all addons, the seeing what needs updating.
    Posted in: AddOn HELP!
  • 0

    posted a message on Addon Load Time
    Quote from Slakah
    ....
    ...


    All I meant was that if Libs are reusable code, removing the need for duplication, then unless you install Libs separately, and and as devs, we support independent Libs, then it isn't removing duplication.

    Things may have changed, but the last time I checked how WoW loads opt deps was something like

    1. BigWigs (starting with "B") loads first, and comes with Ace2 opt dep, which is loaded
    2. SmartRes (starting with "S") loads second, comes with Ace2 opt dep, which overwrites the version that loaded with BigWigs, even if it is older, just because SR tells it to load... again.

    Of course, if Libs are seperate, then it is more like

    1. Ace2 loads
    2. BigWigs loads
    3. SmartRes loads

    And everything is working as intended. Or did I still not understand something?

    *** Edit ***
    Afterthought: I wasn't talking about speed gains, compute cycles, or even wasted space on today's massive hard drives. I was talking about reducing or eliminating version conflicts with Libs. On that note, remind me to file a ticket for Decursive; the no-lib version doesn't get the correct version of DewDropLib. Strangely, it wants the Alpha.
    Posted in: General Chat
  • 0

    posted a message on replacement for FuBar?
    Quote from StormFX
    CB is OK, just too kiddish with all the "chocolate" references. Docking station does the trick, although it's a little bloat-heavy.

    Ah, bloat. That's what I'm trying to avoid by ditching FB. Shame, I like the look of DockingStation.

    OK, so I want Broker plugins, check. As for the bar itself, bloat is bad, so CB? I'll have to check out what Fortress is.

    Loving the feedback here; very helpful.
    Posted in: AddOn HELP!
  • 0

    posted a message on GatherMate/er and Carbonite
    Already imported its own DB. Just didn't see an obvious GM/G'er option. And yes, I have all three folders. I guess I have already imported everything I can, as I also loaded the other DBs and went through the import process.
    Posted in: AddOn HELP!
  • 0

    posted a message on replacement for FuBar?
    I'm kind of an old dog, but in this case, I am looking for new tricks. Hearing repeatedly that FuBar is bloated, laggy, etc, I am looking for suggestions, and I honestly don't know what to look for.

    In my current FuBar, I have: Friends, Guild, Performance, SmartRes, Factions, Durability, Money, and TopScore.

    Suggestions for a new bar that covers those things?
    Posted in: AddOn HELP!
  • 0

    posted a message on GatherMate/er and Carbonite
    Can either of the DBs for these addons be imported into Carbonite? I checked the WowInterface forums, and looked at the Carbonite in game options (still supporting Cartographer_xxx ?? Why???) and didn't see a way.

    However, I keep hearing that it is possible, and I'm curious.
    Posted in: AddOn HELP!
  • 0

    posted a message on Updating addons to current patch..
    Chance, not sure if this is your bag of tea, but I wrote MrBigglesworthDeath using that book. Of course, I still had to come here to ask for help, but that's ok. It is a really simple addon, and I doubt it has broken on the PTR, but you can check, as I don't have the PTR.

    Even if it hasn't broken, it would be a good start for you; as I said, it is very simple.
    Posted in: AddOn HELP!
  • 0

    posted a message on WowAceUpdater?
    The Curse Client even has most of the same features; for example, installing libraries independently. Click on Manage Games at the left, and look at all the options.
    Posted in: Updaters
  • 0

    posted a message on Licencing your addon: Sat's Addon Licence
    Quote from Squeeg
    Armour, Colour, Aluminium...... *shakes fist*


    Why shake your fist, neighbour? :cool:
    Posted in: General Chat
  • 0

    posted a message on Addon Load Time
    Just my two Canadian cents, which may or may not be worth anything. First, Zoom!!! works great during load screens; it prevents or reduces garbage collection during that time, and depending on how many addons you have, shaves off several seconds on said screens. You could also use AddonLoader, which, if an addon supports it, can offset the loading of addons to a more opportune time.

    Second, I think authors who do not provide a working, stable, nolib version are moving the community two steps back for every step forward their addon takes us.
    Posted in: General Chat
  • 0

    posted a message on [code review] SmartRes2 in progress
    The ResComm events in LibResComm-1.0 give you the caster, endTime, and target already. Plus it also gives IsUnitBeingRessed, which is a real boon. Assuming the player is using SmartRes2 (um, duh LOL) then I can easily narrow down to an appropriate target to cast the res on.

    What my code does, hopefully, is res in the order mentioned in my previous post, or in the comments of the Resurrection() function. I admit my code is a mess, and have rewritten it a couple of times, without being satisfied. The other thing is that I need to return the target unit from said function to the SmartRes2Button, and I'm a bit vague on that.

    So, here are the questions: LibBars-1.0 needs to be set up, but as I mentioned in the Libraries thead, I would love some help with the APIs; I would love some input on filtering targets so when the player presses the bound key, the target needs to be quantified (in range, in line of sight, not being ressed already, not ressed yet hasn't accepted the res, and has to be in a specific class order given appropriate level); and after ALL that, return that unit to the button.

    Yikes. And I thought I had a hard time coding the options....
    Posted in: Lua Code Discussion
  • 0

    posted a message on [code review] SmartRes2 in progress
    There is no such thing as "LibSmartRes" ... Methinks that would be an overly large, rather unwieldy library.

    LibResComm-1.0 has 3 main functions, and some other neat tricks on top.

    • ResStart: resser, endTime, target
    • Ressed: target has been ressed, but not yet accepted the OK
    • ResEnd: the resser canceled, or res spell completed

    LRC1 is "smart" insofar that it assigns the proper name to targets, even if they have released. The first SmartRes could do this. No more "unknown" or blank info when you ressed the corpse of a ghosted player.

    What LRC1 won't do, which is why Dathrarhek wrote HealInc, is show you duplicate res casts, nor will it prevent you from casting on someone who has ressed but not accepted, and it has no way of displaying any of this data. The main difference between SR2 and HI is that SR2 doesn't just put the res bars graphically on your screen, it resses units at the press of a button.

    Hence, SmartRes2. Just like the original, when you press your res key, it will res someone who is in range, in LoS, and isn't already being ressed. What I want to improve upon is the the original just starting picking dead units at random; I want the new version to res in a specific order, assuming all units are the same level, or where appropriate, the highest level: Priests, Paladins, Druids/Shamans, other Mana users, then the rest.

    OrionShock pointed out that I am creating and trashing tables left and right, and would love some help fine-tuning the Resurrection() function.

    Tekkub, btw, oRA3, HealInc, and maybe some others all use LibResComm-1.0, and since you seem to be familiar with the original SmartRes, you could understand me wanting to rewrite it rather than fix it. Some really outdated code there, nevermind the antique and depreciated Libs it uses that I very much want to dump.
    Posted in: Lua Code Discussion
  • 0

    posted a message on [code review] SmartRes2 in progress
    Quote from Tekkub
    I've always loved the idea, and I think you're halfway there already... but well, he's my thoughts on design:

    Look at the HealComm lib, it's neat, it works, and anyone can integrate it with their UFs. I think you should focus on making RezComm a standalone lib, then worry about making an addon that displays it's data. That way the rest of us aren't forced to use your addon... which I think was the biggest pitfall of the old SmartRez addons.

    If you want to break the comm stuf fout into a simple lib, I'll gladly help with it.


    Forgive my ignorance, or lack of understanding, Tekkub, but I don't follow. Dathrarhek already make LibResComm-1.0, which is where the ResComm bits come from, into a library that I'm using. Now, if you are suggesting that I make "LibSmartRes" then that sounds like a good idea. Of course, then I would have to write an addon to display the information, but isn't that the point of LibResComm already?

    Could you clarify, please? Also, if you do mean alter SmartRes2 to become its own Lib, then yes, I will need help, as I have no idea how on my own.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.