mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Remove ConstTransitivePtr from hero and town instances
This commit is contained in:
@ -773,7 +773,7 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
|
||||
const CGHeroInstance * hero = gameHandler->getHero(currObj);
|
||||
const CGTownInstance * town = gameHandler->getTown(currObj);
|
||||
if (!town && hero)
|
||||
town = hero->visitedTown;
|
||||
town = hero->getVisitedTown();
|
||||
|
||||
const auto & doCheatGiveSpells = [&]() { cheatGiveSpells(player, hero); };
|
||||
const auto & doCheatBuildTown = [&]() { cheatBuildTown(player, town); };
|
||||
|
Reference in New Issue
Block a user