Package ca.wowapi.entities

Examples of ca.wowapi.entities.ItemSpell


        ArrayList<ItemSpell> itemSpells = new ArrayList<ItemSpell>();
        JSONArray spellArray = jsonobject.getJSONArray("itemSpells");
        for (int i = 0; i < spellArray.length(); i++) {

          JSONObject itemSpellObj = spellArray.getJSONObject(i);
          ItemSpell itemSpell = new ItemSpell();
          itemSpell.setSpellId(itemSpellObj.getInt("spellId"));

          JSONObject spellObj = itemSpellObj.getJSONObject("spell");
          Spell spell = new Spell();
          spell.setId(spellObj.getInt("id"));
          spell.setName(spellObj.getString("name"));
          spell.setDescription(spellObj.getString("description"));
          spell.setCastTime(spellObj.getString("castTime"));

          itemSpell.setSpell(spell);
          itemSpell.setnCharges(itemSpellObj.getInt("nCharges"));
          itemSpell.setConsumable(itemSpellObj.getBoolean("consumable"));
          itemSpell.setCategoryId(itemSpellObj.getInt("categoryId"));

          itemSpells.add(itemSpell);
        }

        item.setItemSpells(itemSpells);
View Full Code Here

TOP

Related Classes of ca.wowapi.entities.ItemSpell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.