1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-16 09:28:24 +02:00

Add option to toggle monthly artifact change in black market (#341)

* Add black market art change as hardcodedFeature
This commit is contained in:
Dydzio
2017-07-14 23:46:18 +02:00
committed by ArseniyShestakov
parent ea0ceb1805
commit 98140aab6b
5 changed files with 19 additions and 3 deletions
+4
View File
@@ -17,6 +17,7 @@
#include "../CCreatureHandler.h"
#include "../CGameState.h"
#include "CGTownInstance.h"
#include "../CModHandler.h"
///helpers
static void openWindow(const OpenWindow::EWindow type, const int id1, const int id2 = -1)
@@ -283,6 +284,9 @@ std::vector<int> CGBlackMarket::availableItemsIds(EMarketMode::EMarketMode mode)
void CGBlackMarket::newTurn(CRandomGenerator & rand) const
{
if(!VLC->modh->settings.BLACK_MARKET_MONTHLY_ARTIFACTS_CHANGE) //check if feature changing OH3 behavior is enabled
return;
if(cb->getDate(Date::DAY_OF_MONTH) != 1) //new month
return;