Zombies keep their anomalies on zombification (#33867)
* Zombies keep their anomalies on zombification * Refactor anombies to isolate anomalies and zombies InnerBodyAnomalies now send an event when the host dies. Zombies cancels this event if the host is turning into a zombie. * Anomazombies: deprecate CancellableEntityEventArgs CancellableEntityEventArgs is deprecated. Use structs with bool Cancelled instead.
This commit is contained in:
committed by
GitHub
parent
67e5cc2104
commit
8f2d16aabf
@@ -186,6 +186,11 @@ public sealed class InnerBodyAnomalySystem : SharedInnerBodyAnomalySystem
|
||||
if (args.NewMobState != MobState.Dead)
|
||||
return;
|
||||
|
||||
var ev = new BeforeRemoveAnomalyOnDeathEvent();
|
||||
RaiseLocalEvent(args.Target, ref ev);
|
||||
if (ev.Cancelled)
|
||||
return;
|
||||
|
||||
_anomaly.ChangeAnomalyHealth(ent, -2); //Shutdown it
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user