Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
I currently got some free time to play around with the Diablo 3 Web API. It is awesome, thank you Blizzard for giving this to the community! I got an idea last night and implemented it for Patrik's weapon comparison tool.
You can visit the enhanced version of Patrik's weapon comparison tool that uses the Web API here - http://www.bookstur.com/d3/calculator.html
The original version of Patrik's weapon comparison tool is available here -
Instead of a user having to manually get their stats for their hero, they can simply enter their BattleTag and you can get the heroes stats (Str, Dex, Int / Crit Chance / Crit Damage) and auto fill the calculator form with the data for that hero. Diablo 3 Web API works great with Patrik's weapon comparison tool.
I added functionality to the calculator that allows you to input your BattleTag and then you can get a list of heroes to choose from. You choose a hero and from there I make 3 more ajax calls, one to get the primary stats for your hero, and then ajax to get the stats from your heroes main hand and off hand weapons. I deduct the primary stat bonus and crit damage bonus on your main hand and off hand weapon. After all this I then auto fill out the weapon calculator form with the given data for a chosen hero. From here you can fill in the data for the weapons and calculate the difference.
I am currently working on auto selecting the class buff select listbox below crit damage after selecting one of your heroes. I just need to parse the JSON and see if the class selected has the passive buff.
I want to note one thing that may help future developers - I wasted 20 minutes trying to figure out why I couldn't get a JSON response using jQuery $.ajax If you encounter a cross origin policy problem it is because you need to request JSONP like this -
I would really appreciate any suggestions or comments.
Now when you select one of your heroes the class buff select listbox below crit damage will be automatically set to yes or no depending on your heroes passive skill.
Thank you for pointing out this problem... It has been a long time since I have checked this thread :~o
I have fixed the app to allow you to choose between US and Europe region.
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.