mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 17:05:20 +01:00
Run IntelliJ IDEA code formatter
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package emu.grasscutter.game.ability;
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.binout.AbilityModifierEntry;
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
|
||||
import emu.grasscutter.data.binout.AbilityModifierEntry;
|
||||
import emu.grasscutter.game.entity.EntityGadget;
|
||||
import emu.grasscutter.game.entity.GameEntity;
|
||||
import emu.grasscutter.game.entity.gadget.GadgetGatherObject;
|
||||
@@ -22,7 +21,8 @@ import lombok.Getter;
|
||||
public final class AbilityManager extends BasePlayerManager {
|
||||
HealAbilityManager healAbilityManager;
|
||||
|
||||
@Getter private boolean abilityInvulnerable = false;
|
||||
@Getter
|
||||
private boolean abilityInvulnerable = false;
|
||||
|
||||
public AbilityManager(Player player) {
|
||||
super(player);
|
||||
@@ -32,21 +32,23 @@ public final class AbilityManager extends BasePlayerManager {
|
||||
public void onAbilityInvoke(AbilityInvokeEntry invoke) throws Exception {
|
||||
this.healAbilityManager.healHandler(invoke);
|
||||
|
||||
//Grasscutter.getLogger().info(invoke.getArgumentType() + " (" + invoke.getArgumentTypeValue() + "): " + Utils.bytesToHex(invoke.toByteArray()));
|
||||
//Grasscutter.getLogger().info(invoke.getArgumentType() + " (" + invoke.getArgumentTypeValue() + "): " + Utils.bytesToHex(invoke.toByteArray()));
|
||||
switch (invoke.getArgumentType()) {
|
||||
case ABILITY_INVOKE_ARGUMENT_META_OVERRIDE_PARAM -> this.handleOverrideParam(invoke);
|
||||
case ABILITY_INVOKE_ARGUMENT_META_REINIT_OVERRIDEMAP -> this.handleReinitOverrideMap(invoke);
|
||||
case ABILITY_INVOKE_ARGUMENT_META_MODIFIER_CHANGE -> this.handleModifierChange(invoke);
|
||||
case ABILITY_INVOKE_ARGUMENT_MIXIN_COST_STAMINA -> this.handleMixinCostStamina(invoke);
|
||||
case ABILITY_INVOKE_ARGUMENT_ACTION_GENERATE_ELEM_BALL -> this.handleGenerateElemBall(invoke);
|
||||
default -> {}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when a player starts a skill.
|
||||
* @param player The player who started the skill.
|
||||
* @param skillId The skill ID.
|
||||
*
|
||||
* @param player The player who started the skill.
|
||||
* @param skillId The skill ID.
|
||||
* @param casterId The caster ID.
|
||||
*/
|
||||
public void onSkillStart(Player player, int skillId, int casterId) {
|
||||
@@ -76,6 +78,7 @@ public final class AbilityManager extends BasePlayerManager {
|
||||
|
||||
/**
|
||||
* Invoked when a player ends a skill.
|
||||
*
|
||||
* @param player The player who started the skill.
|
||||
*/
|
||||
public void onSkillEnd(Player player) {
|
||||
@@ -195,7 +198,8 @@ public final class AbilityManager extends BasePlayerManager {
|
||||
|
||||
private void invokeAction(AbilityModifierAction action, GameEntity target, GameEntity sourceEntity) {
|
||||
switch (action.type) {
|
||||
case HealHP -> {}
|
||||
case HealHP -> {
|
||||
}
|
||||
case LoseHP -> {
|
||||
if (action.amountByTargetCurrentHPRatio == null) {
|
||||
return;
|
||||
@@ -211,8 +215,8 @@ public final class AbilityManager extends BasePlayerManager {
|
||||
target.damage(damageAmount);
|
||||
}
|
||||
}
|
||||
default -> {}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user