mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed #1652.
This commit is contained in:
parent
343dd1a7d1
commit
30aa07f86c
@ -1319,11 +1319,11 @@ void CGameState::prepareCrossoverHeroes(std::vector<CGameState::CampaignHeroRepl
|
||||
auto artifactPosition = ArtifactPosition(i);
|
||||
if(artifactPosition == ArtifactPosition::SPELLBOOK) continue; // do not handle spellbook this way
|
||||
|
||||
// TODO: why would there be nullptr artifacts?
|
||||
const ArtSlotInfo *info = hero->getSlot(artifactPosition);
|
||||
if(!info)
|
||||
continue;
|
||||
|
||||
// TODO: why would there be nullptr artifacts?
|
||||
const CArtifactInstance *art = info->artifact;
|
||||
if(!art)
|
||||
continue;
|
||||
@ -1352,6 +1352,17 @@ void CGameState::prepareCrossoverHeroes(std::vector<CGameState::CampaignHeroRepl
|
||||
if(shouldSlotBeErased(slotPair))
|
||||
cgh->eraseStack(slotPair.first);
|
||||
}
|
||||
|
||||
// Removing short-term bonuses
|
||||
for(CGHeroInstance * cgh : crossoverHeroes)
|
||||
{
|
||||
cgh->popBonuses(Selector::durationType(Bonus::ONE_DAY));
|
||||
cgh->popBonuses(Selector::durationType(Bonus::ONE_WEEK));
|
||||
cgh->popBonuses(Selector::durationType(Bonus::N_TURNS));
|
||||
cgh->popBonuses(Selector::durationType(Bonus::N_DAYS));
|
||||
cgh->popBonuses(Selector::durationType(Bonus::ONE_BATTLE));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CGameState::placeStartingHeroes()
|
||||
|
Loading…
Reference in New Issue
Block a user