Feature - Implemented For maximizer, ignore items not in the mall

heeheehee

Developer
Staff member
a.k.a. Operation "Ain't no free lunch".

See attached patch. It's probably inadequate, but it seems to work.

Code:
Index: src/net/sourceforge/kolmafia/maximizer/Maximizer.java
===================================================================
--- src/net/sourceforge/kolmafia/maximizer/Maximizer.java	(revision 11817)
+++ src/net/sourceforge/kolmafia/maximizer/Maximizer.java	(working copy)
@@ -694,7 +694,7 @@
 								price = StoreManager.getMallPrice( item );
 							}
 						}
-						if ( price > maxPrice ) continue;
+						if ( price > maxPrice || price == -1 ) continue;
 					}
 					else if ( item.getCount( KoLConstants.inventory ) == 0 )
 					{
 

Attachments

  • maximizer_price.patch
    544 bytes · Views: 37

roippi

Developer
In the future, if you could provide a little context, motivation for what you're requesting, the problem you're trying to address, or a link to a discussion from another thread that would make life easier. Otherwise I have to reverse engineer that information out of what you present.

r11819
 

Donavin69

Member
I just tested this, and it still comes up with the rainbow pearl earring. The original thead didn't go into a lot of detail either. The maximizer command I'm using is simply 'stench res, sleaze res' (or any other combination I need for basementing) I have price limit set at 100k, with 'pullable/buyable' and 'buyable only' selected.

I'm using r11819.
 

roippi

Developer
Didn't even really look at what I was committing. That was in the part of maximize() that handles non-equipment items, should have noticed that immediately.

There was a underlying bug here: price limits were completely ignored with single-equip items. Not sure how that one hasn't been reported yet (if it has, someone link it so we can close it), but r11820.
 
Top