From 20855ddff3ab3502248550f6fc800eb6f75066d2 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sat, 6 Jul 2024 16:49:23 -0700 Subject: [PATCH] fix: Fixes strength potion candrink check (#1863) --- .../Potions/Strength Potions/BaseStrengthPotion.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Strength Potions/BaseStrengthPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Strength Potions/BaseStrengthPotion.cs index a251a2a48..aa15fe430 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Strength Potions/BaseStrengthPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Strength Potions/BaseStrengthPotion.cs @@ -14,7 +14,7 @@ public abstract partial class BaseStrengthPotion : BasePotion public abstract int StrOffset { get; } public abstract TimeSpan Duration { get; } - public bool CanDrink(Mobile from) + public override bool CanDrink(Mobile from) { if (!base.CanDrink(from)) { @@ -22,15 +22,15 @@ public abstract partial class BaseStrengthPotion : BasePotion } // TODO: Verify scaled; is it offset, duration, or both? - if (SpellHelper.AddStatOffset(from, StatType.Str, Scale(from, StrOffset), Duration)) + if (!SpellHelper.AddStatOffset(from, StatType.Str, Scale(from, StrOffset), Duration)) { - from.FixedEffect(0x375A, 10, 15); - from.PlaySound(0x1E7); - return true; + from.SendLocalizedMessage(502173); // You are already under a similar effect. + return false; } - from.SendLocalizedMessage(502173); // You are already under a similar effect. - return false; + from.FixedEffect(0x375A, 10, 15); + from.PlaySound(0x1E7); + return true; } public override void Drink(Mobile from)