mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
PlayerState now stores all objects owned by player
This commit is contained in:
@@ -710,11 +710,11 @@ bool PlayerMessageProcessor::handleCheatCode(const std::string & cheat, PlayerCo
|
||||
executeCheatCode(cheatName, i.first, ObjectInstanceID::NONE, parameters);
|
||||
|
||||
if (vstd::contains(townTargetedCheats, cheatName))
|
||||
for (const auto & t : i.second.towns)
|
||||
for (const auto & t : i.second.getTowns())
|
||||
executeCheatCode(cheatName, i.first, t->id, parameters);
|
||||
|
||||
if (vstd::contains(heroTargetedCheats, cheatName))
|
||||
for (const auto & h : i.second.heroes)
|
||||
for (const auto & h : i.second.getHeroes())
|
||||
executeCheatCode(cheatName, i.first, h->id, parameters);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user