Atavism Version 2018.1AGIS API

atavism.agis.objects
Class InventoryInfo

java.lang.Object
  extended by atavism.server.objects.NamedPropertyClass
      extended by atavism.server.objects.Entity
          extended by atavism.agis.objects.InventoryInfo
All Implemented Interfaces:
java.io.Serializable

public class InventoryInfo
extends Entity

Information related to the inventory system. Any object that wants to carry items or currency requires one of these.

See Also:
Serialized Form

Field Summary
protected  int currentCategory
           
 
Fields inherited from class atavism.server.objects.Entity
log, staticLock, subObjectNamespacesInt, transientPropertyKeys, type
 
Fields inherited from class atavism.server.objects.NamedPropertyClass
lock, name
 
Constructor Summary
InventoryInfo()
           
InventoryInfo(OID objOid)
           
 
Method Summary
 void addCurrency(int currencyID, int amount)
           
 void addMail(Mail m)
           
 void addStorageBag(java.lang.String key, OID bagOid)
           
 boolean alterCurrencyAmount(int currencyID, int delta)
          Alters the amount of the specified currency the player by the specified amount.
 boolean categoryUpdated(int category)
           
 java.lang.String getActiveStorage()
           
 OID getActiveStorageBag()
           
 OID[] getBags()
           
 OID[] getBags(int category)
           
 java.util.HashMap<java.lang.Integer,OID[]> getBagsMap()
           
 java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.lang.Integer>> getCurrencies()
           
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getCurrencies(int category)
           
 int getCurrencyAmount(int currencyID, boolean includeConversions)
           
 int getCurrentCategory()
          Category control Each category has its own collection of items.
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getCurrentCurrencies()
           
 OID getEquipmentItemBag()
           
 OID getEquippedItemsBag(int category)
           
 java.util.HashMap<java.lang.Integer,OID> getEquippedItemsBagMap()
           
 int getID()
           
 java.util.ArrayList<Mail> getMail()
           
 OID getStorageBag(java.lang.String key)
           
 java.util.HashMap<java.lang.String,OID> getStorageBags()
           
 java.util.HashMap<java.lang.String,OID> getStorageBags(int category)
           
 java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,OID>> getStorageBagsMap()
           
 ObjectType getType()
          Entity object type.
 void removeCurrency(int currencyID)
           
 void setActiveStorage(java.lang.String storageName)
           
 void setBags(OID[] bags)
           
 void setBagsMap(java.util.HashMap<java.lang.Integer,OID[]> rootBags)
           
 void setCurrencies(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.lang.Integer>> currencies)
           
 void setCurrentCategory(int category)
           
 void setCurrentCurrencies(java.util.HashMap<java.lang.Integer,java.lang.Integer> currencies)
           
 void setEquipmentItemBag(OID bag)
           
 void setEquippedItemsBagMap(java.util.HashMap<java.lang.Integer,OID> rootBags)
           
 void setID(int id)
           
 void setMail(java.util.ArrayList<Mail> mail)
           
 void setStorageBags(java.util.HashMap<java.lang.String,OID> bags)
           
 void setStorageBagsMap(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,OID>> rootBags)
           
 java.lang.String toString()
          Returns the string describing this entity, useful for logging.
 
Methods inherited from class atavism.server.objects.Entity
addSubObjectNamespace, equals, equals, getLock, getNamespace, getOid, getPersistenceFlag, getProperty, getSubObjectNamespaces, getSubObjectNamespacesInt, getTransientDataRef, hashCode, hasSubObjectNamespace, isDeleted, registerTransientPropertyKey, removeProperty, removeSubObjectNamespace, setDeleted, setNamespace, setOid, setPersistenceFlag, setProperty, setSubObjectNamespaces, setSubObjectNamespacesInt, setType, toBytes, unregisterTransientPropertyKey
 
Methods inherited from class atavism.server.objects.NamedPropertyClass
getBooleanProperty, getIntProperty, getName, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setPropertyMap, setupTransient, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

currentCategory

protected int currentCategory
Constructor Detail

InventoryInfo

public InventoryInfo()

InventoryInfo

public InventoryInfo(OID objOid)
Method Detail

toString

public java.lang.String toString()
Description copied from class: Entity
Returns the string describing this entity, useful for logging.

Overrides:
toString in class Entity
Returns:
string describing entity

getType

public ObjectType getType()
Description copied from class: Entity
Entity object type.

Overrides:
getType in class Entity
Returns:
ObjectTypes.unknown if no object type has been set.

getID

public int getID()

setID

public void setID(int id)

getCurrentCategory

public int getCurrentCategory()
Category control Each category has its own collection of items.


setCurrentCategory

public void setCurrentCategory(int category)

categoryUpdated

public boolean categoryUpdated(int category)

getCurrencyAmount

public int getCurrencyAmount(int currencyID,
                             boolean includeConversions)

alterCurrencyAmount

public boolean alterCurrencyAmount(int currencyID,
                                   int delta)
Alters the amount of the specified currency the player by the specified amount. Due to the use of subCurrencies this may alter more than one currency.

Parameters:
currencyID -
delta -

addCurrency

public void addCurrency(int currencyID,
                        int amount)

removeCurrency

public void removeCurrency(int currencyID)

getCurrentCurrencies

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getCurrentCurrencies()

setCurrentCurrencies

public void setCurrentCurrencies(java.util.HashMap<java.lang.Integer,java.lang.Integer> currencies)

getCurrencies

public java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.lang.Integer>> getCurrencies()

setCurrencies

public void setCurrencies(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.lang.Integer>> currencies)

getCurrencies

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getCurrencies(int category)

getBags

public OID[] getBags()

setBags

public void setBags(OID[] bags)

getBagsMap

public java.util.HashMap<java.lang.Integer,OID[]> getBagsMap()

setBagsMap

public void setBagsMap(java.util.HashMap<java.lang.Integer,OID[]> rootBags)

getBags

public OID[] getBags(int category)

getEquipmentItemBag

public OID getEquipmentItemBag()

setEquipmentItemBag

public void setEquipmentItemBag(OID bag)

getEquippedItemsBagMap

public java.util.HashMap<java.lang.Integer,OID> getEquippedItemsBagMap()

setEquippedItemsBagMap

public void setEquippedItemsBagMap(java.util.HashMap<java.lang.Integer,OID> rootBags)

getEquippedItemsBag

public OID getEquippedItemsBag(int category)

getActiveStorageBag

public OID getActiveStorageBag()

getStorageBag

public OID getStorageBag(java.lang.String key)

addStorageBag

public void addStorageBag(java.lang.String key,
                          OID bagOid)

getStorageBags

public java.util.HashMap<java.lang.String,OID> getStorageBags()

setStorageBags

public void setStorageBags(java.util.HashMap<java.lang.String,OID> bags)

getStorageBagsMap

public java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,OID>> getStorageBagsMap()

setStorageBagsMap

public void setStorageBagsMap(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,OID>> rootBags)

getStorageBags

public java.util.HashMap<java.lang.String,OID> getStorageBags(int category)

getActiveStorage

public java.lang.String getActiveStorage()

setActiveStorage

public void setActiveStorage(java.lang.String storageName)

addMail

public void addMail(Mail m)

getMail

public java.util.ArrayList<Mail> getMail()

setMail

public void setMail(java.util.ArrayList<Mail> mail)


Copyright © 2018 Dragonsan Studios Sp. z o.o.