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

@ -86,10 +86,9 @@ DLL_LINKAGE bool ArtifactUtils::checkSpellbookIsNeeded(const CGHeroInstance * he
// TODO what'll happen if Titan's thunder is equipped by pickin git up or the start of game?
// Titan's Thunder creates new spellbook on equip
if(artID == ArtifactID::TITANS_THUNDER && slot == ArtifactPosition::RIGHT_HAND)
{
if(heroPtr)
{
if(heroPtr && !heroPtr->hasSpellbook())
{
return true;
}
}