Sell fix for custom CB shop.

This commit is contained in:
MobiusDev
2015-04-01 16:38:27 +00:00
parent f8023f5029
commit 54e8a80387
2 changed files with 7 additions and 4 deletions

View File

@@ -45,6 +45,8 @@ public final class RequestBuyItem extends L2GameClientPacket
private static final String _C__40_REQUESTBUYITEM = "[C] 40 RequestBuyItem"; private static final String _C__40_REQUESTBUYITEM = "[C] 40 RequestBuyItem";
private static final int BATCH_LENGTH = 12; private static final int BATCH_LENGTH = 12;
private static final int CUSTOM_CB_SELL_LIST = 423;
private int _listId; private int _listId;
private List<ItemHolder> _items = null; private List<ItemHolder> _items = null;
@@ -102,7 +104,7 @@ public final class RequestBuyItem extends L2GameClientPacket
L2Object target = player.getTarget(); L2Object target = player.getTarget();
L2Character merchant = null; L2Character merchant = null;
if (!player.isGM()) if (!player.isGM() && (_listId != CUSTOM_CB_SELL_LIST))
{ {
if (!(target instanceof L2MerchantInstance) || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) || (player.getInstanceId() != target.getInstanceId())) if (!(target instanceof L2MerchantInstance) || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) || (player.getInstanceId() != target.getInstanceId()))
{ {
@@ -115,7 +117,7 @@ public final class RequestBuyItem extends L2GameClientPacket
double castleTaxRate = 0; double castleTaxRate = 0;
double baseTaxRate = 0; double baseTaxRate = 0;
if ((merchant == null) && !player.isGM()) if ((merchant == null) && !player.isGM() && (_listId != CUSTOM_CB_SELL_LIST))
{ {
sendPacket(ActionFailed.STATIC_PACKET); sendPacket(ActionFailed.STATIC_PACKET);
return; return;

View File

@@ -46,6 +46,7 @@ public final class RequestSellItem extends L2GameClientPacket
private static final String _C__37_REQUESTSELLITEM = "[C] 37 RequestSellItem"; private static final String _C__37_REQUESTSELLITEM = "[C] 37 RequestSellItem";
private static final int BATCH_LENGTH = 16; private static final int BATCH_LENGTH = 16;
private static final int CUSTOM_CB_SELL_LIST = 423;
private int _listId; private int _listId;
private List<UniqueItemHolder> _items = null; private List<UniqueItemHolder> _items = null;
@@ -111,7 +112,7 @@ public final class RequestSellItem extends L2GameClientPacket
L2Object target = player.getTarget(); L2Object target = player.getTarget();
L2Character merchant = null; L2Character merchant = null;
if (!player.isGM()) if (!player.isGM() && (_listId != CUSTOM_CB_SELL_LIST))
{ {
if ((target == null) || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) || (player.getInstanceId() != target.getInstanceId())) if ((target == null) || (!player.isInsideRadius(target, INTERACTION_DISTANCE, true, false)) || (player.getInstanceId() != target.getInstanceId()))
{ {
@@ -129,7 +130,7 @@ public final class RequestSellItem extends L2GameClientPacket
} }
} }
if ((merchant == null) && !player.isGM()) if ((merchant == null) && !player.isGM() && (_listId != CUSTOM_CB_SELL_LIST))
{ {
sendPacket(ActionFailed.STATIC_PACKET); sendPacket(ActionFailed.STATIC_PACKET);
return; return;