mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed empty Black Market on game start
This commit is contained in:
parent
01af231084
commit
5a5aced67e
@ -2,6 +2,7 @@
|
||||
|
||||
### GENERAL:
|
||||
* Fixed movement cost penalty from terrain
|
||||
* Fixed empty Black Market on game start
|
||||
* Fixed blocked progress in Launcher on language detection failure
|
||||
* Launcher will now correctly handle selection of Data directory in H3 install
|
||||
|
||||
|
@ -279,10 +279,10 @@ void CGBlackMarket::newTurn(CRandomGenerator & rand) const
|
||||
{
|
||||
int resetPeriod = VLC->settings()->getInteger(EGameSettings::MARKETS_BLACK_MARKET_RESTOCK_PERIOD);
|
||||
|
||||
if(resetPeriod == 0) //check if feature changing OH3 behavior is enabled
|
||||
return;
|
||||
bool isFirstDay = cb->getDate(Date::DAY) == 1;
|
||||
bool regularResetTriggered = resetPeriod != 0 && ((cb->getDate(Date::DAY)-1) % resetPeriod) != 0;
|
||||
|
||||
if (((cb->getDate(Date::DAY)-1) % resetPeriod) != 0)
|
||||
if (!isFirstDay && !regularResetTriggered)
|
||||
return;
|
||||
|
||||
SetAvailableArtifacts saa;
|
||||
|
Loading…
Reference in New Issue
Block a user