diff --git a/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.cpp b/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.cpp index 4cd5a9d7a..56e8894b9 100644 --- a/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.cpp +++ b/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.cpp @@ -91,6 +91,7 @@ namespace ObjectAttributeManagerNamespace bool hasTooltips; bool noTrade; bool noTradeShared; + bool noTradeRemovable; int revision; int tier; bool unique; @@ -102,6 +103,7 @@ namespace ObjectAttributeManagerNamespace hasTooltips(false), noTrade(false), noTradeShared(false), + noTradeRemovable(false), revision(_revision), tier(-1), unique(false), @@ -120,6 +122,9 @@ namespace ObjectAttributeManagerNamespace if (attribPair.first.find(SharedObjectAttributes::no_trade_shared) != std::string::npos) noTradeShared = true; + if (attribPair.first.find(SharedObjectAttributes::no_trade_removable) != std::string::npos) + noTradeRemovable = true; + if (attribPair.first.find(SharedObjectAttributes::unique) != std::string::npos) unique = true; @@ -637,6 +642,9 @@ void ObjectAttributeManager::formatAttributes (const AttributeVector & av, Uni if (fullKey.find(SharedObjectAttributes::no_trade_shared) != std::string::npos) continue; + if (fullKey.find(SharedObjectAttributes::no_trade_removable) != std::string::npos) + continue; + if (fullKey.find(SharedObjectAttributes::unique) != std::string::npos) continue; @@ -1371,6 +1379,22 @@ bool ObjectAttributeManager::isNoTradeShared(std::string const & staticItemName) //---------------------------------------------------------------------- +bool ObjectAttributeManager::isNoTradeRemovable(NetworkId const & id) +{ + bool noTradeRemovable = false; + + AttributeMap::const_iterator it = s_attribs.find(id); + if (it != s_attribs.end()) + { + AttributeInfo const & info = it->second; + noTradeShared = info.noTradeRemovable; + } + + return noTradeRemovable; +} + +//---------------------------------------------------------------------- + bool ObjectAttributeManager::isUnique(NetworkId const & id) { bool unique = false; diff --git a/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.h b/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.h index 01b931208..05a82227d 100644 --- a/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.h +++ b/src/engine/client/library/clientGame/src/shared/core/ObjectAttributeManager.h @@ -86,6 +86,7 @@ public: static bool isNoTrade(std::string const & staticItemName); static bool isNoTradeShared(NetworkId const & id); static bool isNoTradeShared(std::string const & staticItemName); + static bool isNoTradeRemovable(NetworkId const & id); // unique stuff static bool isUnique(NetworkId const & id); static bool isUnique(std::string const & staticItemName); diff --git a/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIds.h b/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIds.h index bd09a820d..5783d21af 100644 --- a/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIds.h +++ b/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIds.h @@ -184,6 +184,7 @@ namespace CuiStringIds MAKE_STRING_ID(ui, no_trade_tooltip); MAKE_STRING_ID(ui, no_trade_shared_tooltip); + MAKE_STRING_ID(ui, no_trade_removable_tooltip); MAKE_STRING_ID(ui, unique_tooltip); MAKE_STRING_ID(ui, change_friend_without_saving); diff --git a/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiInventoryInfo.cpp b/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiInventoryInfo.cpp index 0606f2140..0b6f911d5 100644 --- a/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiInventoryInfo.cpp +++ b/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiInventoryInfo.cpp @@ -732,7 +732,12 @@ void SwgCuiInventoryInfo::updateAttributeFlags() if (isNoTradeVisible) { - if (ObjectAttributeManager::isNoTradeShared(object->getNetworkId())) + if (ObjectAttributeManager::isNoTradeRemovable(object->getNetworkId())) + { + m_noTrade->SetLocalText(StringId("object_usability", "no_trade_removable").localize()); + m_noTrade->SetTooltip(CuiStringIds::no_trade_shared_removable.localize()); + } + else if (ObjectAttributeManager::isNoTradeShared(object->getNetworkId())) { m_noTrade->SetLocalText(StringId("object_usability", "no_trade_shared").localize()); m_noTrade->SetTooltip(CuiStringIds::no_trade_shared_tooltip.localize());