37 public static function create(?
int $headSlotDamage, ?
int $chestSlotDamage, ?
int $legsSlotDamage, ?
int $feetSlotDamage, ?
int $bodySlotDamage) : self{
39 $result->headSlotDamage = $headSlotDamage;
40 $result->chestSlotDamage = $chestSlotDamage;
41 $result->legsSlotDamage = $legsSlotDamage;
42 $result->feetSlotDamage = $feetSlotDamage;
43 $result->bodySlotDamage = $bodySlotDamage;
65 $flags = $in->getByte();
67 $this->headSlotDamage = $this->maybeReadDamage($flags, self::FLAG_HEAD, $in);
68 $this->chestSlotDamage = $this->maybeReadDamage($flags, self::FLAG_CHEST, $in);
69 $this->legsSlotDamage = $this->maybeReadDamage($flags, self::FLAG_LEGS, $in);
70 $this->feetSlotDamage = $this->maybeReadDamage($flags, self::FLAG_FEET, $in);
71 $this->bodySlotDamage = $this->maybeReadDamage($flags, self::FLAG_BODY, $in);
86 $this->composeFlag($this->headSlotDamage, self::FLAG_HEAD) |
87 $this->composeFlag($this->chestSlotDamage, self::FLAG_CHEST) |
88 $this->composeFlag($this->legsSlotDamage, self::FLAG_LEGS) |
89 $this->composeFlag($this->feetSlotDamage, self::FLAG_FEET) |
90 $this->composeFlag($this->bodySlotDamage, self::FLAG_BODY)
93 $this->maybeWriteDamage($this->headSlotDamage, $out);
94 $this->maybeWriteDamage($this->chestSlotDamage, $out);
95 $this->maybeWriteDamage($this->legsSlotDamage, $out);
96 $this->maybeWriteDamage($this->feetSlotDamage, $out);
97 $this->maybeWriteDamage($this->bodySlotDamage, $out);