diff --git a/Projects/Server/Items/Item.cs b/Projects/Server/Items/Item.cs index d502af9cc..c75c3fb38 100644 --- a/Projects/Server/Items/Item.cs +++ b/Projects/Server/Items/Item.cs @@ -2192,7 +2192,7 @@ public partial class Item : IHued, IComparable, ISpawnable, IObjectPropert return DeathMoveResult.MoveToBackpack; } - if (CheckNewbied() && parent.Kills < 5) + if (CheckNewbied() && !parent.Murderer) { return DeathMoveResult.MoveToBackpack; } @@ -2222,7 +2222,7 @@ public partial class Item : IHued, IComparable, ISpawnable, IObjectPropert return DeathMoveResult.MoveToBackpack; } - if (CheckNewbied() && parent.Kills < 5) + if (CheckNewbied() && !parent.Murderer) { return DeathMoveResult.MoveToBackpack; } diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index 764356b0b..0e2b02f3a 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -1642,7 +1642,7 @@ public partial class Mobile : IHued, IComparable, ISpawnable, IObjectPro { m_Kills = Math.Max(value, 0); - if (oldValue >= 5 != m_Kills >= 5) + if (oldValue >= 5 != Murderer) { Delta(MobileDelta.Noto); InvalidateProperties(); @@ -1653,6 +1653,8 @@ public partial class Mobile : IHued, IComparable, ISpawnable, IObjectPro } } + public virtual bool Murderer => Kills >= 5; + [CommandProperty(AccessLevel.Counselor, AccessLevel.GameMaster)] public virtual bool Criminal { diff --git a/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs b/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs index e1e161554..a26bcc0f9 100755 --- a/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs +++ b/Projects/UOContent/Engines/CannedEvil/ChampionSpawn.cs @@ -454,7 +454,7 @@ public partial class ChampionSpawn : Item // Justice reward var pm = (PlayerMobile)killer; var prot = JusticeVirtue.GetProtector(pm); - if (prot == null || prot.Map != killer.Map || prot.Kills >= 5 || prot.Criminal || + if (prot == null || prot.Map != killer.Map || prot.Murderer || prot.Criminal || !JusticeVirtue.CheckMapRegion(killer, prot)) { return; diff --git a/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs b/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs index 0f1e9d646..c889cfc33 100644 --- a/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs +++ b/Projects/UOContent/Engines/ConPVP/TournamentPyramid.cs @@ -42,7 +42,7 @@ namespace Server.Engines.ConPVP { var mob = players[j]; - if (mob.Kills >= 5) + if (mob.Murderer) { parts[0].Players.Add(mob); } diff --git a/Projects/UOContent/Engines/Ethics/Hero/Ethic.cs b/Projects/UOContent/Engines/Ethics/Hero/Ethic.cs index df7a8ec8e..f6720bfab 100644 --- a/Projects/UOContent/Engines/Ethics/Hero/Ethic.cs +++ b/Projects/UOContent/Engines/Ethics/Hero/Ethic.cs @@ -31,7 +31,7 @@ public sealed partial class HeroEthic : Ethic } } - public override bool IsEligible(Mobile mob) => mob.Kills < 5 && Faction.Find(mob) is TrueBritannians or CouncilOfMages; + public override bool IsEligible(Mobile mob) => !mob.Murderer && Faction.Find(mob) is TrueBritannians or CouncilOfMages; [AfterDeserialization] private void AfterDeserialization() diff --git a/Projects/UOContent/Engines/Help/HelpGump.cs b/Projects/UOContent/Engines/Help/HelpGump.cs index d23552a35..2c11641d9 100644 --- a/Projects/UOContent/Engines/Help/HelpGump.cs +++ b/Projects/UOContent/Engines/Help/HelpGump.cs @@ -307,7 +307,7 @@ public sealed class HelpGump : DynamicGump } else if (from is PlayerMobile mobile && mobile.CanUseStuckMenu() && mobile.Region.CanUseStuckMenu(mobile) && !CheckCombat(mobile) && !mobile.Frozen && - !mobile.Criminal && (Core.AOS || mobile.Kills < 5)) + !mobile.Criminal && (Core.AOS || !mobile.Murderer)) { var menu = new StuckMenu(mobile, mobile, true); diff --git a/Projects/UOContent/Engines/Help/StuckMenu.cs b/Projects/UOContent/Engines/Help/StuckMenu.cs index 4fc57aed2..a53d71db8 100644 --- a/Projects/UOContent/Engines/Help/StuckMenu.cs +++ b/Projects/UOContent/Engines/Help/StuckMenu.cs @@ -300,7 +300,7 @@ namespace Server.Menus.Questions } else { - destMap = m_Mobile.Kills >= 5 ? Map.Felucca : Map.Trammel; + destMap = m_Mobile.Murderer ? Map.Felucca : Map.Trammel; } BaseCreature.TeleportPets(m_Mobile, dest, destMap); diff --git a/Projects/UOContent/Engines/Virtues/Justice.cs b/Projects/UOContent/Engines/Virtues/Justice.cs index 25fc6a79d..47d7bb14f 100644 --- a/Projects/UOContent/Engines/Virtues/Justice.cs +++ b/Projects/UOContent/Engines/Virtues/Justice.cs @@ -179,7 +179,7 @@ public class JusticeVirtue { protector.SendLocalizedMessage(1049372); // You cannot use this ability here. } - else if (pm == protector || pm.Criminal || pm.Kills >= 5) + else if (pm == protector || pm.Criminal || pm.Murderer) { protector.SendLocalizedMessage(1049436); // That player cannot be protected. } @@ -219,7 +219,7 @@ public class JusticeVirtue { protector.SendLocalizedMessage(1049372); // You cannot use this ability here. } - else if (protectee == protector || protectee.Criminal || protectee.Kills >= 5) + else if (protectee == protector || protectee.Criminal || protectee.Murderer) { protector.SendLocalizedMessage(1049436); // That player cannot be protected. } diff --git a/Projects/UOContent/Engines/Virtues/VirtueGump.cs b/Projects/UOContent/Engines/Virtues/VirtueGump.cs index 87ab6e669..18ae1315b 100644 --- a/Projects/UOContent/Engines/Virtues/VirtueGump.cs +++ b/Projects/UOContent/Engines/Virtues/VirtueGump.cs @@ -30,7 +30,7 @@ public class VirtueGump : Gump public static void RequestVirtueGump(PlayerMobile beholder, PlayerMobile beheld) { - if (beholder == beheld && beholder.Kills >= 5) + if (beholder == beheld && beholder.Murderer) { beholder.SendLocalizedMessage(1049609); // Murderers cannot invoke this virtue. } @@ -49,7 +49,7 @@ public class VirtueGump : Gump beholder.CloseGump(); - if (beholder.Kills >= 5) + if (beholder.Murderer) { beholder.SendLocalizedMessage(1049609); // Murderers cannot invoke this virtue. return; diff --git a/Projects/UOContent/Gumps/AdminGump.cs b/Projects/UOContent/Gumps/AdminGump.cs index ef8ac5d84..870a99bb2 100644 --- a/Projects/UOContent/Gumps/AdminGump.cs +++ b/Projects/UOContent/Gumps/AdminGump.cs @@ -1419,7 +1419,7 @@ namespace Server.Gumps } default: { - if (m.Kills >= 5) + if (m.Murderer) { return 0x21; } diff --git a/Projects/UOContent/Gumps/WhoGump.cs b/Projects/UOContent/Gumps/WhoGump.cs index e47802a71..27971f83e 100644 --- a/Projects/UOContent/Gumps/WhoGump.cs +++ b/Projects/UOContent/Gumps/WhoGump.cs @@ -196,7 +196,7 @@ public class WhoGump : DynamicGump AccessLevel.Seer => 0x144, AccessLevel.GameMaster => 0x21, AccessLevel.Counselor => 0x2, - _ when m.Kills >= 5 => 0x21, + _ when m.Murderer => 0x21, _ when m.Criminal => 0x3B1, _ => 0x58 }; diff --git a/Projects/UOContent/Items/Misc/Corpses/Corpse.cs b/Projects/UOContent/Items/Misc/Corpses/Corpse.cs index 92504888e..9eb6ad7ef 100644 --- a/Projects/UOContent/Items/Misc/Corpses/Corpse.cs +++ b/Projects/UOContent/Items/Misc/Corpses/Corpse.cs @@ -64,7 +64,7 @@ public enum CorpseFlag SelfLooted = 0x00000080 } -[SerializationGenerator(14, false)] +[SerializationGenerator(15, false)] public partial class Corpse : Container, ICarvable { public static readonly TimeSpan MonsterLootRightSacrifice = TimeSpan.FromMinutes(2.0); @@ -126,7 +126,7 @@ public partial class Corpse : Container, ICarvable [SerializableField(12)] [SerializedCommandProperty(AccessLevel.GameMaster)] - private int _kills; + private bool _murderer; [SerializableField(13, setter: "private")] [SerializedCommandProperty(AccessLevel.GameMaster)] @@ -170,7 +170,7 @@ public partial class Corpse : Container, ICarvable _accessLevel = owner.AccessLevel; _guild = owner.Guild as Guild; - _kills = owner.Kills; + _murderer = owner.Murderer; SetFlag(CorpseFlag.Criminal, owner.Criminal); if (hair?.ItemId > 0) @@ -254,6 +254,28 @@ public partial class Corpse : Container, ICarvable DevourCorpse(); } + // Replaced int Kills snapshot with bool Murderer snapshot + private void MigrateFrom(V14Content content) + { + _restoreEquip = content.RestoreEquip; + _flags = content.Flags; + _timeOfDeath = content.TimeOfDeath; + _restoreTable = content.RestoreTable; + _decayTimer = new InternalTimer(this, content.DecayTimerDelay); + _decayTimer.Start(); + _looters = content.Looters; + _killer = content.Killer; + _aggressors = content.Aggressors; + _owner = content.Owner; + _corpseName = content.CorpseName; + _accessLevel = content.AccessLevel; + _guild = content.Guild; + _murderer = content.Kills >= 5; + _equipItems = content.EquipItems; + _hair = content.Hair; + _facialHair = content.FacialHair; + } + // Added corpse hair and corpse facial hair private void MigrateFrom(V13Content content) { @@ -270,7 +292,7 @@ public partial class Corpse : Container, ICarvable _corpseName = content.CorpseName; _accessLevel = content.AccessLevel; _guild = content.Guild; - _kills = content.Kills; + _murderer = content.Kills >= 5; _equipItems = content.EquipItems; } @@ -631,7 +653,7 @@ public partial class Corpse : Container, ICarvable _accessLevel = (AccessLevel)reader.ReadInt(); reader.ReadInt(); // guild reserve - _kills = reader.ReadInt(); + _murderer = reader.ReadInt() >= 5; _equipItems = reader.ReadEntityList(); } diff --git a/Projects/UOContent/Items/Misc/Moonstone.cs b/Projects/UOContent/Items/Misc/Moonstone.cs index 4d08947c8..3dfcca30c 100644 --- a/Projects/UOContent/Items/Misc/Moonstone.cs +++ b/Projects/UOContent/Items/Misc/Moonstone.cs @@ -64,7 +64,7 @@ public partial class Moonstone : Item { mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. } - else if (from.Kills >= 5) + else if (from.Murderer) { // The magic of the stone cannot be evoked by someone with blood on their hands. from.SendLocalizedMessage(1005402); diff --git a/Projects/UOContent/Items/Misc/MoonstoneGate.cs b/Projects/UOContent/Items/Misc/MoonstoneGate.cs index a22182402..313ca34e3 100644 --- a/Projects/UOContent/Items/Misc/MoonstoneGate.cs +++ b/Projects/UOContent/Items/Misc/MoonstoneGate.cs @@ -25,7 +25,7 @@ public partial class MoonstoneGate : Moongate public override void CheckGate(Mobile m, int range) { - if (m.Kills >= 5) + if (m.Murderer) { return; } @@ -41,7 +41,7 @@ public partial class MoonstoneGate : Moongate public override void UseGate(Mobile m) { - if (m.Kills >= 5) + if (m.Murderer) { return; } diff --git a/Projects/UOContent/Items/Misc/PublicMoongate.cs b/Projects/UOContent/Items/Misc/PublicMoongate.cs index fd8aa2857..d3ef7d4c2 100644 --- a/Projects/UOContent/Items/Misc/PublicMoongate.cs +++ b/Projects/UOContent/Items/Misc/PublicMoongate.cs @@ -339,7 +339,7 @@ public class MoongateGump : Gump { checkLists = PMList.SigilLists; } - else if (mobile.Kills >= 5) + else if (mobile.Murderer) { checkLists = PMList.RedLists; } @@ -474,7 +474,7 @@ public class MoongateGump : Gump { _mobile.SendLocalizedMessage(1019002); // You are too far away to use the gate. } - else if (_mobile.Player && _mobile.Kills >= 5 && list.Map != Map.Felucca) + else if (_mobile.Player && _mobile.Murderer && list.Map != Map.Felucca) { _mobile.SendLocalizedMessage(1019004); // You are not allowed to travel there. } diff --git a/Projects/UOContent/Items/Skill Items/Magical/Misc/Moongate.cs b/Projects/UOContent/Items/Skill Items/Magical/Misc/Moongate.cs index b6b9a01c8..ad46fa167 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Misc/Moongate.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Misc/Moongate.cs @@ -96,7 +96,7 @@ public partial class Moongate : Item { mobile.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. } - else if (m.Kills >= 5 && TargetMap != Map.Felucca || + else if (m.Murderer && TargetMap != Map.Felucca || TargetMap == Map.Tokuno && (flags & ClientFlags.Tokuno) == 0 || TargetMap == Map.Malas && (flags & ClientFlags.Malas) == 0 || TargetMap == Map.Ilshenar && (flags & ClientFlags.Ilshenar) == 0 || diff --git a/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs b/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs index 33cbe485c..2f82791c2 100644 --- a/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs +++ b/Projects/UOContent/Items/Special/Solen Items/BraceletOfBinding.cs @@ -226,7 +226,7 @@ public partial class BraceletOfBinding : BaseBracelet, TranslocationItem return false; } - if (from.Kills >= 5 && boundRoot.Map != Map.Felucca) + if (from.Murderer && boundRoot.Map != Map.Felucca) { from.SendLocalizedMessage(1019004); // You are not allowed to travel there. return false; diff --git a/Projects/UOContent/Migrations/Server.Items.Corpse.v15.json b/Projects/UOContent/Migrations/Server.Items.Corpse.v15.json new file mode 100644 index 000000000..411c19bd2 --- /dev/null +++ b/Projects/UOContent/Migrations/Server.Items.Corpse.v15.json @@ -0,0 +1,131 @@ +{ + "version": 15, + "type": "Server.Items.Corpse", + "properties": [ + { + "name": "RestoreEquip", + "type": "System.Collections.Generic.List\u003CServer.Item\u003E", + "rule": "ListMigrationRule", + "ruleArguments": [ + "Server.Item", + "SerializableInterfaceMigrationRule" + ] + }, + { + "name": "Flags", + "type": "Server.Items.CorpseFlag", + "rule": "EnumMigrationRule" + }, + { + "name": "TimeOfDeath", + "type": "System.DateTime", + "rule": "PrimitiveTypeMigrationRule", + "ruleArguments": [ + "DeltaTime" + ] + }, + { + "name": "RestoreTable", + "type": "System.Collections.Generic.Dictionary\u003CServer.Item, Server.Point3D\u003E", + "rule": "DictionaryMigrationRule", + "ruleArguments": [ + "Server.Item", + "SerializableInterfaceMigrationRule", + "0", + "Server.Point3D", + "PrimitiveUOTypeMigrationRule", + "1", + "Point3D" + ] + }, + { + "name": "DecayTimer", + "type": "Server.Timer", + "rule": "TimerMigrationRule", + "ruleArguments": [ + "@TimerDrift" + ] + }, + { + "name": "Looters", + "type": "System.Collections.Generic.HashSet\u003CServer.Mobile\u003E", + "rule": "HashSetMigrationRule", + "ruleArguments": [ + "Server.Mobile", + "SerializableInterfaceMigrationRule" + ] + }, + { + "name": "Killer", + "type": "Server.Mobile", + "rule": "SerializableInterfaceMigrationRule" + }, + { + "name": "Aggressors", + "type": "System.Collections.Generic.List\u003CServer.Mobile\u003E", + "rule": "ListMigrationRule", + "ruleArguments": [ + "Server.Mobile", + "SerializableInterfaceMigrationRule" + ] + }, + { + "name": "Owner", + "type": "Server.Mobile", + "rule": "SerializableInterfaceMigrationRule" + }, + { + "name": "CorpseName", + "type": "string", + "rule": "PrimitiveTypeMigrationRule", + "ruleArguments": [ + "" + ] + }, + { + "name": "AccessLevel", + "type": "Server.AccessLevel", + "rule": "EnumMigrationRule" + }, + { + "name": "Guild", + "type": "Server.Guilds.Guild", + "rule": "SerializableInterfaceMigrationRule" + }, + { + "name": "Murderer", + "type": "bool", + "rule": "PrimitiveTypeMigrationRule", + "ruleArguments": [ + "" + ] + }, + { + "name": "EquipItems", + "type": "System.Collections.Generic.List\u003CServer.Item\u003E", + "rule": "ListMigrationRule", + "ruleArguments": [ + "Server.Item", + "SerializableInterfaceMigrationRule" + ] + }, + { + "name": "Hair", + "type": "Server.VirtualHairInfo", + "rule": "RawSerializableMigrationRule", + "ruleArguments": [ + "", + "@CanBeNull" + ] + }, + { + "name": "FacialHair", + "type": "Server.VirtualHairInfo", + "rule": "RawSerializableMigrationRule", + "ruleArguments": [ + "", + "@CanBeNull" + ] + } + ] +} \ No newline at end of file diff --git a/Projects/UOContent/Misc/Notoriety.cs b/Projects/UOContent/Misc/Notoriety.cs index ff7924bb5..fb6069f49 100644 --- a/Projects/UOContent/Misc/Notoriety.cs +++ b/Projects/UOContent/Misc/Notoriety.cs @@ -311,7 +311,7 @@ namespace Server.Misc var actual = Notoriety.CanBeAttacked; - if (target.Kills >= 5 || body.IsMonster && IsSummoned(creature) || creature.AlwaysMurderer || + if (target.Murderer || body.IsMonster && IsSummoned(creature) || creature.IsAnimatedDead) { actual = Notoriety.Murderer; @@ -335,7 +335,7 @@ namespace Server.Misc return Notoriety.Innocent; } - if (target.Kills >= 5 || body.IsMonster) + if (target.Murderer || body.IsMonster) { return Notoriety.Murderer; } @@ -438,7 +438,7 @@ namespace Server.Misc } } - if (target.Kills >= 5 || + if (target.Murderer || target.Body.IsMonster && IsSummoned(bcTarg) && target is not BaseFamiliar && target is not ArcaneFey && target is not Golem || bcTarg?.IsAnimatedDead == true) { diff --git a/Projects/UOContent/Mobiles/BaseCreature.cs b/Projects/UOContent/Mobiles/BaseCreature.cs index ebb6849ed..e48758cb4 100644 --- a/Projects/UOContent/Mobiles/BaseCreature.cs +++ b/Projects/UOContent/Mobiles/BaseCreature.cs @@ -557,6 +557,8 @@ namespace Server.Mobiles public virtual bool AlwaysMurderer => false; + public override bool Murderer => AlwaysMurderer || base.Murderer; + public virtual bool AlwaysAttackable => false; [CommandProperty(AccessLevel.GameMaster)] @@ -2806,7 +2808,7 @@ namespace Server.Mobiles return; } - if (!Body.IsHuman || Kills >= 5 || AlwaysMurderer || AlwaysAttackable || m.Kills < 5 || + if (!Body.IsHuman || Murderer || AlwaysAttackable || !m.Murderer || !m.InRange(Location, 12) || !m.Alive) { return; diff --git a/Projects/UOContent/Mobiles/Healers/Healer.cs b/Projects/UOContent/Mobiles/Healers/Healer.cs index 3d01a66a3..9e5c50e21 100644 --- a/Projects/UOContent/Mobiles/Healers/Healer.cs +++ b/Projects/UOContent/Mobiles/Healers/Healer.cs @@ -48,7 +48,7 @@ public partial class Healer : BaseHealer return false; } - if (m.Kills >= 5) + if (m.Murderer) { Say(501223); // Thou'rt not a decent and good person. I shall not resurrect thee. return false; diff --git a/Projects/UOContent/Mobiles/Healers/WanderingHealer.cs b/Projects/UOContent/Mobiles/Healers/WanderingHealer.cs index 75ccb74be..bc46d51d2 100644 --- a/Projects/UOContent/Mobiles/Healers/WanderingHealer.cs +++ b/Projects/UOContent/Mobiles/Healers/WanderingHealer.cs @@ -40,7 +40,7 @@ public partial class WanderingHealer : BaseHealer return false; } - if (m.Kills >= 5) + if (m.Murderer) { Say(501223); // Thou'rt not a decent and good person. I shall not resurrect thee. return false; diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs index 64b81daf4..f156ec05f 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs @@ -70,7 +70,7 @@ namespace Server.Mobiles InLOS(from)) { m_NextResurrect = Core.Now + ResurrectDelay; - if (!from.Criminal && from.Kills < 5 && from.Karma > 0) + if (!from.Criminal && !from.Murderer && from.Karma > 0) { if (from.Map?.CanFit(from.Location, 16, false, false) == true) { diff --git a/Projects/UOContent/Mobiles/PlayerMobile.cs b/Projects/UOContent/Mobiles/PlayerMobile.cs index c23023caf..f65949377 100644 --- a/Projects/UOContent/Mobiles/PlayerMobile.cs +++ b/Projects/UOContent/Mobiles/PlayerMobile.cs @@ -2595,7 +2595,7 @@ namespace Server.Mobiles } } - if (Kills >= 5 && Core.Now >= m_NextJustAward) + if (Murderer && Core.Now >= m_NextJustAward) { var m = FindMostRecentDamager(false); diff --git a/Projects/UOContent/Mobiles/Special/BaseChampion.cs b/Projects/UOContent/Mobiles/Special/BaseChampion.cs index 57ad2b290..bacc79430 100644 --- a/Projects/UOContent/Mobiles/Special/BaseChampion.cs +++ b/Projects/UOContent/Mobiles/Special/BaseChampion.cs @@ -165,7 +165,7 @@ public abstract partial class BaseChampion : BaseCreature var prot = JusticeVirtue.GetProtector(pm); - if (prot == null || prot.Map != pm.Map || prot.Kills >= 5 || prot.Criminal || + if (prot == null || prot.Map != pm.Map || prot.Murderer || prot.Criminal || !JusticeVirtue.CheckMapRegion(pm, prot)) { return; diff --git a/Projects/UOContent/Mobiles/Special/Harrower.cs b/Projects/UOContent/Mobiles/Special/Harrower.cs index 4b2e31c01..ee3fa1873 100644 --- a/Projects/UOContent/Mobiles/Special/Harrower.cs +++ b/Projects/UOContent/Mobiles/Special/Harrower.cs @@ -279,7 +279,7 @@ public partial class Harrower : BaseCreature var prot = JusticeVirtue.GetProtector(pm); - if (prot == null || prot.Map != pm.Map || prot.Kills >= 5 || prot.Criminal || + if (prot == null || prot.Map != pm.Map || prot.Murderer || prot.Criminal || !JusticeVirtue.CheckMapRegion(pm, prot)) { continue; diff --git a/Projects/UOContent/Regions/GuardedRegion.cs b/Projects/UOContent/Regions/GuardedRegion.cs index bfd54bd03..9502701b4 100644 --- a/Projects/UOContent/Regions/GuardedRegion.cs +++ b/Projects/UOContent/Regions/GuardedRegion.cs @@ -135,7 +135,7 @@ public class GuardedRegion : BaseRegion } public virtual bool CheckVendorAccess(BaseVendor vendor, Mobile from) => - from.AccessLevel >= AccessLevel.GameMaster || IsDisabled() || from.Kills < 5; + from.AccessLevel >= AccessLevel.GameMaster || IsDisabled() || !from.Murderer; public override bool OnBeginSpellCast(Mobile m, ISpell s) { @@ -171,7 +171,7 @@ public class GuardedRegion : BaseRegion return; } - if (!AllowReds && (m.Kills >= 5 || m is BaseCreature { AlwaysMurderer: true })) + if (!AllowReds && m.Murderer) { CheckGuardCandidate(m); } @@ -334,7 +334,7 @@ public class GuardedRegion : BaseRegion return false; } - return !AllowReds && (m.Kills >= 5 || bc?.AlwaysMurderer == true) || m.Criminal; + return !AllowReds && m.Murderer || m.Criminal; } private class GuardTimer : Timer diff --git a/Projects/UOContent/Spells/Base/SpellHelper.cs b/Projects/UOContent/Spells/Base/SpellHelper.cs index ccdf9b69d..ab1bb55c4 100644 --- a/Projects/UOContent/Spells/Base/SpellHelper.cs +++ b/Projects/UOContent/Spells/Base/SpellHelper.cs @@ -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( diff --git a/Projects/UOContent/Spells/Chivalry/SacredJourney.cs b/Projects/UOContent/Spells/Chivalry/SacredJourney.cs index 38dd6ff2c..396321dac 100644 --- a/Projects/UOContent/Spells/Chivalry/SacredJourney.cs +++ b/Projects/UOContent/Spells/Chivalry/SacredJourney.cs @@ -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. } diff --git a/Projects/UOContent/Spells/Fourth/Recall.cs b/Projects/UOContent/Spells/Fourth/Recall.cs index 5bd59340a..fd40bcfee 100644 --- a/Projects/UOContent/Spells/Fourth/Recall.cs +++ b/Projects/UOContent/Spells/Fourth/Recall.cs @@ -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. } diff --git a/Projects/UOContent/Spells/Seventh/GateTravel.cs b/Projects/UOContent/Spells/Seventh/GateTravel.cs index f35a6a157..3e87a721f 100644 --- a/Projects/UOContent/Spells/Seventh/GateTravel.cs +++ b/Projects/UOContent/Spells/Seventh/GateTravel.cs @@ -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. }