Move more logs to debug constants

This commit is contained in:
KingRainbow44 2023-08-13 15:56:19 -04:00
parent 948dd5df59
commit e0f8c03e39
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
2 changed files with 16 additions and 11 deletions

View File

@ -2,7 +2,7 @@ package emu.grasscutter.game.ability.actions;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.*;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction.DropType;
@ -81,8 +81,11 @@ public final class ActionGenerateElemBall extends AbilityActionHandler {
return false;
}
Grasscutter.getLogger()
.debug("Generating {} of {} element balls", amountGenerated, action.configID);
if (DebugConstants.LOG_ABILITIES) {
Grasscutter.getLogger()
.debug("Generating {} of {} element balls", amountGenerated, action.configID);
}
for (int i = 0; i < amountGenerated; i++) {
EntityItem energyBall =
new EntityItem(

View File

@ -1,7 +1,7 @@
package emu.grasscutter.game.ability.actions;
import com.google.protobuf.ByteString;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.*;
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
import emu.grasscutter.game.ability.Ability;
import emu.grasscutter.game.entity.EntityClientGadget;
@ -22,12 +22,14 @@ public final class ActionHealHP extends AbilityActionHandler {
ownerGadget
.getScene()
.getEntityById(ownerGadget.getOwnerEntityId()); // Caster for EntityClientGadget
Grasscutter.getLogger()
.debug(
"Owner {} has top owner {}: {}",
ability.getOwner(),
ownerGadget.getOwnerEntityId(),
owner);
if (DebugConstants.LOG_ABILITIES) {
Grasscutter.getLogger()
.debug(
"Owner {} has top owner {}: {}",
ability.getOwner(),
ownerGadget.getOwnerEntityId(),
owner);
}
}
if (owner == null) return false;
@ -76,7 +78,7 @@ public final class ActionHealHP extends AbilityActionHandler {
amountToRegenerate +=
amountByTargetMaxHPRatio * target.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP);
Grasscutter.getLogger().debug(">>> Healing {} without ratios", amountToRegenerate);
Grasscutter.getLogger().trace("Healing {} without ratios", amountToRegenerate);
target.heal(
amountToRegenerate * abilityRatio * action.healRatio.get(ability, 1f),
action.muteHealEffect);