mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Refactor of health int -> float and fixed armor being useless when
computed damage reduction is less than 1
This commit is contained in:
@ -2276,7 +2276,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$points += $armorItem->getDefensePoints();
|
||||
}
|
||||
|
||||
$damage[EntityDamageEvent::MODIFIER_ARMOR] = -floor($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04);
|
||||
$damage[EntityDamageEvent::MODIFIER_ARMOR] = -($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04);
|
||||
}
|
||||
|
||||
$ev = new EntityDamageByEntityEvent($this, $target, EntityDamageEvent::CAUSE_ENTITY_ATTACK, $damage);
|
||||
|
Reference in New Issue
Block a user