public static function menuUpgradesSelect(Player $player, $row) { $skill = Players::GetSkillByName($row); if (!$skill || ($pts = $player->GetUpgradePoints()) == 0) { return; } $nextlevel = $player->GetSkill($skill->flag) + 1; if ($nextlevel <= $skill->maxlevel && $player->GetLevel() >= $skill->reqlevels[$nextlevel] && ($skill->reqskill == -1 || $player->GetSkill($skill->reqskill) >= $skill->reqskill_level)) { $player->SetSkill($skill->flag, $nextlevel); $player->SetUpgradePoints($pts - 1); $player->Send(COLOR_UPGRADE_DONE, "[UGPRADE] You upgraded the skill '{$skill->name}' to the level {$nextlevel}"); } }