mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-14 16:04:40 +01:00
De-obfuscate definitions & run formatter
This commit is contained in:
@@ -28,6 +28,7 @@ public final class InfoCommand implements CommandHandler {
|
||||
var gameOptions = config.server.game;
|
||||
var questingEnabled = gameOptions.gameOptions.questing.enabled;
|
||||
var scriptsEnabled = gameOptions.enableScriptInBigWorld;
|
||||
var fastRequire = config.server.fastRequire;
|
||||
|
||||
CommandHandler.sendMessage(sender, """
|
||||
Created by Meledy
|
||||
@@ -52,11 +53,12 @@ public final class InfoCommand implements CommandHandler {
|
||||
Questing Enabled: %s
|
||||
Scripts Enabled: %s
|
||||
Operating System: %s
|
||||
Using Fast Require: %s
|
||||
Resource Information: %s
|
||||
|
||||
discord.gg/T5vZU6UyeG"""
|
||||
.formatted(
|
||||
build, playerCount, questingEnabled, scriptsEnabled,
|
||||
build, playerCount, questingEnabled, scriptsEnabled, fastRequire,
|
||||
System.getProperty("os.name"), resourceInfo.toString()
|
||||
)
|
||||
);
|
||||
|
||||
@@ -29,9 +29,11 @@ public class ConfigContainer {
|
||||
* Version 9 - 'limits' was added for handbook requests.
|
||||
* Version 10 - 'trialCostumes' was added for enabling costumes
|
||||
* on trial avatars.
|
||||
* Version 11 - 'server.fastRequire' was added for disabling the new
|
||||
* Lua script require system if performance is a concern.
|
||||
*/
|
||||
private static int version() {
|
||||
return 10;
|
||||
return 11;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,12 +3,15 @@ package emu.grasscutter.data.binout;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.data.common.DynamicFloat;
|
||||
import emu.grasscutter.game.props.ElementType;
|
||||
import java.io.Serializable;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AbilityModifier implements Serializable {
|
||||
private static final long serialVersionUID = -2001232313615923575L;
|
||||
|
||||
public State state;
|
||||
|
||||
@SerializedName(
|
||||
value = "onAdded",
|
||||
alternate = {"KCICDEJLIJD"})
|
||||
@@ -341,13 +344,12 @@ public class AbilityModifier implements Serializable {
|
||||
public int param2;
|
||||
public int param3;
|
||||
|
||||
public String funcName;
|
||||
public LuaCallType luaCallType;
|
||||
|
||||
@SerializedName("CallParamList")
|
||||
public int[] callParamList;
|
||||
|
||||
public String funcName;
|
||||
|
||||
public String content;
|
||||
|
||||
public enum LuaCallType {
|
||||
@@ -366,6 +368,20 @@ public class AbilityModifier implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public enum State {
|
||||
LockHP,
|
||||
Invincible,
|
||||
ElementFreeze,
|
||||
ElementPetrifaction,
|
||||
DenyLockOn,
|
||||
Limbo,
|
||||
NoHeal,
|
||||
IgnoreAddEnergy,
|
||||
IsGhostToEnemy,
|
||||
IsGhostToAllied,
|
||||
UnlockFrequencyLimit
|
||||
}
|
||||
|
||||
// The following should be implemented into DynamicFloat if older resource formats need to be
|
||||
// supported
|
||||
// public static class AbilityModifierValue {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package emu.grasscutter.game;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.*;
|
||||
|
||||
import dev.morphia.annotations.*;
|
||||
import emu.grasscutter.database.DatabaseHelper;
|
||||
import emu.grasscutter.utils.*;
|
||||
import org.bson.Document;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.*;
|
||||
import org.bson.Document;
|
||||
|
||||
@Entity(value = "accounts", useDiscriminator = false)
|
||||
public class Account {
|
||||
@@ -244,7 +243,6 @@ public class Account {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Account ID: %s; Username: %s"
|
||||
.formatted(this.id, this.username);
|
||||
return "Account ID: %s; Username: %s".formatted(this.id, this.username);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ public final class ActionHealHP extends AbilityActionHandler {
|
||||
@Override
|
||||
public boolean execute(
|
||||
Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) {
|
||||
Grasscutter.getLogger().debug("Heal ability action executing 1");
|
||||
|
||||
var owner = ability.getOwner();
|
||||
// handle client gadgets, that the effective caster is the current local avatar
|
||||
if (owner instanceof EntityClientGadget ownerGadget) {
|
||||
|
||||
@@ -4,15 +4,12 @@ import emu.grasscutter.*;
|
||||
import emu.grasscutter.game.entity.GameEntity;
|
||||
import emu.grasscutter.game.props.ElementType;
|
||||
import emu.grasscutter.scripts.*;
|
||||
import java.util.Set;
|
||||
import javax.script.*;
|
||||
import org.luaj.vm2.*;
|
||||
|
||||
import javax.script.*;
|
||||
import java.util.Set;
|
||||
|
||||
public class EntityController {
|
||||
private static final Set<String> SERVER_CALLED = Set.of(
|
||||
"OnBeHurt", "OnDie", "OnTimer"
|
||||
);
|
||||
private static final Set<String> SERVER_CALLED = Set.of("OnBeHurt", "OnDie", "OnTimer");
|
||||
|
||||
private transient CompiledScript entityController;
|
||||
private transient Bindings entityControllerBindings;
|
||||
|
||||
@@ -4,9 +4,8 @@ import emu.grasscutter.data.excels.TalkConfigData;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.server.event.Cancellable;
|
||||
import emu.grasscutter.server.event.types.PlayerEvent;
|
||||
import lombok.Getter;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public final class PlayerNpcTalkEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
Reference in New Issue
Block a user