Enable items on pet inventory.

This commit is contained in:
MobiusDevelopment
2019-03-17 01:09:32 +00:00
parent 0236115b50
commit fa7142dee2
11 changed files with 209 additions and 132 deletions

View File

@ -1773,22 +1773,29 @@ public final class L2ItemInstance extends L2Object
{
return true;
}
final L2PcInstance owner = getActingPlayer();
for (Condition condition : _item.getConditions())
if ((_loc == ItemLocation.PET) || (_loc == ItemLocation.PET_EQUIP))
{
if (condition == null)
return true;
}
L2Character owner = getActingPlayer();
if (owner != null)
{
for (Condition condition : _item.getConditions())
{
continue;
}
try
{
if (!condition.test(owner, owner, null, null))
if (condition == null)
{
continue;
}
try
{
if (!condition.test(owner, owner, null, null))
{
return false;
}
}
catch (Exception e)
{
return false;
}
}
catch (Exception e)
{
}
}
return true;