1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Replaced most of usages of CRandomGenerator with vstd::RNG in library

This commit is contained in:
Ivan Savenko
2024-06-01 15:28:17 +00:00
parent 60a51e98de
commit 63bcf7d83c
125 changed files with 620 additions and 409 deletions

View File

@ -20,6 +20,8 @@
#include "../networkPacks/PacksForClient.h"
#include "../serializer/JsonSerializeFormat.h"
#include <vstd/RNG.h>
VCMI_LIB_NAMESPACE_BEGIN
void CRewardableObject::grantRewardWithMessage(const CGHeroInstance * contextHero, int index, bool markAsVisit) const
@ -387,7 +389,7 @@ void CRewardableObject::setPropertyDer(ObjProperty what, ObjPropertyID identifie
}
}
void CRewardableObject::newTurn(CRandomGenerator & rand) const
void CRewardableObject::newTurn(vstd::RNG & rand) const
{
if (configuration.resetParameters.period != 0 && cb->getDate(Date::DAY) > 1 && ((cb->getDate(Date::DAY)-1) % configuration.resetParameters.period) == 0)
{
@ -404,7 +406,7 @@ void CRewardableObject::newTurn(CRandomGenerator & rand) const
}
}
void CRewardableObject::initObj(CRandomGenerator & rand)
void CRewardableObject::initObj(vstd::RNG & rand)
{
getObjectHandler()->configureObject(this, rand);
}