Daladubz
November 26th, 2011, 20:55
Here's my bone burying for my Hyperion shouldn't be to hard to convert to other bases or finish.
package org.lucas.rs2.content.skills;
import java.util.HashMap;
import java.util.Map;
/**
* Handles all the bone data
* <Item ID, Experience>
*
* @version 1.0
*
* @author Vulcan <Lucas>
*/
public enum BoneEnum {
/**
* The normal bone
*/
NORMAL(526, 100),
;
/**
* The bone ID
*/
private int boneId;
/**
* The experience variable
*/
private double experience;
/**
* Maps the bone data
*/
private static Map<Integer, BoneEnum> bones = new HashMap<Integer, BoneEnum>();
/**
* Gets the bone by objectId
*
* @param object
* the objectID
*
* @return
* The bone
*/
public static BoneEnum forId(int object) {
return bones.get(object);
}
/**
* Populates the bone map
*/
static {
for (final BoneEnum bone : BoneEnum.values()) {
bones.put(bone.boneId, bone);
}
}
/**
* Represents the bone being buried
*
* @param boneId
* The bone id
*
* @param experience
* The experience gained
*/
BoneEnum(int boneId, int experience) {
this.boneId = boneId;
this.experience = experience;
}
/**
* Gets the bone ID
*
* @return
* The bone ID
*/
public int getBoneId() {
return boneId;
}
/**
* Gets the experience gained
*
* @return
* the experience gained
*/
public double getExperience() {
return experience;
}
}
package org.lucas.rs2.content.skills;
import java.util.HashMap;
import java.util.Map;
/**
* Handles all the bone data
* <Item ID, Experience>
*
* @version 1.0
*
* @author Vulcan <Lucas>
*/
public enum BoneEnum {
/**
* The normal bone
*/
NORMAL(526, 100),
;
/**
* The bone ID
*/
private int boneId;
/**
* The experience variable
*/
private double experience;
/**
* Maps the bone data
*/
private static Map<Integer, BoneEnum> bones = new HashMap<Integer, BoneEnum>();
/**
* Gets the bone by objectId
*
* @param object
* the objectID
*
* @return
* The bone
*/
public static BoneEnum forId(int object) {
return bones.get(object);
}
/**
* Populates the bone map
*/
static {
for (final BoneEnum bone : BoneEnum.values()) {
bones.put(bone.boneId, bone);
}
}
/**
* Represents the bone being buried
*
* @param boneId
* The bone id
*
* @param experience
* The experience gained
*/
BoneEnum(int boneId, int experience) {
this.boneId = boneId;
this.experience = experience;
}
/**
* Gets the bone ID
*
* @return
* The bone ID
*/
public int getBoneId() {
return boneId;
}
/**
* Gets the experience gained
*
* @return
* the experience gained
*/
public double getExperience() {
return experience;
}
}