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

View File

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