bank: null check items
This commit is contained in:
@@ -51,7 +51,14 @@ class ContainerCalculation
|
||||
ContainerPrices calculate(Item[] items)
|
||||
{
|
||||
// Returns last calculation if inventory hasn't changed
|
||||
|
||||
if (items == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final int newHash = hashItems(items);
|
||||
|
||||
if (containerPrices != null && hash == newHash)
|
||||
{
|
||||
return containerPrices;
|
||||
@@ -86,7 +93,7 @@ class ContainerCalculation
|
||||
final long storePrice = itemManager.getItemDefinition(id).getPrice();
|
||||
final long alchPrice = (long) (storePrice * Constants.HIGH_ALCHEMY_MULTIPLIER);
|
||||
alch += alchPrice * qty;
|
||||
ge += itemManager.getItemPrice(id) * qty;
|
||||
ge += (long) itemManager.getItemPrice(id) * qty;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user