From 01cb2cfdd890ab13ae5ef2070e3070d04a2c88df Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 18 Feb 2020 16:19:08 +0100 Subject: [PATCH] Fixed: check if crystallized spell have a root icon for background or add it --- code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index a5a07420f..977bda672 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -1101,6 +1101,7 @@ void CDBCtrlSheet::infoReceived() { CViewRenderer &rVR = *CViewRenderer::getInstance(); CSBrickManager *pBM= CSBrickManager::getInstance(); + bool haveRoot = false; for(uint i=0; iEnchantment.Bricks.size(); ++i) { const CSBrickSheet *brick = pBM->getBrick(itemInfo->Enchantment.Bricks[i]); @@ -1108,11 +1109,17 @@ void CDBCtrlSheet::infoReceived() { if (!brick->isRoot() && !brick->isCredit() && !brick->isParameter()) { + if (!haveRoot) + { + _EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIconBack()), brick->IconBackColor)); + rVR.getTextureSizeFromId(_EnchantIcons.back().TextureId, _EnchantIcons.back().IconW, _EnchantIcons.back().IconH); + } _EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIcon()), brick->IconColor)); rVR.getTextureSizeFromId(_EnchantIcons.back().TextureId, _EnchantIcons.back().IconW, _EnchantIcons.back().IconH); } else if (brick->isRoot()) { + haveRoot = true; // there should be single root icon and it should be first one _EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIconBack()), brick->IconBackColor)); rVR.getTextureSizeFromId(_EnchantIcons.back().TextureId, _EnchantIcons.back().IconW, _EnchantIcons.back().IconH);