Klasse Inventory

java.lang.Object
com.botwAdventureOnline.Inventory
Alle implementierten Schnittstellen:
Serializable

public class Inventory extends Object implements Serializable
Siehe auch:
  • Felddetails

    • equippedSword

      public Item equippedSword
      The currently equipped sword of the player
  • Konstruktordetails

    • Inventory

      public Inventory(int pMaxWeight)
      Parameter:
      pMaxWeight - The maximum weight of the player at the start of the game
  • Methodendetails

    • getPotions

      public ArrayList<Item> getPotions()
      Gibt zurück:
      Returns the Potions
    • getEquippedSword

      public Item getEquippedSword()
      Gibt zurück:
      Returns the equipped sword
    • setEquippedSword

      public void setEquippedSword(Item equippedSword)
      Sets the equipped sword of the player
      Parameter:
      equippedSword - The new equipped sword
    • addPotion

      public void addPotion(Item potion)
      Parameter:
      potion - The Potion that gets added to the player's potions
    • getSwords

      public ArrayList<Item> getSwords()
      Gibt zurück:
      returns the swords
    • addSword

      public void addSword(Item sword)
      Parameter:
      sword - The sword that gets added to the player's swords
    • getMaxWeight

      public int getMaxWeight()
      Gibt zurück:
      Returns the maximum weight of the inventory
    • getWeight

      public int getWeight()
      Gibt zurück:
      Returns the current weight of the inventory
    • getRupees

      public int getRupees()
      Gibt zurück:
      Returns the rupees of the player
    • setRupees

      public void setRupees(int pRupees)
      Parameter:
      pRupees - The new amount of rupees
    • setKorokSeeds

      public void setKorokSeeds(int korokSeeds)
      Parameter:
      korokSeeds - The new amount of korokseeds
    • getUsage

      public double getUsage()
      Gibt zurück:
      Returns the percentage of the weight's usage
    • getKorokSeeds

      public int getKorokSeeds()
      Gibt zurück:
      Returns the amount of korokseeds the player has
    • setMaxWeight

      public void setMaxWeight(int maxWeight)
      Parameter:
      maxWeight - The new maximum weight of the inventory
    • setWeight

      public void setWeight(int weight)
      Parameter:
      weight - The new current weight of the inventory
    • removePotion

      public void removePotion(Item item)
      Parameter:
      item - Potion that gets removed from the player's potions
    • removeSword

      public void removeSword(Item item)
      Parameter:
      item - Sword that gets removed from the player's swords
    • getItemCount

      public int getItemCount()
      Gibt zurück:
      Return the amount of potions and swords in total