1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Merge commit '3c844002626f48007a888d4dd8b0b45ec867fc9a' into feature/VCMIMapFormat1

Conflicts:
	lib/mapObjects/CGHeroInstance.cpp
This commit is contained in:
AlexVinS
2016-02-03 05:04:44 +03:00
24 changed files with 411 additions and 217 deletions

View File

@ -1219,8 +1219,8 @@ CGameState::CrossoverHeroesList CGameState::getCrossoverHeroesFromPreviousScenar
// remove heroes which didn't reached the end of the scenario, but were available at the start
for(auto hero : lostCrossoverHeroes)
{
crossoverHeroes.heroesFromAnyPreviousScenarios.erase(range::remove_if(crossoverHeroes.heroesFromAnyPreviousScenarios,
CGObjectInstanceBySubIdFinder(hero)), crossoverHeroes.heroesFromAnyPreviousScenarios.end());
vstd::erase_if(crossoverHeroes.heroesFromAnyPreviousScenarios,
CGObjectInstanceBySubIdFinder(hero));
}
// now add heroes which completed the scenario
@ -2268,7 +2268,7 @@ EVictoryLossCheckResult CGameState::checkForVictoryAndLoss(PlayerColor player) c
for (const TriggeredEvent & event : map->triggeredEvents)
{
if ((event.trigger.test(evaluateEvent)))
if (event.trigger.test(evaluateEvent))
{
if (event.effect.type == EventEffect::VICTORY)
return EVictoryLossCheckResult::victory(event.onFulfill, event.effect.toOtherMessage);
@ -2285,7 +2285,7 @@ EVictoryLossCheckResult CGameState::checkForVictoryAndLoss(PlayerColor player) c
return EVictoryLossCheckResult();
}
bool CGameState::checkForVictory( PlayerColor player, const EventCondition & condition ) const
bool CGameState::checkForVictory(PlayerColor player, const EventCondition & condition) const
{
const PlayerState *p = CGameInfoCallback::getPlayer(player);
switch (condition.condition)