Added new protection on TradeList.
This commit is contained in:
parent
173223bc61
commit
9867c4ee1c
@ -351,14 +351,13 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > item.getCount())
|
if ((count <= 0) || (count > item.getCount()))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.isStackable() && (count > 1))
|
if (!item.isStackable() && (count > 1))
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to add non-stackable item to TradeList with count > 1!");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,14 +363,13 @@ public class TradeList
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > item.getCount())
|
if ((count <= 0) || (count > item.getCount()))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.isStackable() && (count > 1))
|
if (!item.isStackable() && (count > 1))
|
||||||
{
|
{
|
||||||
LOGGER.warning(_owner.getName() + ": Attempt to add non-stackable item to TradeList with count > 1!");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user