1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-13 22:06:58 +02:00

artifactUtils: reduced cyclomatic complexity in check

Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
This commit is contained in:
Maxim Korotkov 2023-09-26 17:04:43 +03:00
parent 59acf639da
commit ade7a035f5

View File

@ -87,10 +87,9 @@ DLL_LINKAGE bool ArtifactUtils::checkSpellbookIsNeeded(const CGHeroInstance * he
// Titan's Thunder creates new spellbook on equip
if(artID == ArtifactID::TITANS_THUNDER && slot == ArtifactPosition::RIGHT_HAND)
{
if(heroPtr)
if(heroPtr && !heroPtr->hasSpellbook())
{
if(heroPtr && !heroPtr->hasSpellbook())
return true;
return true;
}
}
return false;