From 78278a0b9343116975588b86278a6dc250409317 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 12 Mar 2017 20:15:21 +0000 Subject: [PATCH] Fixed a mistake in old effect handling --- src/pocketmine/entity/Effect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/Effect.php b/src/pocketmine/entity/Effect.php index ccbe3d109..f901245fb 100644 --- a/src/pocketmine/entity/Effect.php +++ b/src/pocketmine/entity/Effect.php @@ -291,7 +291,7 @@ class Effect{ case Effect::HEALTH_BOOST: $attr = $entity->getAttributeMap()->getAttribute(Attribute::HEALTH); if($ev->willModify() and $oldEffect !== null){ - $max = $attr->getMaxValue() - (4 * ($this->amplifier + 1)); + $max = $attr->getMaxValue() - (4 * ($oldEffect->getAmplifier() + 1)); }else{ $max = $attr->getMaxValue(); }