public function getVirtualLevel(int $xp): int
    {
        $xpTable = $this->getXpTable();

        for ($level = 1; $level <= count($xpTable); $level++) {
            if ($xpTable[$level] > $xp) {
                $level--;
                break;
            }
        }

        $level = max($this->getMinimumLevel(), $level);

        return $level;
    }