more edge case handling

This commit is contained in:
Robin Appelman 2023-03-16 21:44:41 +01:00
commit f1213a5664
5 changed files with 15 additions and 9 deletions

View file

@ -93,7 +93,7 @@ impl EventHandler for ClassStatsHandler {
}
GameEvent::Damage(DamageEvent {
damage: Some(damage),
target,
target: Some(target),
..
}) if self.active => {
if let Some(target_class) = self.get_class(target) {