mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Fixed a mistake in old effect handling
This commit is contained in:
@ -291,7 +291,7 @@ class Effect{
|
|||||||
case Effect::HEALTH_BOOST:
|
case Effect::HEALTH_BOOST:
|
||||||
$attr = $entity->getAttributeMap()->getAttribute(Attribute::HEALTH);
|
$attr = $entity->getAttributeMap()->getAttribute(Attribute::HEALTH);
|
||||||
if($ev->willModify() and $oldEffect !== null){
|
if($ev->willModify() and $oldEffect !== null){
|
||||||
$max = $attr->getMaxValue() - (4 * ($this->amplifier + 1));
|
$max = $attr->getMaxValue() - (4 * ($oldEffect->getAmplifier() + 1));
|
||||||
}else{
|
}else{
|
||||||
$max = $attr->getMaxValue();
|
$max = $attr->getMaxValue();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user