Go Back   WowAce Forums > Addon Chat > Libraries
Libraries Threads for new libraries and mixins.

Reply
 
Thread Tools
Old 04-08-2008   #1
jerry
Amazing Member
 
Join Date: Jul 2006
Posts: 1,461
Default LibItemBonus-2.0

LibStub and CallbackHandler-1.0 based version of ItemBonusLib-1.0.

Please report bugs and feature requests here.

Note that Notifications is done now using 3 methods : A CallbackHandler based method :

Code:
function foo:OnInitialize()
  LibStub("LibItemBonus-2.0"):RegisterCallback(self, "ItemBonusLib_Update", function () dosomethinghere() end)
end
An AceEvent-3.0 based method, if AceEvent-3.0 is available :

Code:
function foo:OnInitialize()
  LibStub("AceEvent-3.0"):Embed(self)
  self:RegisterMessage("ItemBonusLib_Update")
end

function foo:ItemBonusLib_Update()
  dosomethinghere()
end
And finally the previous AceEvent-2.0 method, if AceEvent-2.0 is available :

Code:
function foo:OnInitialize()
  AceLibrary("AceEvent-2.0"):Embed(self)
  self:RegisterEvent("ItemBonusLib_Update")
end

function foo:ItemBonusLib_Update()
  dosomethinghere()
end
jerry is offline   Reply With Quote
Old 04-08-2008   #2
jerry
Amazing Member
 
Join Date: Jul 2006
Posts: 1,461
Default Re: LibItemBonus-2.0

Quote:
Originally Posted by Xinhuan
Ahdri, can you type "//ibonus details" without the quotes (yes there are 2 slashes in there, Jerry made a mistake with the slash command)?
Fixed in r68609.
jerry is offline   Reply With Quote
Old 04-22-2008   #3
Lerkur
Newbie
 
Join Date: Nov 2007
Posts: 4
Default Re: 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:

Code:
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:

Code:
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.
Lerkur is offline   Reply With Quote
Old 04-26-2008   #4
BestSteve
Newbie
 
Join Date: Jun 2007
Posts: 7
Default Re: LibItemBonus-2.0

Here is the Traditional Chinese(zhTW) parsing pattern.
Attached Files
File Type: lua zhTW.lua (21.5 KB, 1 views)
BestSteve is offline   Reply With Quote
Old 04-26-2008   #5
Pantheis
Newbie
 
Join Date: Apr 2005
Posts: 2
Default Re: LibItemBonus-2.0

On ONLY my hunter, I get the following errors upon login. The first one happens once, the second two repeat extremely quickly. This ONLY happens on my hunter and I believe it has to do with my Dragonstalker's Leggings (Hunter Tier 2). If I put my Tier 2 leggings into my bank, log out and back in, I do not get any errors.

I should also note that the memory usage of LibItemBonus-2.0 skyrockets right after login and keeps going up to over 15MB before a automatic garbage collection happens, dropping it back to normal, where it then climbs right back up, rinse and repeat.

Any idea?

Thank you!

[2008/04/26 08:27:05-1602-x1]: LibItemBonus-2.0\LibItemBonus-2.0\core.lua:859: attempt to index field '?' (a nil value)
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:914: in function `BuildBonusSet'
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:983: in function `ScanEquipment'
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:58: in function <...ce\AddOns\LibItemBonus-2.0\LibItemBonus-2.0\core.lua:50>

---

[2008/04/26 08:27:05-1602-x742]: table: 116D61D8: Chat Command 'ibonus' already exists, will not overwrite.:
AceConfigCmd-3.0\AceConfigCmd-3.0.lua:711: in function `CreateChatCommand'
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:581: in function `OnInitialize'
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:57: in function <...ce\AddOns\LibItemBonus-2.0\LibItemBonus-2.0\core.lua:50>

---

[2008/04/26 08:27:05-1602-x742]: LibItemBonus-2.0\LibItemBonus-2.0\core.lua:844: attempt to index local 'set' (a nil value)
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:914: in function `BuildBonusSet'
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:983: in function `ScanEquipment'
LibItemBonus-2.0\LibItemBonus-2.0\core.lua:58: in function <...ce\AddOns\LibItemBonus-2.0\LibItemBonus-2.0\core.lua:50>

---
Pantheis is offline   Reply With Quote
Old 04-26-2008   #6
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: LibItemBonus-2.0

Pantheis, I believe you have some external addon hooking all tooltips (it shouldn't be doing that) and adding additional lines. The item you mentioned has 29 lines in the tooltip, but the code is expecting more than 30 defined lines.

In any case, changing line 27 of core.lua from 30 to something a bit larger, like 35 should fix it.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.
Xinhuan is offline   Reply With Quote
Old 04-26-2008   #7
Pantheis
Newbie
 
Join Date: Apr 2005
Posts: 2
Default Re: LibItemBonus-2.0

I've got a number of mods installed that add things to tooltips for items. Thank you for clearing up what was happening.
Pantheis is offline   Reply With Quote
Old 05-03-2008   #8
Zindjorl
Newbie
 
Join Date: Dec 2005
Posts: 5
Default Re: LibItemBonus-2.0

the pattern for the ignore armor effect does not work in the french locale:

pattern = "Vos attaques ignorent (%d)+ points de l'armure de votre adversaire%.", effect = "IGNOREARMOR" },

the working pattern is :

pattern = "Vos attaques ignorent (%d+) points de l'armure de votre adversaire%.", effect = "IGNOREARMOR" },
Zindjorl is offline   Reply With Quote
Old 05-15-2008   #9
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: LibItemBonus-2.0

Bug reported here:

http://www.wowace.com/forums/index.p...6049#msg216049

BUG: Greater Inscription of Faith ( http://www.wowhead.com/?item=28887 ) counting both the +healing and the +damage to +healing. Meaning WoWEquip will count this as 44 +healing.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.
Xinhuan is offline   Reply With Quote
Old 08-20-2008   #10
Gabriel
Senior Member
 
Join Date: Feb 2005
Posts: 359
Default Re: LibItemBonus-2.0

Getting the following error on my Hunter only, I have 9 lvl 70s of each class and my Hunter is the only one to throw this error on login,

[2008/08/20 18:03:53-2512-x2]: LibItemBonus-2.0\LibItemBonus-2.0\core.lua:627: attempt to index upvalue 'L' (a nil value)
(tail call): ?:
AceEvent-2.0-66043 (Ace2):910: in function <Interface\AddOns\Ace2\AceEvent-2.0\AceEvent-2.0.lua:903>

---
Gabriel is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:49 PM.