Item Upgrade API Changes

100 Night Elf Druid
13235
12/17/2012 08:13 PMPosted by Peratryn
I will look at this tomorrow morning, but let me make sure I understand correctly. You just want unrounded min/max numbers exposed, and then for us to use those values when calculating dps correct? (I'm not going to remove DPS from the api, but making it more correct is fine).


Yes, exactly. If the Min/Max can be exposed as floating-point/decimal, that would be perfect! The DPS is fine (it's just currently derived from the two integers, rather than from item level, making it also incorrect.)

Thank you for the quick reply!
Reply Quote
90 Orc Warrior
14960
Much appreciated.

I'm sure that (since there are thousands of items) getting all the details straight must take a lot of babysitting for the system to be viable and error-free for all possible items.

Just to be sure, I hope that the old TooltipParams for gems and reforging will stay the same? For example, Haste reforged to Hit had a code of 151. And there were gemslot and equipped gem codes as well. Are those changed?
Reply Quote
Battle.net Developer
Much appreciated.

I'm sure that (since there are thousands of items) getting all the details straight must take a lot of babysitting for the system to be viable and error-free for all possible items.

Just to be sure, I hope that the old TooltipParams for gems and reforging will stay the same? For example, Haste reforged to Hit had a code of 151. And there were gemslot and equipped gem codes as well. Are those changed?


Those should not be affected in any way.
Reply Quote
85 Worgen Druid
6935
This is great news! So far we have only encountered one issue: items that are both upgraded and have a random suffix, e.g. this player's belt:

http://us.battle.net/wow/en/character/nordrassil/Kalakakin/simple

The tooltip on battle.net is showing the non-upgraded stats, and the API is returning blank stats, so we have no good way to determine the final stats for these items. Any help would be appreciated!
Reply Quote
90 Orc Warrior
14960
"name":"HelmetofResoundingRings",
"icon":"inv_helm_plate_raidwarrior_l_01",
"quality":4,
"itemLevel":509,
"tooltipParams":{
"gem0":76886,
"gem1":76641,
"set":[
87192,
87193,
87195,
87194
],
"reforge":137,
"transmogItem":50712,
"upgrade":{
"current":0,
"total":2,
"itemLevelIncrement":0
}
},
"stats":[
{
"stat":49,
"amount":760,
"reforged":false
},
{
"stat":4,
"amount":1140,
"reforged":false
},
{
"stat":31,
"amount":504,
"reforged":false
},
{
"stat":7,
"amount":2071,
"reforged":false
}
],
"armor":4671
},

Under "stat":31 key the "reforged":false should say true, as I have reforged some hit out of my helm.

Could it be a small bug? I'm not sure what this key's purpose is as there is already a reforge code in the TooltipParams.
Reply Quote
100 Night Elf Druid
13235
12/17/2012 10:26 PMPosted by Edgy
I will look at this tomorrow morning, but let me make sure I understand correctly. You just want unrounded min/max numbers exposed, and then for us to use those values when calculating dps correct? (I'm not going to remove DPS from the api, but making it more correct is fine).

Yes, exactly. If the Min/Max can be exposed as floating-point/decimal, that would be perfect! The DPS is fine (it's just currently derived from the two integers, rather than from item level, making it also incorrect.)
Thank you for the quick reply!


That was quick! DPS seems to be exact now, following directly from the item level budget and matches what I computed in http://us.battle.net/wow/en/forum/topic/7393669846

The exactMax however appears to be rounded. Possibly this could be fixed?


Under "stat":31 key the "reforged":false should say true, as I have reforged some hit out of my helm.
Could it be a small bug? I'm not sure what this key's purpose is as there is already a reforge code in the TooltipParams.


I believe that "reforge" is just unnecessary output from the item/stats API and should be ignored (the same reforge field is visible there as well.) You still need to use the tooltipParams reforge code to apply the proper reforging.
Reply Quote
10 Human Mage
20
Thanks for making this available guys, really appreciate the effort
Reply Quote
2 Tauren Druid
0
Greetings

Thanks for adding the item upgrade information. There is a little issue where the reforged to stat is not showing while the reforged from stat is showing with the reduced number. I was testing it for my own character with URL:
http://eu.battle.net/wow/en/character/kazzak/Grendiser/advanced
API call I used:
http://eu.battle.net/api/wow/character/kazzak/Grendiser?fields=items&locale=en_GB

My weapon Gao-Rei, Staff of the Legendary Protector has Mastery Reforged to Crit

The stats returned for the weapon are:

"stats":[{"stat":49,"amount":456,"reforged":false},{"stat":3,"amount":1167,"reforged":false},{"stat":7,"amount":1751,"reforged":false},{"stat":37,"amount":790,"reforged":false}]

The item has 759 Mastery before reforging. And 303 Crit and 456 mastery after reforging. The data is API is returning only the 456 mastery without the 303 Crit.

Expected output should be:
"stats":[{"stat":49,"amount":456,"reforged":false},{"stat":3,"amount":1167,"reforged":false},{"stat":7,"amount":1751,"reforged":false},{"stat":37,"amount":790,"reforged":false},{"stat":32,"amount":303,"reforged":true}]
Reply Quote
90 Orc Warrior
14960
Let's take a look at Battleplate of Resounding Rings 509 upgrade 2/2, for example.

Here are the Item's secondary stats:

Crit 978
Haste 784

If the chest is reforged using the haste, you will get

Crit 978
Haste 471
other 313

If you load an API with the chest reforged, it will show this:

item.chest.stats.2.amount = 471
item.chest.stats.2.reforged = false
item.chest.stats.2.stat = 36

..meaning you could know that the item has 471 haste, but have no idea how much the original stat pool is. If you try to reverse engineer the original stat pool by doing 471/(1-0.4) you get 785 instead of 784 which is incorrect, since the reforged pool is actually truncated down from a decimal that would have rounded up (313.6)

A pool of 471 could come from either the original pool being 785 or 784. like so:

785 - INT(785*.4) = 785 - 314 = 471
784 - INT(784*.4) = 784 - 313 = 471

So, there's no way reasonably to know that the upgraded item actually had 785 or 784 originally, per the API. As far as I know, there's no way in number theory to reverse the trancation.
Edited by Landsoul on 12/31/2012 3:36 PM PST
Reply Quote
Battle.net Developer
Thanks for finding these problems!

Indeed we aren't showing the reforged stat in the list of stats which I will fix. This stat will have "reforged: true" (this field was originally just for whether or not to color the stat green). I'm going to remove the reforged field from the output if it's false (just for clarity).

On the stat that has it's value decreased, I'm going to add the amount of the decrease in a "reforgedAmount" stat.

For example: on the chestplate that Landsoul is talking about, the reforged field will not be there on stat 36, but there WILL be a "reforgedAmount: -313" field. The other stat will also show up with an "amount: 313" and a "reforged: true" field. Here is an example:

"stats":[{"stat":32,"amount":978},{"stat":4,"amount":1315},{"stat":36,"amount":471,"reforgedAmount":-313},{"stat":7,"amount":2232},{"stat":49,"amount":313,"reforged":true}]
Hopefully this fixes these issues. I'm hoping to deploy this tomorrow but other things may get in the way of that.
Edited by Peratryn on 1/2/2013 4:24 PM PST
Reply Quote
Battle.net Developer
12/18/2012 01:40 PMPosted by Edgy
The exactMax however appears to be rounded. Possibly this could be fixed?


This value is floored in the wow code when computing max weapon dps, so this should be the actual value used when doing all calculations. If you find discrepancies in numbers that you see in game due to this let me know.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]