Fixed changing skins crashing the server

This commit is contained in:
Stephen 2019-11-05 20:25:45 -05:00
parent 5ebe9859e9
commit 3b7ded0ba3
2 changed files with 4 additions and 2 deletions

View File

@ -66,8 +66,9 @@ class PlayerListPacket extends DataPacket{
$skinId = $this->getString();
$skinResourcePatch = $this->getString();
$skinData = $this->getImage();
$animationCount = $this->getLInt();
$animations = [];
for($i = 0; $i < $this->getLInt(); ++$i){
for($i = 0; $i < $animationCount; ++$i){
$animations[] = new SkinAnimation($this->getImage(), $this->getLInt(), $this->getLFloat());
}
$capeData = $this->getImage();

View File

@ -45,8 +45,9 @@ class PlayerSkinPacket extends DataPacket{
$skinId = $this->getString();
$skinResourcePatch = $this->getString();
$skinData = $this->getImage();
$animationCount = $this->getLInt();
$animations = [];
for($i = 0; $i < $this->getLInt(); ++$i){
for($i = 0; $i < $animationCount; ++$i){
$animations[] = new SkinAnimation($this->getImage(), $this->getLInt(), $this->getLFloat());
}
$capeData = $this->getImage();