mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fixed #1271.
This commit is contained in:
@@ -6154,6 +6154,15 @@ void CGameHandler::removeAfterVisit(const CGObjectInstance *object)
|
||||
assert("This function needs to be called during the object visit!");
|
||||
}
|
||||
|
||||
bool CGameHandler::isVisitCoveredByAnotherQuery(const CGObjectInstance *obj, const CGHeroInstance *hero)
|
||||
{
|
||||
if(auto topQuery = queries.topQuery(hero->getOwner()))
|
||||
if(auto visit = std::dynamic_pointer_cast<const CObjectVisitQuery>(topQuery))
|
||||
return !(visit->visitedObject == obj && visit->visitingHero == hero);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CasualtiesAfterBattle::CasualtiesAfterBattle(const CArmedInstance *army, BattleInfo *bat)
|
||||
{
|
||||
heroWithDeadCommander = ObjectInstanceID();
|
||||
|
||||
Reference in New Issue
Block a user