mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Implement CArtHandler::isBigArtifact and CArtifact::isTradable
This commit is contained in:
@@ -64,6 +64,11 @@ bool CArtifact::isBig () const
|
||||
return VLC->arth->isBigArtifact(id);
|
||||
}
|
||||
|
||||
bool CArtifact::isTradable () const
|
||||
{
|
||||
return VLC->arth->isTradableArtifact(id);
|
||||
}
|
||||
|
||||
CArtifact::CArtifact()
|
||||
{
|
||||
setNodeType(ARTIFACT);
|
||||
@@ -578,6 +583,14 @@ bool CArtHandler::legalArtifact(ArtifactID id)
|
||||
!(art->constituents); //no combo artifacts spawning
|
||||
}
|
||||
|
||||
bool CArtHandler::isTradableArtifact(ArtifactID id) const
|
||||
{
|
||||
if (id < 7 && id != ArtifactID::SPELL_SCROLL)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CArtHandler::initAllowedArtifactsList(const std::vector<bool> &allowed)
|
||||
{
|
||||
allowedArtifacts.clear();
|
||||
|
||||
Reference in New Issue
Block a user