1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Make IObjectInterface::cb non-static

This commit is contained in:
Ivan Savenko
2024-01-01 16:37:48 +02:00
parent c37ce05d06
commit a15366f5a5
89 changed files with 502 additions and 445 deletions

View File

@@ -69,13 +69,13 @@ bool Rewardable::Limiter::heroAllowed(const CGHeroInstance * hero) const
{
if(dayOfWeek != 0)
{
if (IObjectInterface::cb->getDate(Date::DAY_OF_WEEK) != dayOfWeek)
if (hero->cb->getDate(Date::DAY_OF_WEEK) != dayOfWeek)
return false;
}
if(daysPassed != 0)
{
if (IObjectInterface::cb->getDate(Date::DAY) < daysPassed)
if (hero->cb->getDate(Date::DAY) < daysPassed)
return false;
}
@@ -92,7 +92,7 @@ bool Rewardable::Limiter::heroAllowed(const CGHeroInstance * hero) const
return false;
}
if(!IObjectInterface::cb->getPlayerState(hero->tempOwner)->resources.canAfford(resources))
if(!hero->cb->getPlayerState(hero->tempOwner)->resources.canAfford(resources))
return false;
if(heroLevel > static_cast<si32>(hero->level))