Refactored Server::broadcastPacket() to be non-static

Why the hell was this static at all? Seriously Shoghi?
This commit is contained in:
Dylan K. Taylor
2017-01-02 21:36:26 +00:00
parent 55791e0819
commit 0bd7ea211d
8 changed files with 23 additions and 23 deletions

View File

@ -74,7 +74,7 @@ abstract class Living extends Entity implements Damageable{
$pk = new EntityEventPacket();
$pk->eid = $this->getId();
$pk->event = EntityEventPacket::RESPAWN;
Server::broadcastPacket($this->hasSpawned, $pk);
$this->server->broadcastPacket($this->hasSpawned, $pk);
}
}
@ -136,7 +136,7 @@ abstract class Living extends Entity implements Damageable{
$pk = new EntityEventPacket();
$pk->eid = $this->getId();
$pk->event = $this->getHealth() <= 0 ? EntityEventPacket::DEATH_ANIMATION : EntityEventPacket::HURT_ANIMATION; //Ouch!
Server::broadcastPacket($this->hasSpawned, $pk);
$this->server->broadcastPacket($this->hasSpawned, $pk);
$this->attackTime = 10; //0.5 seconds cooldown
}

View File

@ -66,7 +66,7 @@ class Squid extends WaterAnimal implements Ageable{
$pk = new EntityEventPacket();
$pk->eid = $this->getId();
$pk->event = EntityEventPacket::SQUID_INK_CLOUD;
Server::broadcastPacket($this->hasSpawned, $pk);
$this->server->broadcastPacket($this->hasSpawned, $pk);
}
}