Conversation
This allows the users to check what a trader would give for the items in their inventory.
|
|
||
| for (id, price_w) in prices.drain() { | ||
| if price_w.len() != 1 { | ||
| panic!("The price structure top is wrong"); |
There was a problem hiding this comment.
We shouldn't panic but instead return a proper error type.
There was a problem hiding this comment.
Yeah, I originally had a proper error type here, but I saw that in places like the get_trader_prices_raw if the response doesn't match up, you panic with expect. I am all for errors though, I just couldn't find an appropriate error type.
|
Is this different than functions like |
|
The get_trader_items returns the items the trader is willing to sell as far as I know? This returns the price the merchants is willing to pay for items in the users inventory. I am very new to this API, so I could very much be wrong. As I see it in the Hope that made sense and thanks for an awesome library! |
This allows the users to check what a trader would give for the items in their inventory.