Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server.game.content.skills.fishing;
- import java.util.EnumSet;
- import java.util.HashMap;
- import java.util.Map;
- import java.util.Set;
- import server.game.player.Player;
- /**
- * The data for fishing.
- *
- * @author Dj
- */
- public enum FishingData {
- SPOT_1(1521, 1, 317, 321, 1, 15, 303, 621, -1, false, false, 10, 40), //Shrimps and Anchovies
- SPOT_1_1(1521, 2, 327, 345, 5, 10, 307, 623, 313, true, true, 20, 30), //Sardine and Herring
- SPOT_2(1519, 1, 377, -1, 40, -1, 301, 619, -1, false, false, 90, -1), //Lobster
- SPOT_2_1(1519, 2, 359, 371, 35, 50, 311, 618, -1, false, false, 80, 100), //Tuna and Swordfish
- SPOT_3(1520, 1, 353, 341, 16, 23, 305, 620, -1, true, false, 20, 45), //Mackerel and Cod
- SPOT_3_1(1520, 2, 383, -1, 76, -1, 311, 618, -1, false, false, 110, 0), //Shark
- SPOT_4(1526, 1, 335, 331, 20, 30, 309, 622, 314, true, true, 50, 70), //Trout and Salmon
- SPOT_4_1(1526, 2, 389, -1, 81, -1, 303, 620, -1, false, false, 46, -1), //Manta Ray
- SPOT_5(635, 1, 3142, -1, 65, -1, 303, 620, -1, false, false, 105, -1); //Karambwan
- private int spotId; //The fishing spot at which you fish at.
- private int spotOption; //The option selected.
- private int fishId; //The first fish ID (the main fish).
- private int secondFishId; //If a second fish is available at a spot, what is the ID of that fish.
- private int levelRequired; //The level required to catch the first fish.
- private int secondLevelRequired; //The level required to catch the second fish.
- private int tool; //The equipment that needs to be used to fish.
- private int animation; //The animation performed when fishing at the spot.
- private int baitUsed; //The bait which will be used if required.
- private boolean secondFish; //Is a second fish available?
- private boolean baitRequired; //Is bait required?
- private double firstFishExperience; //The experience gained from the first fish.
- private double secondFishExperience; //The experience gained from the second fish.
- FishingData(int spotId, int spotOption, int fishId, int secondFishId, int levelRequired, int secondLevelRequired, int tool, int animation, int baitUsed, boolean secondFish, boolean baitRequired, double firstFishExperience, double secondFishExperience)
- {
- this.spotId = spotId;
- this.spotOption = spotOption;
- this.fishId = fishId;
- this.secondFishId = secondFishId;
- this.levelRequired = levelRequired;
- this.secondLevelRequired = secondLevelRequired;
- this.tool = tool;
- this.animation = animation;
- this.baitUsed = baitUsed;
- this.secondFish = secondFish;
- this.baitRequired = baitRequired;
- this.firstFishExperience = firstFishExperience;
- this.secondFishExperience = secondFishExperience;
- }
- private static Map<Integer, FishingData> fishingData = new HashMap<Integer, FishingData>();
- private static Set<FishingData> enumSet = EnumSet.allOf(FishingData.class);
- public int getSpotId() {
- return spotId;
- }
- public int getFishId() {
- return fishId;
- }
- public int getSecondFishId() {
- return secondFishId;
- }
- public int getLevelRequired() {
- return levelRequired;
- }
- public int getSecondLevelRequired() {
- return secondLevelRequired;
- }
- public int getToolId() {
- return tool;
- }
- public int getAnimation() {
- return animation;
- }
- public int getBaitUsed() {
- return baitUsed;
- }
- public boolean isSecondFishAvailable() {
- return secondFish;
- }
- public boolean isBaitRequired() {
- return baitRequired;
- }
- public double getFirstExperience() {
- return firstFishExperience;
- }
- public double getSecondExperience() {
- return secondFishExperience;
- }
- public static FishingData forId(int id) {
- if (fishingData.containsKey(id)) {
- return fishingData.get(id);
- }
- for (FishingData data : enumSet) {
- fishingData.put(data.getSpotId(), data);
- }
- return fishingData.get(id);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement