Ok, well, I didn't express myself well enough then.
Blizzard have implemented new API functions, GetCombatRating() and GetCombatRatingBonus().
GetCombatRating, with appropriate variable, will return the total "rating" as applicable, ie total Hit Rating.
GetCombatRatingBonus returns the actual percentage bonus inferred by the rating.
It works, but only for the current level of the player. The code that is in ItemBonusLib is level independant, and should work (I borrowed it from RatingBuster).
Quote from Wannis-SB »
It also turns out that resilience is a 3-way thing. There's resilience against melee, resilience against spells and resilience against ranged.
Don't over-trust Blizzard code. There is no known object that give resilience against only melee, only range or only magic. The three were most probably merged during the development of the statistics, and what you read in Blizz code is the leftover from the development version. Again, no known object (that I know of) has a resilience rating specific to a type of damage.
My code is different from yours on the following : instead of adding the statistic to the object, I transparently convert stats if needed. So if youre asking for the bonus of an item that has crit rating, you will get the crit rating, but if you ask for crit percentage, then you'll get the correct value.
The latest version of this mod is broken for calculating Critical Strike Rating. There are actually two different strings that should be looked for (thanks Blizzard).
The mod currently looks for (shown on set item bonuses):
{ pattern = "Increases your critical strike rating by (%d+)%.", effect = "CR_CRIT" },
The latest version of this mod is broken for calculating Critical Strike Rating. There are actually two different strings that should be looked for (thanks Blizzard).
The mod currently looks for (shown on set item bonuses):
{ pattern = "Increases your critical strike rating by (%d+)%.", effect = "CR_CRIT" },
The latest version of this mod is broken for calculating Critical Strike Rating. There are actually two different strings that should be looked for (thanks Blizzard).
The mod currently looks for (shown on set item bonuses):
{ pattern = "Increases your critical strike rating by (%d+)%.", effect = "CR_CRIT" },
hit rating also has another pattern I guess
{ pattern = "Improves hit rating by (%d+)%.", effect = "CR_HIT" },
I noticed this on an item anyway
Well have been trying to add theese damn patterns, and apparently they are not working, I would think they would work but instead i'm getting grey hair :<
Okay I redownloaded the itembonuslib and added theeese patterns again
- added by knarf
-- melee
{ pattern = "Improves hit rating by (%d+)%.", effect = "CR_HIT" },
{ pattern = "Improves critical strike rating by (%d+)%.", effect = "CR_CRIT" },
-- caster
{ pattern = "Improves spell critical strike rating by (%d+)%.", effect = "CR_SPELLCRIT" },
{ pattern = "(%d+)% Spell Critical strike rating", effect = "CR_SPELLCRIT" },
{ pattern = "Increases your spell penetration by (%d+)%.", effect = "SPELLPEN" },
{ pattern = "(%d+)% Spell Penetration", effect = "SPELLPEN" },
And now they work, kinda wierd, think I fucked up something regarding the embedded libs and such, anyhow the above patterns are not in the default version but i've found a couple of items that needs them :)
Another thing i'd like to ask is about gems, how is that comming along, because the socket bonus is not counted as of yet :)
I where wondering, could you get the item type also when you do a scanitemlink?
so you would know what slot the item fits into? or would I have to parse that myself? :P
I have also added a BASEARMOR rule that returns the armor value on an item since I need this for my addon (to calculate druid bear form armor) which needs to be separate from enchants/buffs and armor patches.
I welcome patches or code snippets to add this in the base version.
For BASEARMOR, if there's a reason to differentiate between base item armor and armor bonus given by enchantments, then it should be a different bonus name indeed.
I welcome patches or code snippets to add this in the base version.
For BASEARMOR, if there's a reason to differentiate between base item armor and armor bonus given by enchantments, then it should be a different bonus name indeed.
Correct me if I'm wrong, but the current library ONLY does enchantments and the like, but does not return a value for the armor. The reason I need this as a separate value is because Druid Dire Bear form only multiplies the armor value before enchants. So a cloak has 75 armor and a +120 armor enchant the bear form armor would be 75*5.5+120 (depending on talents). When I get home I'll post the snippets for the enUS localization.
Correct me if I'm wrong, but the current library ONLY does enchantments and the like, but does not return a value for the armor.
Maybe BonusScanner did, and so ItemBonusLib did too. I didn't pay enough attention to this before. But my opinion is that it should (and does in latest version, on french client). There is no distinction done between armor from enchant or from item yet. My idea was to :
remove "ARMOR" as a bonus in patterns.
add "BASEARMOR" as a pattern for normal armor from items.
add "BONUSARMOR" as a pattern for add armor from enchants.
provide an alias "ARMOR" = "BASEARMOR"+"BONUSARMOR", so that addons that were expecting this behavior (that is right now intented) still get it.
Hmm... using the latest Version (without my patterns), I get very strange results...
See for yourself:
/ibonus item [Moonglade Shoulders]
Those Shoulders got +88 Heal altogether.
Removing both Gem-Sockets (2 x 13 = 26) would give me 62.
Removing the Zul'Gurub Enchant (33) alone would give me 55.
No matter how many Bonus-Heal I remove from MY Calculation, I never get 59 Healing as a Result. ItemBonusLib DOES get 59 as Heal+ from those Shoulders...
It works, but only for the current level of the player. The code that is in ItemBonusLib is level independant, and should work (I borrowed it from RatingBuster).
Don't over-trust Blizzard code. There is no known object that give resilience against only melee, only range or only magic. The three were most probably merged during the development of the statistics, and what you read in Blizz code is the leftover from the development version. Again, no known object (that I know of) has a resilience rating specific to a type of damage.
My code is different from yours on the following : instead of adding the statistic to the object, I transparently convert stats if needed. So if youre asking for the bonus of an item that has crit rating, you will get the crit rating, but if you ask for crit percentage, then you'll get the correct value.
The mod currently looks for (shown on set item bonuses):
{ pattern = "Increases your critical strike rating by (%d+)%.", effect = "CR_CRIT" },
Items show this string for the Equip bonus:
{ pattern = "Improves critical strike rating by (%d+)%.", effect = "CR_CRIT" },
Once I added the above line, the bonuses showed up properly.
The same thing applies to Spell Critical Strike Rating:
{ pattern = "Improves spell critical strike rating by (%d+)%.", effect = "CR_SPELLCRIT" },
hit rating also has another pattern I guess
{ pattern = "Improves hit rating by (%d+)%.", effect = "CR_HIT" },
I noticed this on an item anyway
Well have been trying to add theese damn patterns, and apparently they are not working, I would think they would work but instead i'm getting grey hair :<
Any news on development Jerry?
- added by knarf
-- melee
{ pattern = "Improves hit rating by (%d+)%.", effect = "CR_HIT" },
{ pattern = "Improves critical strike rating by (%d+)%.", effect = "CR_CRIT" },
-- caster
{ pattern = "Improves spell critical strike rating by (%d+)%.", effect = "CR_SPELLCRIT" },
{ pattern = "(%d+)% Spell Critical strike rating", effect = "CR_SPELLCRIT" },
{ pattern = "Increases your spell penetration by (%d+)%.", effect = "SPELLPEN" },
{ pattern = "(%d+)% Spell Penetration", effect = "SPELLPEN" },
And now they work, kinda wierd, think I fucked up something regarding the embedded libs and such, anyhow the above patterns are not in the default version but i've found a couple of items that needs them :)
Another thing i'd like to ask is about gems, how is that comming along, because the socket bonus is not counted as of yet :)
so you would know what slot the item fits into? or would I have to parse that myself? :P
http://www.wowhead.com/?item=24073
This item exhibits the Critical Strike rating issue I described.
Added the missing pattern (sorry Razalduria, not yours yet) and support for the socket bonus.
Testing is encouraged.
First, I have had to add a rule for feral weapon skill:
http://wow.allakhazam.com/item.html?witem=31009;locale=enUS
I have only seen one item in the game that has hit avoidance:
http://www.thottbot.com/?i=58018
I have also added a BASEARMOR rule that returns the armor value on an item since I need this for my addon (to calculate druid bear form armor) which needs to be separate from enchants/buffs and armor patches.
For BASEARMOR, if there's a reason to differentiate between base item armor and armor bonus given by enchantments, then it should be a different bonus name indeed.
Correct me if I'm wrong, but the current library ONLY does enchantments and the like, but does not return a value for the armor. The reason I need this as a separate value is because Druid Dire Bear form only multiplies the armor value before enchants. So a cloak has 75 armor and a +120 armor enchant the bear form armor would be 75*5.5+120 (depending on talents). When I get home I'll post the snippets for the enUS localization.
Maybe BonusScanner did, and so ItemBonusLib did too. I didn't pay enough attention to this before. But my opinion is that it should (and does in latest version, on french client). There is no distinction done between armor from enchant or from item yet. My idea was to :
remove "ARMOR" as a bonus in patterns.
add "BASEARMOR" as a pattern for normal armor from items.
add "BONUSARMOR" as a pattern for add armor from enchants.
provide an alias "ARMOR" = "BASEARMOR"+"BONUSARMOR", so that addons that were expecting this behavior (that is right now intented) still get it.
See for yourself:
/ibonus item [Moonglade Shoulders]
Those Shoulders got +88 Heal altogether.
Removing both Gem-Sockets (2 x 13 = 26) would give me 62.
Removing the Zul'Gurub Enchant (33) alone would give me 55.
No matter how many Bonus-Heal I remove from MY Calculation, I never get 59 Healing as a Result. ItemBonusLib DOES get 59 as Heal+ from those Shoulders...
I see that gem bonus is not counted, sad...
Could you please try to do the following.
Go into Interface/Addons/ItemBonusLib/ItemBonusLib-1.0 and edit ItemBonusLib-1.0.lua.
replace the line 10 from
to
Then start wow, log on your druid, make sure the Moonglade Shoulders are NOT in your inventory and type :
/script AceLibrary("ItemBonusLib-1.0"):Reload()
then
/ibonus item [Moonglade Shoulders]
and post a screenshot of the result.
That would be very helpfull.
Thanks for the report anyway.
You mean lying in my bank instead? Or should I have it equipped?
humm... I meant not equipped, in your bag is just fine.
Sorry about the confusion.
ItemBonusLib doesn't seem to recognize the Healing on those shoulders, you're right...