RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
ItemActionRepository.java
1package com.osroyale.content.itemaction;
2
3import com.osroyale.content.itemaction.impl.*;
4import com.osroyale.game.world.entity.mob.player.Player;
5import com.osroyale.game.world.items.Item;
6
7import java.util.HashMap;
8
44
46
48 public static HashMap<Integer, ItemAction> ACTIONS = new HashMap<>();
49
51 public static void declare() {
52 ACTIONS.put(12_931, new SerpentineHelm()); // charged
53 ACTIONS.put(12_929, new SerpentineHelm()); // uncharged
54
55 ACTIONS.put(13_196, new TanzaniteHelm()); // charged
56 ACTIONS.put(13_197, new TanzaniteHelm()); // uncharged
57
58 ACTIONS.put(13_198, new MagmaHelm()); // charged
59 ACTIONS.put(13_199, new MagmaHelm()); // uncharged
60
61 ACTIONS.put(11283, new DragonfireShield()); // charged
62 ACTIONS.put(11284, new DragonfireShield()); // uncharged
63
64 ACTIONS.put(12924, new ToxicBlowpipe()); // uncharged
65 ACTIONS.put(12926, new ToxicBlowpipe()); // charged
66
67 ACTIONS.put(11907, new TridentOfTheSeas()); // charged
68 ACTIONS.put(12899, new TridentOfTheSwamp()); // charged
69
70
71 ACTIONS.put((int) CrawsBow.CRAWS_UNCHARGED_ID, new CrawsBow()); // uncharged
72 ACTIONS.put((int) CrawsBow.CRAWS_CHARGED_ID, new CrawsBow()); // charged
73
74 ACTIONS.put((int) ViggorasChainmace.VIGGORAS_CHAINMACE_UNCHARGED_ID, new ViggorasChainmace()); // uncharged
75 ACTIONS.put((int) ViggorasChainmace.VIGGORAS_CHAINMACE_CHARGED_ID, new ViggorasChainmace()); // charged
76
77 ACTIONS.put((int) ThammaronsSceptre.THAMMARONS_SCEPTRE_UNCHARGED_ID, new ThammaronsSceptre()); // uncharged
78 ACTIONS.put((int) ThammaronsSceptre.THAMMARONS_SCEPTRE_CHARGED_ID, new ThammaronsSceptre()); // charged
79
80 ACTIONS.put((int) CelestialRing.UNCHARGED_RING, new CelestialRing()); // uncharged
81 ACTIONS.put((int) CelestialRing.CHARGED_RING, new CelestialRing()); // charged
82
83 ACTIONS.put(6831, new MimeBox());
84 ACTIONS.put(6832, new DrillDemonBox());
85 ACTIONS.put(12897, new ClanShowcaseBox());
86 ACTIONS.put(6854, new ClanResourceBox());
87
88// ACTIONS.put(1704, new AmuletOfGlory());
89// ACTIONS.put(1706, new AmuletOfGlory());
90// ACTIONS.put(1708, new AmuletOfGlory());
91// ACTIONS.put(1710, new AmuletOfGlory());
92// ACTIONS.put(1712, new AmuletOfGlory());
93// ACTIONS.put(1714, new AmuletOfGlory());
94// ACTIONS.put(11978, new AmuletOfGlory());
95// ACTIONS.put(11978, new AmuletOfGlory());
96// ACTIONS.put(2566, new RingOfDueling());
97// ACTIONS.put(2564, new RingOfDueling());
98// ACTIONS.put(2562, new RingOfDueling());
99// ACTIONS.put(2560, new RingOfDueling());
100// ACTIONS.put(2558, new RingOfDueling());
101// ACTIONS.put(2556, new RingOfDueling());
102// ACTIONS.put(2554, new RingOfDueling());
103// ACTIONS.put(2552, new RingOfDueling());
104 }
105
106 public static boolean itemOnItem(Player player, Item first, Item second) {
107 ItemAction action = ACTIONS.getOrDefault(first.getId(), ACTIONS.get(second.getId()));
108 return action != null && action.itemOnItem(player, first, second);
109 }
110
111 public static boolean inventory(Player player, Item item, int opcode) {
112 ItemAction action = ACTIONS.get(item.getId());
113 return action != null && action.inventory(player, item, opcode);
114 }
115
116 public static boolean equipment(Player player, Item item, int opcode) {
117 ItemAction action = ACTIONS.get(item.getId());
118 return action != null && action.equipment(player, item, opcode);
119 }
120
121 public static boolean drop(Player player, Item item) {
122 ItemAction action = ACTIONS.get(item.getId());
123 return action != null && action.drop(player, item);
124 }
125}
boolean inventory(Player player, Item item, int opcode)