Bug - Fixed my_class() returning void for Actually Ed the Undying

fewyn

Administrator
Staff member
Code:
> ash my_path()

Returned: Actually Ed    the Undying

> ash my_class()

Returned:    void

Last time this worked looks to be back in 25792 where it returned.

Code:
> ash my_class()

Returned: Ed
primestat    => Mysticality
 

Irrat

Member
This would be caused by https://github.com/kolmafia/kolmafia/commit/c82d28d5ee5969ecb970ede7f8db2a7b0167c852

The class is reported by KOL as "Ed the Undying" however Mafia expects "Ed"

Code:
public static final void setAscensionClass(final String className) {
  setAscensionClass(AscensionClass.nameToClass(className));
}

The reason this works

Code:
ash visit_url("api.php?what=status&for=status")

Is because it's setting it using the class ID.

So in interest of maintaining backwards compatibility, the best option is likely to add a class alias. I'm not sure it should ever have been called "Ed", but "fixing" that would break quite a few scripts.

As for that commit, I think I might've misunderstood it. Without actually checking, best guess is that it previously loaded using the class ID. Not the name.
 

fewyn

Administrator
Staff member
So I'm no expert but I did partially fix this in a local build but it breaks basically all compatibility with existing scripts. (They are all expecting Ed when the api returns Ed the Undying which mafia now also returns)


I really don't know how to write in Java I usually just klutz my way around to fix things so I'd have no clue how to go around adding an alias.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Missed my @ here, sorry. I'll take a look at your PR today @fewyn
 
Top