Question about Item JSON Pulls

API Discussion
I was using the new API trying to look at the newer items and i noticed something that would indicate to me i am doing something wrong.. When I pull the the following item

Kromog's Brutal Fist

When i do Raid-Heroic i get the following Stats
containerSlots: 0,
weaponInfo: {
damage: {
min: 587,
max: 1093,
exactMin: 587,
exactMax: 1092
},
weaponSpeed: 2.6,
dps: 322.8846
},
inventoryType: 13,


and when i do Raid-Mythic
containerSlots: 0,
weaponInfo: {
damage: {
min: 587,
max: 1093,
exactMin: 587,
exactMax: 1092
},
weaponSpeed: 2.6,
dps: 322.8846
},
inventoryType: 13,


I get the exact same stats..

BUT If i do the armory

http://us.battle.net/wow/en/item/113927/raid-heroic

http://us.battle.net/wow/en/item/113927/raid-mythic

the weapon stats are different..

Are these stat changes based off the bonuslist and if so does anyone have a table of the bonuses or how do i pull bonus 567... Also when i do the following I get the exact same thing

https://us.api.battle.net/wow/item/113927/raid-heroic?bl=567,561&locale=en_US&apikey=

The code is the following which is the exact same... I am somewhat confused as to how the stats are modified

containerSlots: 0,
weaponInfo: {
damage: {
min: 587,
max: 1093,
exactMin: 587,
exactMax: 1092
},
weaponSpeed: 2.6,
dps: 322.8846
},
inventoryType: 13
I sound like a broken record, but you can use my library WarKit to solve this problem.
https://github.com/adraffy/warkit

I wrote a quick demo here:
https://github.com/adraffy/warkit/blob/master/src/com/antistupid/warkit/examples/BnetForum_KromogBrutalFist.java
[665] Kromog's Brutal Fist (Normal) => 587 - 1092
[680] Kromog's Brutal Fist (Heroic) => 676 - 1256
[695] Kromog's Brutal Fist (Mythic) => 777 - 1444

Here are the contexts provided by WarKit for item 113927: Kromog's Brutal Fist
ItemContext(raid-normal,ItemBonusCluster(Normal,0,0,null))
- (no item bonuses)

ItemContext(raid-normal,ItemBonusCluster(Warforged,6,0,null)
- ItemBonus<560>(+6i,+0r,null,Warforged,null,null)

ItemContext(raid-heroic,ItemBonusCluster(Heroic,15,0,null)
- ItemBonus<566>(+15i,+0r,null,Heroic,null,null)

ItemContext(raid-heroic,ItemBonusCluster(Heroic Warforged,21,0,null)
- ItemBonus<561>(+6i,+0r,null,Warforged,null,null)
- ItemBonus<566>(+15i,+0r,null,Heroic,null,null)

ItemContext(raid-mythic,ItemBonusCluster(Mythic,30,0,null)
- ItemBonus<567>(+30i,+0r,null,Mythic,null,null)

ItemContext(raid-mythic,ItemBonusCluster(Mythic Warforged,36,0,null)
- ItemBonus<562>(+6i,+0r,null,Warforged,null,null)
- ItemBonus<567>(+30i,+0r,null,Mythic,null,null)
https://github.com/adraffy/warkit/blob/master/src/com/antistupid/warkit/items/ItemContext.java
https://github.com/adraffy/warkit/blob/master/src/com/antistupid/warkit/items/ItemBonusCluster.java
https://github.com/adraffy/warkit/blob/master/src/com/antistupid/warkit/items/ItemBonus.java

Each ItemContext has a "context" eg. "raid-mythic", a default ItemBonusCluster, which corresponds to the ItemBonuses that are implied by that context, and an array of ItemBonusCluster's corresponding to the different possibilities (Tertiary Stats, Extra Sockets, etc.)

ItemBonusCluster intelligently "flattens" multiple ItemBonuses down to just a single object:
ItemContext(raid-mythic,ItemBonusCluster(Mythic Warforged,36)
- ItemBonus<562>(+6i,+0r,null,Warforged,null,null)
- ItemBonus<567>(+30i,+0r,null,Mythic,null,null)

"Warforged" (+6 ilvl) + "Mythic" (+30 ilvl)
==> "Mythic Warforged" (+36 ilvl)


In my demo, I set the context by name, but you could also just set this via bonuses:

Weapon w = ... // Kromog's Brutal Fist
Player p = new Player();
p.playerLevel = 100;
p.MH.setItem(w);

// method #1
p.MH.setContextIndex(w.findContext(x -> x.context.equals("raid-mythic")));

// method #2
p.MH.setItemBonuses(IntSet.fromUnsorted(562, 567));


Unfortunately, if you're curious what item bonuses actually exist, I don't expose the universe of all item bonuses directly (I'll add this in the next update.) You can create this list pretty easily however: just loop through every wearable item in WarKit and collect all of the item bonuses inside the contexts and suffixes.
I downloaded your Warkit and tried running the jar file but i keep getting an error message saying it cant run the file... I believe it is an issue with Mac OS 10.10 and Java 8 r25.. Since there are other Jar files i cannot run.. I would love to use it because it would save me an extraordinary amount of time since i am finding i have to build these tables one by one in my database.
Oh, you can't run WarKit directly, I don't include a valid manifest, but you can include it in another project (with a proper main() function) and everything should work properly.

I updated the latest alpha to make sure it's valid for Yosemite and included the example I coded above.
https://github.com/adraffy/warkit/releases/tag/1.0-alpha-3

Following the instructions listed, you should be able to run the demo I posted above using the following command with WarKit.jar and WKDB.dat in the same directory:java -cp WarKit.jar com/antistupid/warkit/examples/BnetForum_KromogBrutalFist

Join the Conversation

Return to Forum