anchor.diff:      //How much can we trade
       TradeCount := Min((fMarketResIn[fResFrom] div RatioFrom), fTradeAmount);
   
  -    dec(fMarketResIn[fResFrom], TradeCount * RatioFrom);
  +    Dec(fMarketResIn[fResFrom], TradeCount * RatioFrom);
       fPlayers[fOwner].Stats.GoodConsumed(fResFrom, TradeCount * RatioFrom);
  -    dec(fTradeAmount, TradeCount);
  -    inc(fMarketResOut[fResTo], TradeCount * RatioTo);
  +    Dec(fTradeAmount, TradeCount);
  +    Inc(fMarketResOut[fResTo], TradeCount * RatioTo);
       fPlayers[fOwner].Stats.GoodProduced(fResTo, TradeCount * RatioTo);
       fPlayers[fOwner].Deliveries.Queue.AddOffer(Self, fResTo, TradeCount * RatioTo);
   
  -    fSoundLib.Play(sfxn_Trade,GetEntrance);
  -  end;
  -end;
  -
  -
  -procedure TKMHouseMarket.ResTakeFromOut(aResource:TResourceType; const aCount: Word=1);
  +    fSoundLib.Play(sfxn_Trade, fPosition);
  +  end;
  +end;
  +
  +
  +procedure TKMHouseMarket.ResTakeFromOut(aResource: TResourceType; const aCount: Word = 1);
   begin
     Assert(aCount <= fMarketResOut[aResource]);
   
  
positive.code:     //When trading target ware is priced higher
      CostFrom := fResource.Resources[fResFrom].MarketPrice;
      CostTo := fResource.Resources[fResTo].MarketPrice * MARKET_TRADEOFF_FACTOR;
      Result := Round(CostFrom/Min(CostFrom, CostTo));
    end else
      Result := 1;
  end;
  
  
  procedure TKMHouseMarket.ResAddToIn(aResource: TResourceType; aCount:word=1; aFromScript:boolean=false);
  var ResRequired:integer;
  begin
    //If user cancelled the exchange (or began new one with different resources already)
    //then incoming resourced should be added to Offer list immediately
  
negative.code: end;
  
  
  function TKMHouseMarket.GetResTotal(aResource: TResourceType): Word;
  begin
    Result := fMarketResIn[aResource] + fMarketResOut[aResource];
  end;
  
  
  function TKMHouseMarket.CheckResIn(aResource: TResourceType): Word;
  begin
    Result := fMarketResIn[aResource];
  end;
  
  
  function TKMHouseMarket.CheckResOrder(aID: Byte): Word;
  begin
    Result := fTradeAmount;
  end;
  