1package com.runehive.content.itemaction.impl;
3import com.runehive.content.itemaction.ItemAction;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.items.Item;
6import com.runehive.net.packet.out.SendInputAmount;
7import com.runehive.util.Utility;
17 return "Celestial ring";
77 player.celestialRingCharges = 0;
99 player.celestialRingCharges += amount;
100 player.
message(
"You added " + amount +
" charges to your "+
name()+
"");
Handles executing an item action.
boolean equipment(Player player, Item item, int opcode)
boolean inventory(Player player, Item item, int opcode)
The execution method of the action.
static final short STARDUST
boolean itemOnItem(Player player, Item first, Item second)
String name()
The name of the action.
void charge(Player player, int amount, int itemId)
static void check(Player player)
static final short CHARGED_RING
static final short UNCHARGED_RING
boolean drop(Player player, Item item)
This class represents a character controlled by a player.
final Inventory inventory
void message(String message)
final Equipment equipment
void send(OutgoingPacket encoder)
The container class that represents an item that can be interacted with.
final int getId()
Gets the identification of this item.
final int computeAmountForId(int id)
Computes the total quantity of the Items in this container with id.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean add(Item item)
Attempts to deposit item into this container.
void refresh()
Refreshes the players inventory.
Handles miscellaneous methods.
static String formatDigits(final int amount)
Formats digits for integers.