From 37e1ffed286fe3d3c432e4869e1c524d4d6b2989 Mon Sep 17 00:00:00 2001 From: gentlespoon Date: Wed, 11 May 2022 00:44:22 -0700 Subject: [PATCH] Fix incorrect ascension level in givechar command --- .../java/emu/grasscutter/command/commands/GiveCharCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java b/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java index 2917c64c4..040d07d59 100644 --- a/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java @@ -63,9 +63,10 @@ public final class GiveCharCommand implements CommandHandler { // Calculate ascension level. int ascension; if (level <= 40) { - ascension = (int) Math.ceil(level / 20f); + ascension = (int) Math.ceil(level / 20f) - 1; } else { ascension = (int) Math.ceil(level / 10f) - 3; + ascension = Math.min(ascension, 6); } Avatar avatar = new Avatar(avatarId);