TF2Autobot / tf2autobot

tf2autobot: an Improved version from tf2-automatic
https://autobot.tf
MIT License
214 stars 80 forks source link

Key conversion rate issue #1783

Open Konaya245 opened 1 month ago

Konaya245 commented 1 month ago

Describe the bug

Old issue resurfacing. https://github.com/TF2Autobot/tf2autobot/issues/272 Trade used my key selling rate when key is on their side of the trade, when trying to send change metal.

To Reproduce

Steps to reproduce the behavior:

  1. Set noticeable difference in key rate, eg. buy 10ref/sell 25ref
  2. Buyer only has key, no metals in inventory.
  3. Buyer buy an item using chat command.
  4. Bot sends offer for the key at their selling rate

Expected behavior

should be:

  • Use key selling price for conversion when the partner is taking keys from the bot
  • Use key buying price for conversion when the partner is giving keys to the bot

Screenshots and logs

Key rate: 56.55/86.22 ref NC Tour of Duty Ticket - 25 ref / 25.11 ref Guy canceled the trade and notified me of the issue. 1723811433574_07735872405489246

Other trades: Screenshot 2024-08-02 224745 Screenshot 2024-08-02 224616

Version: v5.13.0