armor is not resisting damage from anything except players, drop fix, and baby fix

This commit is contained in:
GameHerobrine 2022-07-11 16:23:54 +03:00
parent e31546afa7
commit b73205744e
4 changed files with 69 additions and 68 deletions

View file

@ -960,8 +960,8 @@ class Entity extends Position{
);
foreach($this->player->armor as $slot=>$part){
if($part instanceof Item and isset($values[$part->getID()])){
$points += $values[$part->getID()];
if(is_numeric($cause)){ //check was entity damage by another entity
$points += $values[$part->getID()];
$this->player->damageArmorPart($slot, $part);
}
}