RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SkillCape.java
1package com.osroyale.content.skillcape;
2
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.game.world.items.Item;
5
41
42public enum SkillCape {
43 ATTACK(9747, "Free access to Cyclops area found upstairs within the Warriors' Guild."),
44 DEFENCE(9753, "Act as a permanent Ring of Life."),
45 RANGED(9756, "Act as an Ava's accumulator."),
46 PRAYER(9759, "Provides double experience when training Prayer."),
47 MAGIC(9762, "Can cast spellbook swap 5 times per day."),
48 HITPOINTS(9768, "2x HP restore rate."),
49 AGILITY(9771, "Increased run energy restore rate."),
50 HERBLORE(9774, "Provides a chance to save ingredients."),
51 THIEVING(9777, "Better chance of succeeding when stealing from stalls."),
52 CRAFTING(9780, "Provides a chance to save materials."),
53 FLETCHING(9783, "Provides a chance to save materials."),
54 SLAYER(9786, "Can cancel up to 2 tasks per day."),
55 MINING(9792, "Provides a chance to receive double materials."),
56 SMITHING(9795, "Increases speed at which you smelt bars/forge items."),
57 COOKING(9801, "Impossible to burn any food."),
58 FIREMAKING(9804, "Provides a chance to save a log."),
59 WOODCUTTING(9807, "Provides a chance to receive double materials."),
60 FARMING(9810, "5% increased yield from herb patches.");
61
62 private final int itemId;
63 private final String description;
64
65 SkillCape(int itemId, String description) {
66 this.itemId = itemId;
67 this.description = description;
68 }
69
70 public static boolean isEquipped(Player player, SkillCape cape) {
71 final Item currentCape = player.equipment.getCape();
72 if (currentCape == null) {
73 return false;
74 }
75
76 // Max cape gives all perks.
77 if (currentCape.getId() == 13280) {
78 return true;
79 }
80
81 return currentCape.getId() == cape.getItemId() || currentCape.getId() == cape.getItemId() + 1;
82 }
83
84 private int getItemId() {
85 return itemId;
86 }
87
88 public String getDescription() {
89 return description;
90 }
91}