1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00

fixed random reward generation in CGVisitableOPW

This commit is contained in:
AlexVinS
2016-10-11 18:00:54 +03:00
parent 7db7ece143
commit 5c3f84138b
3 changed files with 13 additions and 4 deletions

View File

@ -7,7 +7,7 @@
* Full text of license available in license.txt file, in main folder
*
*/
#include "StdInc.h"
#include "ResourceSet.h"
#include "StringConstants.h"
@ -40,6 +40,12 @@ void Res::ResourceSet::amax(const TResourceCap &val)
::vstd::amax(elem, val);
}
void Res::ResourceSet::amin(const TResourceCap &val)
{
for(auto & elem : *this)
::vstd::amin(elem, val);
}
void Res::ResourceSet::positive()
{
for(auto & elem : *this)