From 506d0e8e5431e35ac9a68e9cbd6b6732940a1e52 Mon Sep 17 00:00:00 2001 From: Allofich Date: Tue, 4 Oct 2016 22:56:58 +0900 Subject: [PATCH] Correction to display of 0-weight tooltips --- apps/openmw/mwclass/armor.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index fb2615bed..75560dbcb 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -217,16 +217,19 @@ namespace MWClass std::string text; // get armor type string (light/medium/heavy) - int armorType = getEquipmentSkill(ptr); std::string typeText; - if (armorType == ESM::Skill::LightArmor) - typeText = "#{sLight}"; - else if (armorType == ESM::Skill::MediumArmor) - typeText = "#{sMedium}"; - else if (armorType == ESM::Skill::HeavyArmor) - typeText = "#{sHeavy}"; - else // if (armorType == ESM::Skill::Unarmored) + if (ref->mBase->mData.mWeight == 0) typeText = ""; + else + { + int armorType = getEquipmentSkill(ptr); + if (armorType == ESM::Skill::LightArmor) + typeText = "#{sLight}"; + else if (armorType == ESM::Skill::MediumArmor) + typeText = "#{sMedium}"; + else + typeText = "#{sHeavy}"; + } text += "\n#{sArmorRating}: " + MWGui::ToolTips::toString(getEffectiveArmorRating(ptr, MWMechanics::getPlayer()));