public function decode()
{
$this->type = $this->getByte();
switch ($this->type) {
case self::TYPE_POPUP:
case self::TYPE_CHAT:
$this->source = $this->getString();
case self::TYPE_RAW:
case self::TYPE_TIP:
case self::TYPE_SYSTEM:
$this->message = $this->getString();
break;
case self::TYPE_TRANSLATION:
$this->message = $this->getString();
$count = $this->getByte();
for ($i = 0; $i < $count; ++$i) {
$this->parameters[] = $this->getString();
}
}
}