Add debug property to log missing ability actions

This commit is contained in:
KingRainbow44
2023-08-27 13:37:14 -04:00
parent 93460ab0aa
commit bf3e390ce6
2 changed files with 4 additions and 3 deletions

View File

@@ -91,9 +91,9 @@ public final class AbilityManager extends BasePlayerManager {
Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) {
var handler = actionHandlers.get(action.type);
if (handler == null || ability == null) {
if (DebugConstants.LOG_ABILITIES) {
if (DebugConstants.LOG_MISSING_ABILITY_HANDLERS) {
Grasscutter.getLogger()
.debug("Could not execute ability action {} at {}", action.type, ability);
.debug("Missing ability action handler for {} (invoker: {}).", action.type, ability);
}
return;
@@ -103,7 +103,7 @@ public final class AbilityManager extends BasePlayerManager {
() -> {
if (!handler.execute(ability, action, abilityData, target)) {
Grasscutter.getLogger()
.debug("Ability execute action failed for {} at {}.", action.type, ability);
.debug("Ability execute action failed for {} at {}.", action.type, ability);
}
});
}