1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

remove double code

This commit is contained in:
Laserlicht
2023-09-26 10:28:10 +02:00
committed by GitHub
parent 6b5f6030e2
commit ab55615359

View File

@@ -41,6 +41,10 @@ void CArtPlace::setInternals(const CArtifactInstance * artInst)
return;
}
image->enable();
imageSpell->disable();
image->setFrame(artInst->artType->getIconIndex());
if(artInst->getTypeId() == ArtifactID::SPELL_SCROLL)
{
auto spellID = artInst->getScrollSpellID();
@@ -51,13 +55,7 @@ void CArtPlace::setInternals(const CArtifactInstance * artInst)
type = spellID;
bonusValue = 0;
if(!settings["general"]["enableUiEnhancements"].Bool())
{
image->enable();
imageSpell->disable();
image->setFrame(artInst->artType->getIconIndex());
}
else
if(settings["general"]["enableUiEnhancements"].Bool())
{
imageSpell->enable();
image->disable();
@@ -67,9 +65,6 @@ void CArtPlace::setInternals(const CArtifactInstance * artInst)
}
else
{
image->enable();
imageSpell->disable();
image->setFrame(artInst->artType->getIconIndex());
baseType = CComponent::artifact;
type = artInst->getTypeId();
bonusValue = 0;