avatarDir = dirname(__FILE__) . '/../www/resources/avatars/'; } public function complete(): bool { return $this->gamerTag !== null; } public function getAvatarLargeUrl(): string { if (strpos($this->avatar, '://')) { return $this->avatar; } if (file_exists($this->avatarDir . $this->avatar . '.large.jpg')) { $ext = 'jpg'; } else { $ext = 'png'; } return 'http://l2.gamestickservices.net/resources/avatars/' . $this->avatar . '.large.' . $ext; } public function getAvatarSmallUrl(): string { if (strpos($this->avatar, '://')) { return $this->avatar; } if (file_exists($this->avatarDir . $this->avatar . '.small.jpg')) { $ext = 'jpg'; } else { $ext = 'png'; } return 'http://l2.gamestickservices.net/resources/avatars/' . $this->avatar . '.small.' . $ext; } }