From bc0071ac5709f1b259145db96454b25569cb34a9 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 21 May 2021 00:41:01 +0300 Subject: [PATCH] Fix issue with single enchant icon on jewels not showing --- ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 990a406af..94f9c2d33 100644 --- a/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -1168,10 +1168,20 @@ void CDBCtrlSheet::infoReceived() } else if (!brick->isRoot() && !brick->isCredit() && !brick->isParameter()) { - if (!haveRoot && !brick->getIconBack().empty()) + if (!haveRoot) { - _EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIconBack()), brick->IconBackColor)); - rVR.getTextureSizeFromId(_EnchantIcons.back().TextureId, _EnchantIcons.back().IconW, _EnchantIcons.back().IconH); + haveRoot = true; + if (brick->getIconBack().empty()) + { + // use blank texture with size from main icon + _EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("blank.tga"), NLMISC::CRGBA::White)); + rVR.getTextureSizeFromId(rVR.getTextureIdFromName(brick->getIcon()), _EnchantIcons.back().IconW, _EnchantIcons.back().IconH); + } + else + { + _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);