• 0

    posted a message on LibItemBonus-2.0
    Has there been any investigation into how to correctly parse BASE_ARMOR and ARMOR_BONUS for items with part of their stat budgets devoted to armor (green armor text)?

    I know that the practice of creating items with portions of their budget devoted to additional armor has fallen out of favor, but I would still like to be able to correctly separate these values for older items. My attempts to code in an armor value prediction based on item level, equipment slot, and armor class, have revealed that the formula used to generate the base armor value is complicated enough to be a headache.
    Posted in: Libraries
  • 0

    posted a message on LibItemBonus-2.0


    I'm using LibItemBonus-2.0 Revision: 70494.

    In the function lib:ScanItemLink() in core.lua on line 835 the code for weapon speed reads:

    b.WEAPON_SPEED = get_speed(self.tooltip.lefts[i]:GetText())


    This was not reading weapon speeds correctly for me on a enUS client. I believe the code should be:

    b.WEAPON_SPEED = get_speed(self.tooltip.rights[i]:GetText())



    And thanks for the work you have put into this latest version. It's wonderful.
    Posted in: Libraries
  • 0

    posted a message on ItemBonusLib, an Ace2 version of BonusScanner
    Is it possible to access the pattern list publicly? If so, I would appreciate any tips. If not, I would like to request a public function (or possibly 3) to allow addons to add to the pattern lists at runtime.

    Currently I am adding new patterns into the library manually. I don't like this method because it makes my addon incompatible with updated versions of the library. The following are some examples of patterns I am adding for my addon:
    { pattern = "+(%d+) Agility & (%d+)%% Increased Critical Damage", effect = {"AGI", "CRITDMG"} },
    { pattern = "+(%d+) Spell Critical & (%d+)%% Increased Critical Damage", effect = {"CR_SPELLCRIT", "SPELLCRITDMG"} },


    Which brings me to my next issue. For the versions of ItemBonusLib and Gratuity that I am using, there is a bug with the recognition of the two patterns I have listed. When the Gratuity:GetLine() function is invoked on an item that has one of the meta gems in it, it returns a string which contains newline characters (\n) as well as the additional lines listing the requirements for the meta gem. This does not occur when viewing the meta gem as a standalone item. (that is, before it is socketed)

    To remedy this, I have altered the code in ItemBonusLib slightly. In the function ItemBonusLib:ScanItemLink(), I have added a line of code:
    ...
    	local line = Gratuity:GetLine(i)
    
    	--This line added in
    	if line:match("\n") then line = strsplit("\n", line) end
    ...


    This line will chop down the line returned by Gratuity to what is expected.

    If you are able to verify that you encounter the same issue, I would like to request that this bug be fixed in some similar manner.


    And as always, thank you for the work you have done on this library. It is the backbone of my addon.
    Posted in: General AddOns
  • 0

    posted a message on ItemBonusLib, an Ace2 version of BonusScanner
    Can we get a function to access the current number of equipped items in a set?

    I've hacked in my own for the time being but I would love to have one native to the library.

    What I put in was a modification of ItemBonusLib:BuildBonusSet. It looks like:
    local set_count = {}
    function ItemBonusLib:GetSetCount(set)
    	return (set_count[set] or 0)
    end
    
    function ItemBonusLib:BuildBonusSet(eq)
    	local details = {}
    	set_count = {}
    
    ...
    Posted in: General AddOns
  • To post a comment, please or register a new account.