Skip to content

Commit

Permalink
Only change ascension class if different. (#1227)
Browse files Browse the repository at this point in the history
* Only change ascension class if different.

The lack of this check was causing a concoction database refresh on every api.php request.

* Return at top of function instead.
  • Loading branch information
phulin committed Nov 4, 2022
1 parent 57b079f commit 728dbc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/net/sourceforge/kolmafia/KoLCharacter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,10 @@ public static final Correspondent getEudora() {
* @param ascensionClass The name of the character's class
*/
public static final void setAscensionClass(final AscensionClass ascensionClass) {
if (KoLCharacter.ascensionClass == ascensionClass) {
return;
}

KoLCharacter.ascensionClass = ascensionClass;

KoLCharacter.tripleReagent = isSauceror();
Expand Down

0 comments on commit 728dbc4

Please sign in to comment.