diff --git a/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java b/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java index b888c9aa5..e59aa56da 100644 --- a/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java +++ b/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java @@ -303,6 +303,13 @@ public class EnergyManager { } } public void handleMonsterEnergyDrop(EntityMonster monster, float hpBeforeDamage, float hpAfterDamage) { + // Make sure this is actually a monster. + // Note that some wildlife also has that type, like boars or birds. + String type = monster.getMonsterData().getType(); + if (!type.equals("MONSTER_ORDINARY") && !type.equals("MONSTER_BOSS")) { + return; + } + // Calculate the HP tresholds for before and after the damage was taken. float maxHp = monster.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP); float thresholdBefore = hpBeforeDamage / maxHp; diff --git a/src/main/resources/defaults/data/EnergyDrop.json b/src/main/resources/defaults/data/EnergyDrop.json index 2e3b72cf1..6cd7e8d85 100644 --- a/src/main/resources/defaults/data/EnergyDrop.json +++ b/src/main/resources/defaults/data/EnergyDrop.json @@ -156,5 +156,30 @@ "dropId": 22003100, "dropList": [ ] + }, + { + "dropId": 22001000, + "dropList": [ + ] + }, + { + "dropId": 22000100, + "dropList": [ + ] + }, + { + "dropId": 22003000, + "dropList": [ + ] + }, + { + "dropId": 22001100, + "dropList": [ + ] + }, + { + "dropId": 22000000, + "dropList": [ + ] } ] \ No newline at end of file