Fixed the demon will so that you can actually pick it up when you have no gem. Fix #587
This commit is contained in:
parent
d5670b5f0e
commit
a9dae1b0d4
2 changed files with 4 additions and 1 deletions
|
@ -46,6 +46,7 @@ public class PlayerDemonWillHandler
|
|||
{
|
||||
ItemStack[] inventory = player.inventory.mainInventory;
|
||||
|
||||
boolean hasGem = false;
|
||||
for (int i = 0; i < inventory.length; i++)
|
||||
{
|
||||
ItemStack stack = inventory[i];
|
||||
|
@ -53,6 +54,7 @@ public class PlayerDemonWillHandler
|
|||
{
|
||||
if (stack.getItem() instanceof IDemonWillGem)
|
||||
{
|
||||
hasGem = true;
|
||||
if (((IDemonWillGem) stack.getItem()).getWill(stack) < ((IDemonWillGem) stack.getItem()).getMaxWill(stack))
|
||||
{
|
||||
return false;
|
||||
|
@ -61,7 +63,7 @@ public class PlayerDemonWillHandler
|
|||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return hasGem;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue