From ecf2ac530cea16d318c31579388b3b3b32ee514e Mon Sep 17 00:00:00 2001 From: Guillaume Dupuy Date: Thu, 9 Mar 2017 17:58:07 +0100 Subject: [PATCH] Remove usePrice from xml, it's now used if minPrice or maxPrice are not default value --HG-- branch : item_group --- code/ryzom/client/src/item_group_manager.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp index 6fa7d285d..0ff17d269 100644 --- a/code/ryzom/client/src/item_group_manager.cpp +++ b/code/ryzom/client/src/item_group_manager.cpp @@ -70,9 +70,6 @@ void CItemGroup::writeTo(xmlNodePtr node) xmlSetProp (itemNode, (const xmlChar*)"color", (const xmlChar*)NLMISC::toString(item.color).c_str()); xmlSetProp (itemNode, (const xmlChar*)"minPrice", (const xmlChar*)NLMISC::toString(item.minPrice).c_str()); xmlSetProp (itemNode, (const xmlChar*)"maxPrice", (const xmlChar*)NLMISC::toString(item.maxPrice).c_str()); - xmlSetProp (itemNode, (const xmlChar*)"usePrice", (const xmlChar*)NLMISC::toString(item.usePrice).c_str()); - - } } @@ -102,9 +99,7 @@ void CItemGroup::readFrom(xmlNodePtr node) if (ptrName) NLMISC::fromString((const char*)ptrName, item.minPrice); ptrName = (char*) xmlGetProp(curNode, (xmlChar*)"maxPrice"); if (ptrName) NLMISC::fromString((const char*)ptrName, item.maxPrice); - ptrName = (char*) xmlGetProp(curNode, (xmlChar*)"usePrice"); - if (ptrName) NLMISC::fromString((const char*)ptrName, item.usePrice); - + item.usePrice = (item.minPrice != 0 || item.maxPrice != std::numeric_limits::max()); _Items.push_back(item); } curNode = curNode->next;