Merge branch 'development' into dev-quests

This commit is contained in:
Melledy
2022-05-11 03:56:59 -07:00
44 changed files with 702 additions and 495 deletions

View File

@@ -63,6 +63,8 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import static emu.grasscutter.Configuration.*;
@Entity(value = "players", useDiscriminator = false)
public class Player {
@@ -358,7 +360,7 @@ public class Player {
}
private float getExpModifier() {
return Grasscutter.getConfig().getGameServerOptions().getGameRates().ADVENTURE_EXP_RATE;
return GAME_OPTIONS.rates.adventureExp;
}
// Affected by exp rate
@@ -1248,7 +1250,7 @@ public class Player {
} else if (prop == PlayerProperty.PROP_LAST_CHANGE_AVATAR_TIME) { // 10001
// TODO: implement sanity check
} else if (prop == PlayerProperty.PROP_MAX_SPRING_VOLUME) { // 10002
if (!(value >= 0 && value <= getSotSManager().GlobalMaximumSpringVolume)) { return false; }
if (!(value >= 0 && value <= SotSManager.GlobalMaximumSpringVolume)) { return false; }
} else if (prop == PlayerProperty.PROP_CUR_SPRING_VOLUME) { // 10003
int playerMaximumSpringVolume = getProperty(PlayerProperty.PROP_MAX_SPRING_VOLUME);
if (!(value >= 0 && value <= playerMaximumSpringVolume)) { return false; }
@@ -1265,7 +1267,7 @@ public class Player {
} else if (prop == PlayerProperty.PROP_IS_TRANSFERABLE) { // 10009
if (!(0 <= value && value <= 1)) { return false; }
} else if (prop == PlayerProperty.PROP_MAX_STAMINA) { // 10010
if (!(value >= 0 && value <= getStaminaManager().GlobalMaximumStamina)) { return false; }
if (!(value >= 0 && value <= StaminaManager.GlobalMaximumStamina)) { return false; }
} else if (prop == PlayerProperty.PROP_CUR_PERSIST_STAMINA) { // 10011
int playerMaximumStamina = getProperty(PlayerProperty.PROP_MAX_STAMINA);
if (!(value >= 0 && value <= playerMaximumStamina)) { return false; }