mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix reset of rewardable objects with reset period of 1 day
This commit is contained in:
parent
7bbaae75a2
commit
d82822d37a
@ -538,7 +538,7 @@ void CRewardableObject::triggerReset() const
|
||||
|
||||
void CRewardableObject::newTurn(CRandomGenerator & rand) const
|
||||
{
|
||||
if (resetParameters.period != 0 && cb->getDate(Date::DAY) > 1 && (cb->getDate(Date::DAY) % resetParameters.period) == 1)
|
||||
if (resetParameters.period != 0 && cb->getDate(Date::DAY) > 1 && ((cb->getDate(Date::DAY)-1) % resetParameters.period) == 0)
|
||||
triggerReset();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user