1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

ResourceSet: resolve .at troubles

This commit is contained in:
Konstantin
2023-03-31 14:12:38 +03:00
parent c1fd7309ad
commit 6d17b9342d
4 changed files with 13 additions and 13 deletions

View File

@ -22,7 +22,7 @@ VCMI_LIB_NAMESPACE_BEGIN
Res::ResourceSet::ResourceSet(const JsonNode & node)
{
for(auto i = 0; i < GameConstants::RESOURCE_QUANTITY; i++)
at(i) = static_cast<int>(node[GameConstants::RESOURCE_NAMES[i]].Float());
this[i] = static_cast<int>(node[GameConstants::RESOURCE_NAMES[i]].Float());
}
Res::ResourceSet::ResourceSet(TResource wood, TResource mercury, TResource ore, TResource sulfur, TResource crystal,