feat: Adds Mobile.Murderer virtual property, consolidates kill-threshold checks (#2355)

## Summary

- Adds `public virtual bool Murderer => Kills >= 5` property to `Mobile`, replacing ~30 scattered `Kills >= 5` / `Kills < 5` magic-number checks across the codebase
- `BaseCreature` overrides `Murderer` to also return `true` when `AlwaysMurderer` is set
- Updates `Corpse` serialization to v15, storing `_murderer` as a `bool` field (migrated from `int Kills >= 5` in earlier versions)
This commit is contained in:
Jack 2026-03-07 05:36:41 +13:00 • committed by GitHub
parent 192f092ee7
commit 6745cf2075
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 200 additions and 43 deletions

View file

@ -502,7 +502,7 @@ namespace Server.Spells
}
return bcTarg?.Controlled == false && bcTarg.InitialInnocent ||
Notoriety.Compute(from, to) != Notoriety.Innocent || from.Kills >= 5;
Notoriety.Compute(from, to) != Notoriety.Innocent || from.Murderer;
}
public static void Summon(

View file

@ -60,7 +60,7 @@ namespace Server.Spells.Chivalry
{
mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
}
else if (Caster.Kills >= 5 && map != Map.Felucca)
else if (Caster.Murderer && map != Map.Felucca)
{
Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
}

View file

@ -60,7 +60,7 @@ namespace Server.Spells.Fourth
{
mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
}
else if (Caster.Kills >= 5 && map != Map.Felucca)
else if (Caster.Murderer && map != Map.Felucca)
{
Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
}

View file

@ -52,7 +52,7 @@ public class GateTravelSpell : MagerySpell, IRecallSpell
{
mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young.
}
else if (Caster.Kills >= 5 && map != Map.Felucca)
else if (Caster.Murderer && map != Map.Felucca)
{
Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there.
}