From a926abc45c0c0499fede0b11ae55fb5b7efe4489 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 24 May 2019 09:03:36 +0300 Subject: [PATCH] Fixed: Range/melee weapon buffs not displayed in tooltip --HG-- branch : compatibility-develop --- .../client/src/interface_v3/dbctrl_sheet.cpp | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 114407d16..8d76d7606 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -3161,7 +3161,11 @@ void CDBCtrlSheet::getContextHelp(ucstring &help) const const CItemSheet *item= asItemSheet(); if(item) { - if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL || item->Family == ITEMFAMILY::JEWELRY || item->Family == ITEMFAMILY::ARMOR) + if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL + || item->Family == ITEMFAMILY::JEWELRY + || item->Family == ITEMFAMILY::ARMOR + || item->Family == ITEMFAMILY::MELEE_WEAPON + || item->Family == ITEMFAMILY::RANGE_WEAPON) { string luaMethodName = ( (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip"); CDBCtrlSheet *ctrlSheet = const_cast(this); @@ -3306,9 +3310,12 @@ void CDBCtrlSheet::getContextHelpToolTip(ucstring &help) const const CItemSheet *item = asItemSheet(); if (item) { - if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL - || item->Family == ITEMFAMILY::JEWELRY || item->Family == ITEMFAMILY::ARMOR) - { + if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL + || item->Family == ITEMFAMILY::JEWELRY + || item->Family == ITEMFAMILY::ARMOR + || item->Family == ITEMFAMILY::MELEE_WEAPON + || item->Family == ITEMFAMILY::RANGE_WEAPON) + { string luaMethodName = (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip"; CDBCtrlSheet *ctrlSheet = const_cast(this); if ( ! getInventory().isItemInfoUpToDate(getInventory().getItemSlotId(ctrlSheet))) @@ -4468,7 +4475,10 @@ std::string CDBCtrlSheet::getContextHelpWindowName() const { return "crystallized_spell_context_help"; } - else if (item->Family == ITEMFAMILY::JEWELRY || item->Family == ITEMFAMILY::ARMOR) + else if (item->Family == ITEMFAMILY::JEWELRY + || item->Family == ITEMFAMILY::ARMOR + || item->Family == ITEMFAMILY::MELEE_WEAPON + || item->Family == ITEMFAMILY::RANGE_WEAPON) { return "buff_item_context_help"; }