Proper verify and remove visual set bonus.

This commit is contained in:
MobiusDevelopment
2020-10-08 01:07:47 +00:00
parent 6148cfd880
commit 1128c20435
15 changed files with 135 additions and 60 deletions

View File

@ -773,16 +773,21 @@ public abstract class Inventory extends ItemContainer
final PlayerInstance player = (PlayerInstance) inventory.getOwner();
boolean remove = false;
// verify and remove normal set bonus
// Verify and remove normal set bonus
if (verifyAndRemove(player, item, ItemInstance::getId))
{
remove = true;
}
// verify and remove visual set bonus
if (verifyAndRemove(player, item, ItemInstance::getVisualId))
// Verify and remove visual set bonus
final int itemVisualId = item.getVisualId();
if (itemVisualId > 0)
{
remove = true;
final AppearanceStone stone = AppearanceItemData.getInstance().getStone(itemVisualId);
if ((stone != null) && (stone.getType() == AppearanceType.FIXED) && verifyAndRemove(player, item, ItemInstance::getVisualId))
{
remove = true;
}
}
if (remove)