Skip to content

Commit

Permalink
fix: Fixes explosion potion timer offset (#2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman authored Jan 2, 2025
1 parent 57a7861 commit f3c7a0e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,15 @@ protected override void OnTick()
}

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;
Expand All @@ -325,11 +326,11 @@ protected override void OnTick()
}
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());
}
}
}
Expand Down

0 comments on commit f3c7a0e

Please sign in to comment.