Currency/Dungeon-Specific Items
No you can’t right now as the items API does not provide such information. I have suggested a more generic solution before:
We can include all the other currencies in the game besides just GoldCost and KarmaCost in a similar way.
Yeah, only if half our suggestions were indeed implemented! The way I see it, to get the Citadel of Flame items, I’d have to get all the items from items.json and their details through item_details.json and find the specific ones I need, add their item_id to an array, and only fetch those from the items.json file the next time.
Unless anyone has a better workaround?
Edit: Oh, and I would have to hard-code the currency needed for each item. Which we all know is the number one “don’t” when it comes to application development.
Cheers.
Unless anyone has a better workaround?
Edit: Oh, and I would have to hard-code the currency needed for each item. Which we all know is the number one “don’t” when it comes to application development.
What you can do is to create a JSON file that has that information, then read it in with your app.
Pros: You still have the separation between your code and data. You only need to update your JSON file when the game changes.
Cons: You need to maintain your own JSON file. Coming up with your own database is a pain.
This is what I’m building: http://www.reddit.com/r/Guildwars2/comments/1ohp10/im_building_a_dungeon_item_and_currency_tool/
Already figured out how to do most stuff and I’ve started development. Hopefully I’ll have a working version soon!