Class ChargeItem

java.lang.Object
org.rspeer.game.service.telemetry.model.item.ChargeItem
Direct Known Subclasses:
AmuletOfBloodFury, Arclight, CrystalArmor, DartBlowpipe, EyeOfAyak, IbansStaff, MoonsOfPerilItem, QuetzalWhistle, RevenantItem, RingOfEndurance, RingOfSuffering, SanguinestiStaff, ScytheOfVitur, SerpentineHelm, TomeOfEarth, TomeOfFire, TomeOfWater, ToxicBlowpipe, TridentOfTheSeas, TridentOfTheSwamp, TumekensShadow, VenatorBow, WarpedSceptre

public abstract class ChargeItem extends Object
  • Constructor Details

  • Method Details

    • getChargeParameters

      public ChargeParameters getChargeParameters()
      Returns:
      The charge parameters defined for this item
    • getLastUpdateTick

      public int getLastUpdateTick()
      Returns:
      The tick at which this was last updated, relative to Game.getTickCount()
    • getRemainingCharges

      public abstract int getRemainingCharges()
      Returns:
      The number of remaining charges. For items like blowpipe this will only return the primary charge (scales)
    • resetCharges

      public abstract void resetCharges()
      Resets charges to 0. For items like blowpipe this will also reset darts
    • isTracked

      public boolean isTracked()
      Returns:
      true if this item has ever had its charges updated. It will hold true after the first check
    • isCheckRequired

      public boolean isCheckRequired(int ticks)
    • getKey

      public abstract String getKey()
      Returns:
      an identifier for this item
    • onObservation

      public abstract void onObservation(ChargeObservation observation)
      Parameters:
      observation - Triggers an observation sequence for this item
    • getInterchangeableItem

      public abstract InterchangeableItem getInterchangeableItem()
      Returns:
      The InterchangeableItem associated with this item
    • getChargedIds

      public int[] getChargedIds()
      Returns:
      The charged item ids used to identify whether this item is currently worn or carried.
    • getUnchargedIds

      public abstract int[] getUnchargedIds()
      Returns:
      The uncharged item ids
    • getRechargeMaterials

      public abstract List<ItemEntry> getRechargeMaterials()
      Returns:
      A List of ItemEntry relative to getChargeParameters()
    • getItem

      public Item getItem(Inventory inventory)
      Parameters:
      inventory - The inventory to get the item for
      Returns:
      The first occurence of this charge item in the given inventory
    • getWornElseCarried

      public Item getWornElseCarried()
    • setLastUpdateTick

      public void setLastUpdateTick(int lastUpdateTick)