mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Correct armor checks
This commit is contained in:
@@ -570,6 +570,7 @@ class Entity extends Position{
|
||||
"meta" => $this->player->getSlot($this->player->slot)->getMetadata(),
|
||||
"slot" => 0,
|
||||
));
|
||||
$this->player->sendArmor($player);
|
||||
break;
|
||||
case ENTITY_ITEM:
|
||||
$player->dataPacket(MC_ADD_ITEM_ENTITY, array(
|
||||
@@ -820,8 +821,8 @@ class Entity extends Position{
|
||||
DIAMOND_BOOTS => 3,
|
||||
);
|
||||
foreach($this->player->armor as $part){
|
||||
if(isset($values[$part[0]])){
|
||||
$points += $values[$part[0]];
|
||||
if($part instanceof Item and isset($values[$part->getID()])){
|
||||
$points += $values[$part->getID()];
|
||||
}
|
||||
}
|
||||
$dmg = (int) ($dmg - ($dmg * $points * 0.04));
|
||||
|
Reference in New Issue
Block a user