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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user