mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge pull request #1700 from rilian-la-te/resource-array
Modernize resourceSet.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "CCreatureHandler.h"
|
||||
|
||||
#include "CGeneralTextHandler.h"
|
||||
#include "ResourceSet.h"
|
||||
#include "filesystem/Filesystem.h"
|
||||
#include "VCMI_Lib.h"
|
||||
#include "CGameState.h"
|
||||
@@ -267,7 +268,7 @@ bool CCreature::isEvil () const
|
||||
return (*VLC->townh)[faction]->alignment == EAlignment::EVIL;
|
||||
}
|
||||
|
||||
si32 CCreature::maxAmount(const std::vector<si32> &res) const //how many creatures can be bought
|
||||
si32 CCreature::maxAmount(const TResources &res) const //how many creatures can be bought
|
||||
{
|
||||
int ret = 2147483645;
|
||||
int resAmnt = static_cast<int>(std::min(res.size(),cost.size()));
|
||||
|
||||
Reference in New Issue
Block a user