mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
cheats + grail in town
This commit is contained in:
@@ -1695,6 +1695,9 @@ void CPlayerInterface::requestReturningToMainMenu(bool won)
|
|||||||
for(const CGHeroInstance * h : cb->getHeroesInfo())
|
for(const CGHeroInstance * h : cb->getHeroesInfo())
|
||||||
if(h->hasArt(ArtifactID::GRAIL))
|
if(h->hasArt(ArtifactID::GRAIL))
|
||||||
param.hasGrail = true;
|
param.hasGrail = true;
|
||||||
|
for(const CGTownInstance * t : cb->getTownInfo())
|
||||||
|
if(t->builtBuildings.find(BuildingID::GRAIL))
|
||||||
|
param.hasGrail = true;
|
||||||
param.allDefeated = true;
|
param.allDefeated = true;
|
||||||
for (PlayerColor player(0); player < PlayerColor::PLAYER_LIMIT; ++player)
|
for (PlayerColor player(0); player < PlayerColor::PLAYER_LIMIT; ++player)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -513,8 +513,14 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
|
|||||||
|
|
||||||
assert(callbacks.count(cheatName));
|
assert(callbacks.count(cheatName));
|
||||||
if (callbacks.count(cheatName))
|
if (callbacks.count(cheatName))
|
||||||
|
{
|
||||||
|
PlayerCheated pc;
|
||||||
|
pc.player = player;
|
||||||
|
gameHandler->sendAndApply(&pc);
|
||||||
|
|
||||||
callbacks.at(cheatName)();
|
callbacks.at(cheatName)();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PlayerMessageProcessor::sendSystemMessage(std::shared_ptr<CConnection> connection, const std::string & message)
|
void PlayerMessageProcessor::sendSystemMessage(std::shared_ptr<CConnection> connection, const std::string & message)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user