1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

ArtifactUtils::isSlotBackpack() func + refactoring

This commit is contained in:
SoundSSGood
2022-11-18 22:49:57 +02:00
parent 30bbb57619
commit e6e669d024
5 changed files with 15 additions and 17 deletions

View File

@@ -883,7 +883,7 @@ std::vector<const CArtifact *> CArtifactInstance::assemblyPossibilities(const CA
for(const auto * constituent : *artifact->constituents) //check if all constituents are available
{
if (equipped)
if(equipped)
{
// Search for equipped arts
if (!h->hasArt(constituent->id, true, false, false))
@@ -1564,4 +1564,9 @@ DLL_LINKAGE bool ArtifactUtils::checkSpellbookIsNeeded(const CGHeroInstance * he
return false;
}
DLL_LINKAGE bool ArtifactUtils::isSlotBackpack(ArtifactPosition slot)
{
return slot >= GameConstants::BACKPACK_START;
}
VCMI_LIB_NAMESPACE_END