Bug - Fixed purchasing items always goes to an NPC store first

Veracity

Developer
Staff member
When you search the mall in the Mall Search Frame, the available vendors are listed by price. Certain NPC items are actually obtainable cheaper from a PC store, and therefore appear before the NPC store in the list.

When you purchase an item via "buy" or "acquire", however, if there is an NPC store with the item, that is always used.

MallSearchRequest is given a List<PurchaseRequest> to return all the vendors. When it adds the results from the search, for each item, if it is available in an NPC store, it adds that first, and then the results from PC stores.

The Mall Search Frame gives it a SortedListModel.
On the other hand, StoreManager.searchMall gives it an ArrayList.

That latter case should sort the results after it gets them so that the NPC stores get inserted into the appropriate place in the list.
 

Veracity

Developer
Staff member
Revision 14372 sorts the stores using KoLmafia's PurchaseRequest ordering method. This will insert NPC stores into the appropriate place. It will also favor stores with no limits or, among stores with limits, higher limits, same as on the Mall Search Frame.
 

Veracity

Developer
Staff member
Dramatic Range, Queue Du Coq cocktailcrafting kit, tenderizing hammer. Those have an autosell price of 250 since you can buy them for 500 from Nervewrecker's store, but if you are not in a Bad Moon run, you have to pay 1000 at the General Store. This change means that you can "buy 1 Dramatic Range" and if you are in-run, it will buy it at the cheapest available NPC store, but if you are out of run, you will get one of the many thousands available at 500 from a PC store.
 

Veracity

Developer
Staff member
P.S. I notice this when I complete a run without doing fancy cooking (like my three recent Boris runs) and want to make key lime pies before I ascend. I cast enough Inigo's, tell the item manager to create the pies, and KoLmafia buys and installs a Dramatic range for me - for 1,000 Meat from the General store. I could have avoided that by prepurchasing a supply of Dramatic ranges by hand and letting it just pull one of them for me, but I didn't do that. That won't happen again.
 

Bale

Minion
Revision 14372 sorts the stores using KoLmafia's PurchaseRequest ordering method. This will insert NPC stores into the appropriate place. It will also favor stores with no limits or, among stores with limits, higher limits, same as on the Mall Search Frame.

Dramatic Range, Queue Du Coq cocktailcrafting kit, tenderizing hammer.

Dangit! Found a bug in this commit. I've posted a bug report HERE.
 
Top