diff --git a/Projects/UOContent/Mobiles/Abilities/MonsterAbility.cs b/Projects/UOContent/Mobiles/Abilities/MonsterAbility.cs
index abe9597ac..72fb61ec3 100644
--- a/Projects/UOContent/Mobiles/Abilities/MonsterAbility.cs
+++ b/Projects/UOContent/Mobiles/Abilities/MonsterAbility.cs
@@ -18,17 +18,19 @@ public abstract partial class MonsterAbility
public virtual TimeSpan MinTriggerCooldown => TimeSpan.Zero;
public virtual TimeSpan MaxTriggerCooldown => TimeSpan.Zero;
- // To prevent reflect from harming the monster
- public virtual bool CanTriggerAgainstSelf => false;
-
public bool WillTrigger(MonsterAbilityTrigger trigger) => (AbilityTrigger & trigger) != 0;
///
- /// Returns true if ability is not on cooldown, and the change to trigger succeeds.
+ /// Returns true if ability is not on cooldown, and the chance to trigger succeeds.
///
/// Boolean indicating the ability can trigger.
public virtual bool CanTrigger(BaseCreature source, MonsterAbilityTrigger trigger)
{
+ if (source is not { Alive: true, Deleted: false })
+ {
+ return false;
+ }
+
if (_nextTriggerTicks?.TryGetValue(source, out var nextTrigger) == true && nextTrigger - Core.TickCount > 0)
{
return false;
@@ -54,11 +56,11 @@ public virtual bool CanTrigger(BaseCreature source, MonsterAbilityTrigger trigge
///
/// Triggers the monster's ability. Override this and call `base.Trigger(source);` to make sure
/// the cooldown is tracked.
+ /// Note: This can fire after a monster is killed/deleted (map is null)
///
public virtual void Trigger(MonsterAbilityTrigger trigger, BaseCreature source, Mobile target)
{
- if (!CanTriggerAgainstSelf && target == source ||
- MinTriggerCooldown <= TimeSpan.Zero && MaxTriggerCooldown <= TimeSpan.Zero)
+ if (MinTriggerCooldown <= TimeSpan.Zero && MaxTriggerCooldown <= TimeSpan.Zero)
{
return;
}
diff --git a/Projects/UOContent/Spells/Base/SpellHelper.cs b/Projects/UOContent/Spells/Base/SpellHelper.cs
index 14eb566a2..396e64fdb 100644
--- a/Projects/UOContent/Spells/Base/SpellHelper.cs
+++ b/Projects/UOContent/Spells/Base/SpellHelper.cs
@@ -1140,6 +1140,11 @@ public SpellDamageTimerAOS(
protected override void OnTick()
{
+ if (m_Target.Deleted || !m_Target.Alive)
+ {
+ return;
+ }
+
Damage(
m_Spell,
TimeSpan.Zero,