mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
fix dragon utopia
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user