Configs for augmented item trade and destroy actions.

This commit is contained in:
MobiusDev
2019-02-06 04:55:20 +00:00
parent c2905c5851
commit 35e51e1fb4
54 changed files with 347 additions and 167 deletions

View File

@@ -779,6 +779,10 @@ public final class L2ItemInstance extends L2Object
*/
public boolean isDropable()
{
if (Config.ALT_ALLOW_AUGMENT_TRADE && isAugmented())
{
return true;
}
return !isAugmented() && _item.isDropable();
}
@@ -788,6 +792,10 @@ public final class L2ItemInstance extends L2Object
*/
public boolean isDestroyable()
{
if (!Config.ALT_ALLOW_AUGMENT_DESTROY && isAugmented())
{
return false;
}
return _item.isDestroyable();
}
@@ -797,6 +805,10 @@ public final class L2ItemInstance extends L2Object
*/
public boolean isTradeable()
{
if (Config.ALT_ALLOW_AUGMENT_TRADE && isAugmented())
{
return true;
}
return !isAugmented() && _item.isTradeable();
}
@@ -806,6 +818,10 @@ public final class L2ItemInstance extends L2Object
*/
public boolean isSellable()
{
if (Config.ALT_ALLOW_AUGMENT_TRADE && isAugmented())
{
return true;
}
return !isAugmented() && _item.isSellable();
}

View File

@@ -99,13 +99,7 @@ public final class RequestCrystallizeItem implements IClientIncomingPacket
if (inventory != null)
{
final L2ItemInstance item = inventory.getItemByObjectId(_objectId);
if (item == null)
{
client.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if (item.isHeroItem())
if ((item == null) || item.isHeroItem() || (!Config.ALT_ALLOW_AUGMENT_DESTROY && item.isAugmented()))
{
client.sendPacket(ActionFailed.STATIC_PACKET);
return;

View File

@@ -86,13 +86,7 @@ public class RequestCrystallizeEstimate implements IClientIncomingPacket
}
final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
if ((item == null) || item.isShadowItem() || item.isTimeLimitedItem())
{
client.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if (item.isHeroItem())
if ((item == null) || item.isShadowItem() || item.isTimeLimitedItem() || item.isHeroItem() || (!Config.ALT_ALLOW_AUGMENT_DESTROY && item.isAugmented()))
{
client.sendPacket(ActionFailed.STATIC_PACKET);
return;
@@ -189,6 +183,5 @@ public class RequestCrystallizeEstimate implements IClientIncomingPacket
{
client.sendPacket(SystemMessageId.CRYSTALLIZATION_CANNOT_BE_PROCEEDED_BECAUSE_THERE_ARE_NO_ITEMS_REGISTERED);
}
}
}