1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;