diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 3d0a3619bd0..7a317106074 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -771,12 +771,18 @@ std::vector PlayerWheel::getRevealedGems() const { if (unlockedGemUUIDs.empty()) { return unlockedGems; } + std::vector sortedUnlockedGemGUIDs; for (const auto &uuid : unlockedGemUUIDs) { sortedUnlockedGemGUIDs.push_back(uuid); } + std::sort(sortedUnlockedGemGUIDs.begin(), sortedUnlockedGemGUIDs.end(), [](const std::string &a, const std::string &b) { - return std::stoull(a) < std::stoull(b); + if (std::ranges::all_of(a, ::isdigit) && std::ranges::all_of(b, ::isdigit)) { + return std::stoull(a) < std::stoull(b); + } else { + return a < b; + } }); for (const auto &uuid : sortedUnlockedGemGUIDs) {