@@ -51,7 +51,14 @@ class ContainerCalculation
|
|||||||
ContainerPrices calculate(Item[] items)
|
ContainerPrices calculate(Item[] items)
|
||||||
{
|
{
|
||||||
// Returns last calculation if inventory hasn't changed
|
// Returns last calculation if inventory hasn't changed
|
||||||
|
|
||||||
|
if (items == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
final int newHash = hashItems(items);
|
final int newHash = hashItems(items);
|
||||||
|
|
||||||
if (containerPrices != null && hash == newHash)
|
if (containerPrices != null && hash == newHash)
|
||||||
{
|
{
|
||||||
return containerPrices;
|
return containerPrices;
|
||||||
|
|||||||
Reference in New Issue
Block a user