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

fix dragon utopia

This commit is contained in:
Laserlicht 2024-08-14 19:55:14 +02:00
parent ec2163b974
commit 7964f77f27

View File

@ -275,6 +275,10 @@ void CBank::doVisit(const CGHeroInstance * hero) const
//grant resources
if (bankConfig)
{
// add statistics
if(ID.toEnum() == Obj::DRAGON_UTOPIA)
cb->gameState()->statistic.accumulatedValues[hero->getOwner()].lastRansackingDragonUtopiaDay = cb->gameState()->getDate(Date::DAY);
for (GameResID it : GameResID::ALL_RESOURCES())
{
if (bankConfig->resources[it] != 0)
@ -383,13 +387,6 @@ void CBank::doVisit(const CGHeroInstance * hero) const
}
cb->setObjPropertyValue(id, ObjProperty::BANK_CLEAR); //bc = nullptr
}
// add statistics
if(bankConfig)
{
if(ID.toEnum() == Obj::DRAGON_UTOPIA)
cb->gameState()->statistic.accumulatedValues[hero->getOwner()].lastRansackingDragonUtopiaDay = cb->gameState()->getDate(Date::DAY);
}
}
void CBank::battleFinished(const CGHeroInstance *hero, const BattleResult &result) const