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:
parent
59acf639da
commit
ade7a035f5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user