1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

CArtifact getters setters

This commit is contained in:
SoundSSGood
2023-07-03 23:11:56 +03:00
parent fd9c7352a0
commit 9b5f6ec7cf
22 changed files with 68 additions and 57 deletions

View File

@@ -206,7 +206,7 @@ namespace JsonRandom
{
CArtifact * art = VLC->arth->objects[artID];
if(!vstd::iswithin(art->price, minValue, maxValue))
if(!vstd::iswithin(art->getPrice(), minValue, maxValue))
return false;
if(!allowedClasses.empty() && !allowedClasses.count(art->aClass))
@@ -217,7 +217,7 @@ namespace JsonRandom
if(!allowedPositions.empty())
{
for(const auto & pos : art->possibleSlots[ArtBearer::HERO])
for(const auto & pos : art->getPossibleSlots().at(ArtBearer::HERO))
{
if(allowedPositions.count(pos))
return true;