Exemplo n.º 1
0
    public boolean setCrop() {
      synchronized (_crop) {
        int amount = _crop.getAmount();
        if (_count > amount) return false; // not enough crops

        _crop.setAmount(amount - _count);
      }

      if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
        CastleManager.getInstance()
            .getCastleById(_manorId)
            .updateCrop(_itemId, _crop.getAmount(), CastleManorManager.PERIOD_CURRENT);

      return true;
    }