From 70bdec41a3c33818a130d2338f8adba86d18c04d Mon Sep 17 00:00:00 2001 From: Michael <13953785+Laserlicht@users.noreply.github.com> Date: Sat, 20 May 2023 01:14:06 +0200 Subject: [PATCH] case-insensitive cheats --- server/CGameHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 450fcef11..1ce070f19 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -6870,6 +6870,9 @@ void CGameHandler::spawnWanderingMonsters(CreatureID creatureID) void CGameHandler::handleCheatCode(std::string & cheat, PlayerColor player, const CGHeroInstance * hero, const CGTownInstance * town, bool & cheated) { + //Make cheat case-insensitive + std::transform(cheat.begin(), cheat.end(), cheat.begin(), [](unsigned char c){ return std::tolower(c); }); + if (cheat == "vcmiistari" || cheat == "vcmispells") { cheated = true;