mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Correct armor checks
This commit is contained in:
parent
e3e7919652
commit
45ee7ea7ae
2 changed files with 57 additions and 22 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue