Remembers that a shopkeeper has quoted a particular price for a particular type of object. */
| 436 | /* Remembers that a shopkeeper has quoted a particular price for a |
| 437 | particular type of object. */ |
| 438 | void |
| 439 | record_price_quote(int otyp, unsigned long price, boolean buyprice) { |
| 440 | struct objclass *oc = &objects[otyp]; |
| 441 | if (buyprice) { |
| 442 | if (price > oc->oc_buy_maxseen) oc->oc_buy_maxseen = price; |
| 443 | if (price < oc->oc_buy_minseen) oc->oc_buy_minseen = price; |
| 444 | } else { |
| 445 | if (price > oc->oc_sell_maxseen) oc->oc_sell_maxseen = price; |
| 446 | if (price < oc->oc_sell_minseen) oc->oc_sell_minseen = price; |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | /* Appends price-quote information to the given buffer, updating the |
| 451 | given end of string position. *eos mut be buf + strlen(buf). If the |
no outgoing calls
no test coverage detected