diff --git a/Projects/UOContent/Engines/Player Murder System/MurderContext.cs b/Projects/UOContent/Engines/Player Murder System/MurderContext.cs index 2bfa70eac..e09b94dd4 100644 --- a/Projects/UOContent/Engines/Player Murder System/MurderContext.cs +++ b/Projects/UOContent/Engines/Player Murder System/MurderContext.cs @@ -26,7 +26,7 @@ public partial class MurderContext [SerializableField(3)] [SerializedCommandProperty(AccessLevel.GameMaster)] - private int _pingPong; + private int _pingPongs; private void MigrateFrom(V0Content content) { @@ -34,7 +34,7 @@ public partial class MurderContext _longTermElapse = content.LongTermElapse; _shortTermMurders = content.ShortTermMurders; // Players already at >= 5 kills have crossed the threshold at least once - _pingPong = _player.Kills >= 5 ? 1 : 0; + _pingPongs = _player.Kills >= 5 ? 1 : 0; } public PlayerMobile _player; @@ -78,7 +78,7 @@ public partial class MurderContext } } - public bool CanRemove() => _pingPong <= 0 && _shortTermMurders <= 0 && _player.Kills <= 0; + public bool CanRemove() => _pingPongs <= 0 && _shortTermMurders <= 0 && _player.Kills <= 0; public bool CheckStart() { diff --git a/Projects/UOContent/Engines/Player Murder System/PlayerMurderSystem.cs b/Projects/UOContent/Engines/Player Murder System/PlayerMurderSystem.cs index 6afebdfe5..ff3fc49c7 100644 --- a/Projects/UOContent/Engines/Player Murder System/PlayerMurderSystem.cs +++ b/Projects/UOContent/Engines/Player Murder System/PlayerMurderSystem.cs @@ -176,7 +176,7 @@ public class PlayerMurderSystem : GenericPersistence public static void ManuallySetPingPong(PlayerMobile player, int pingPong) { var context = GetOrCreateMurderContext(player); - context.PingPong = Math.Max(pingPong, 0); + context.PingPongs = Math.Max(pingPong, 0); UpdateMurderContext(context); } @@ -197,7 +197,7 @@ public class PlayerMurderSystem : GenericPersistence if (PingPongEnabled && player.Kills == 5) { - context.PingPong++; + context.PingPongs++; } context.ResetKillTime(); @@ -238,14 +238,14 @@ public class PlayerMurderSystem : GenericPersistence player.SendMessage($"Long Term Murders: {player.Kills}"); if (PingPongEnabled) { - player.SendMessage($"Ping Pongs: {player.PingPong}"); + player.SendMessage($"Ping Pongs: {player.PingPongs}"); } } else if (!Core.T2A) { // No "i must consider my sins" before t2a } - else if (PingPongEnabled && player.Murderer) + else if (PingPongEnabled && player.PingPongs >= 5) { // Thou art known throughout the land as a murderous brigand. player.SendLocalizedMessage(502123, "", player.ShortTermMurders >= 5 ? 0x22 : 0x59); diff --git a/Projects/UOContent/Migrations/Server.Engines.PlayerMurderSystem.MurderContext.v1.json b/Projects/UOContent/Migrations/Server.Engines.PlayerMurderSystem.MurderContext.v1.json index a18b7941f..2dee75847 100644 --- a/Projects/UOContent/Migrations/Server.Engines.PlayerMurderSystem.MurderContext.v1.json +++ b/Projects/UOContent/Migrations/Server.Engines.PlayerMurderSystem.MurderContext.v1.json @@ -21,7 +21,7 @@ ] }, { - "name": "PingPong", + "name": "PingPongs", "type": "int", "rule": "PrimitiveTypeMigrationRule", "ruleArguments": [ diff --git a/Projects/UOContent/Mobiles/PlayerMobile.cs b/Projects/UOContent/Mobiles/PlayerMobile.cs index 811935b55..9ec955605 100644 --- a/Projects/UOContent/Mobiles/PlayerMobile.cs +++ b/Projects/UOContent/Mobiles/PlayerMobile.cs @@ -355,10 +355,8 @@ namespace Server.Mobiles public override bool NewGuildDisplay => Guilds.Guild.NewGuildSystem; public override bool Murderer => - (Core.T2A && !Core.LBR - && PlayerMurderSystem.GetMurderContext(this, out var context) - && context.PingPong >= 5) - || base.Murderer; + Core.T2A && !Core.LBR && PlayerMurderSystem.GetMurderContext(this, out var context) + && context.PingPongs >= 5 || base.Murderer; public bool BedrollLogout { get; set; } @@ -707,9 +705,9 @@ namespace Server.Mobiles public ChampionTitleContext ChampionTitles => ChampionTitleSystem.GetOrCreateChampionTitleContext(this); [CommandProperty(AccessLevel.GameMaster)] - public int PingPong + public int PingPongs { - get => PlayerMurderSystem.GetMurderContext(this, out var context) ? context.PingPong : 0; + get => PlayerMurderSystem.GetMurderContext(this, out var context) ? context.PingPongs : 0; set => PlayerMurderSystem.ManuallySetPingPong(this, value); }