From f3c7a0e0353127f0415326c59d450e5a9d5fb885 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Wed, 1 Jan 2025 20:28:12 -0800 Subject: [PATCH] fix: Fixes explosion potion timer offset (#2047) --- .../Potions/Explosion Potions/BaseExplosionPotion.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs index 24f954913..928fb9bc1 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs @@ -294,14 +294,15 @@ public abstract partial class BaseExplosionPotion : BasePotion } var parent = _potion.FindParent(_from); + var remainingCount = RemainingCount - 1; - if (RemainingCount > 3) + if (remainingCount > 3) { return; } // Remaining decrements after OnTick so it is off by 1 - if (RemainingCount <= 1) + if (remainingCount <= 0) { Point3D loc; Map map; @@ -325,11 +326,11 @@ public abstract partial class BaseExplosionPotion : BasePotion } else if (parent is Item item) { - item.PublicOverheadMessage(MessageType.Regular, 0x22, false, RemainingCount.ToString()); + item.PublicOverheadMessage(MessageType.Regular, 0x22, false, remainingCount.ToString()); } else if (parent is Mobile mobile) { - mobile.PublicOverheadMessage(MessageType.Regular, 0x22, false, RemainingCount.ToString()); + mobile.PublicOverheadMessage(MessageType.Regular, 0x22, false, remainingCount.ToString()); } } }