Bug - Fixed Hagnk meat above 2^31 not detected

adeyke

Member
I was in a non-HC ascension and had a lot of meat in Hagnk's, but the purchases tab listed "Meat in storage: 0", so I was unable to use it to buy items (buying via the relay browser worked). I suspect it's because I had over 2 billion (specifically, over 2^31) meat. After I finished the run, I converted most of my meat to dense meat stacks before ascending, and that fixed the issue.
 

Veracity

Developer
Staff member
Yeah. StorageRequest:

Code:
    if (meatInStorageMatcher.find()) {
      int meat = StringUtilities.parseInt(meatInStorageMatcher.group(1));
      KoLCharacter.setStorageMeat(meat);
    }

KoLCharacter:

Code:
  private static long storageMeat = 0;
...
  public static final void setStorageMeat(final long storageMeat) {
    if (KoLCharacter.storageMeat != storageMeat) {
      KoLCharacter.storageMeat = storageMeat;
      MallSearchFrame.updateMeat();
    }
  }

StorageRequest needs a little tweak...
 

adeyke

Member
I sold my dense meat stacks and ascended. Initially, it detected the meat correctly. If I buy something, however, it goes back to thinking it's 0. Doing a "refresh storage" or visiting Hangk's in the relay browser again makes it detect it correctly.
 
Top