1package com.runehive.util.parser.old;
3import com.google.gson.JsonObject;
4import com.runehive.game.world.items.ItemDefinition;
5import com.runehive.game.world.items.containers.equipment.EquipmentType;
6import com.runehive.util.parser.GsonParser;
17 super(
"def/equipment/equipment_definitions");
20 public static void main(String[] args) {
32 protected void parse(JsonObject data) {
33 int id = data.get(
"id").getAsInt();
37 String name = definition.
getName().toLowerCase();
38 if (name.startsWith(
"hood") || name.endsWith(
"hood")) {
40 }
else if (name.contains(
"full helm")) {
42 }
else if (name.contains(
"med helm")) {
44 }
else if (name.contains(
"helm")) {
45 if (name.startsWith(
"dharok")) {
106 if (second.equals(
"mitre") || second.equals(
"robe")) {
110 if (second.startsWith(
"plate") || second.startsWith(
"full") || second.startsWith(
"kite")) {
119 if (second.equals(
"mitre") || second.equals(
"robe")) {
123 if (second.startsWith(
"plate") || second.startsWith(
"full") || second.startsWith(
"kite")) {
152 if (second.equals(
"mitre") || second.equals(
"robe")) {
Represents all of an in-game Item's attributes.
static void dump(ItemDefinition[] definitions, String path)
static ItemDefinition[] create(String path)
static ItemDefinition get(int id)
Gets an item definition.
static GsonParser createParser()
String getName()
Gets the item name.
GsonParser(String path)
Creates a new GsonParser.
static int getReq(String first, String second, EquipmentType type)
void parse(JsonObject data)
The method allows a user to modify the data as its being parsed.
static void main(String[] args)
void initialize(int size)
EquipmentDefinitionParser()
void onEnd()
This method handles what happens after the parser has ended.
The enumerated types of a players equipped item slots.