Search in sources :

Example 1 with ServerboundModifyItemsPacket

use of com.almuradev.almura.feature.store.network.ServerboundModifyItemsPacket in project Almura by AlmuraDev.

the class ClientStoreManager method requestModifyBuyingItem.

public void requestModifyBuyingItem(final String id, final int recNo, final int quantity, final int index, final BigDecimal price) {
    checkNotNull(id);
    checkState(recNo >= 0);
    checkState(quantity >= FeatureConstants.UNLIMITED);
    checkState(index >= 0);
    checkNotNull(price);
    checkState(price.doubleValue() >= 0);
    this.network.sendToServer(new ServerboundModifyItemsPacket(id, StoreItemSegmentType.BUYING, Lists.newArrayList(new ServerboundModifyItemsPacket.ModifyCandidate(recNo, quantity, index, price))));
}
Also used : ServerboundModifyItemsPacket(com.almuradev.almura.feature.store.network.ServerboundModifyItemsPacket)

Example 2 with ServerboundModifyItemsPacket

use of com.almuradev.almura.feature.store.network.ServerboundModifyItemsPacket in project Almura by AlmuraDev.

the class ClientStoreManager method requestModifySellingItem.

public void requestModifySellingItem(final String id, final int recNo, final int quantity, final int index, final BigDecimal price) {
    checkNotNull(id);
    checkState(recNo >= 0);
    checkState(quantity >= FeatureConstants.UNLIMITED);
    checkState(index >= 0);
    checkNotNull(price);
    checkState(price.doubleValue() >= 0);
    this.network.sendToServer(new ServerboundModifyItemsPacket(id, StoreItemSegmentType.SELLING, Lists.newArrayList(new ServerboundModifyItemsPacket.ModifyCandidate(recNo, quantity, index, price))));
}
Also used : ServerboundModifyItemsPacket(com.almuradev.almura.feature.store.network.ServerboundModifyItemsPacket)

Aggregations

ServerboundModifyItemsPacket (com.almuradev.almura.feature.store.network.ServerboundModifyItemsPacket)2