diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 52c400193..ae33318c3 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -341,7 +341,7 @@ IF(WITH_QT5) ENDIF() # freetype is needed since Qt 5.5 - FIND_PACKAGE(FreeType) + FIND_PACKAGE(Freetype) IF(FREETYPE_FOUND) SET(QT_LIBRARIES ${QT_LIBRARIES} ${FREETYPE_LIBRARIES}) diff --git a/code/CMakeModules/OSXToolChain.cmake b/code/CMakeModules/OSXToolChain.cmake index 5b4b2b223..3036aec01 100644 --- a/code/CMakeModules/OSXToolChain.cmake +++ b/code/CMakeModules/OSXToolChain.cmake @@ -1,7 +1,7 @@ # Define OSX_SDK to force a specific version such as : -DOSX_SDK=10.11 # # Example: -# cmake ../code -DCMAKE_TOOLCHAIN_FILE=../code/CMakeModules/OSXToolChain.cmake -DWITH_SYMBOLS=ON -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_LUA51=OFF -DWITH_LUA53=ON -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_INSTALLER=OFF -DWITH_RYZOM_PATCH=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_WARNINGS=OFF -DWITH_QT5=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_RYZOM_SANDBOX=OFF -DOSX_SDK=10.11 +# cmake ../code -DCMAKE_TOOLCHAIN_FILE=../code/CMakeModules/OSXToolChain.cmake -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_LUA51=OFF -DWITH_LUA53=ON -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_INSTALLER=OFF -DWITH_RYZOM_PATCH=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_WARNINGS=OFF -DWITH_QT5=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_RYZOM_SANDBOX=OFF -DOSX_SDK=10.11 # Don't forget to define environment variables: # diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp index 97e7160f7..bd94f4231 100644 --- a/code/ryzom/client/src/item_group_manager.cpp +++ b/code/ryzom/client/src/item_group_manager.cpp @@ -742,18 +742,21 @@ std::vector CItemGroupManager::matchingItems(CItemGroup *group, //Not very clean, but no choice, it's ugly time std::vector out; std::string dbPath = toDbPath(inventory); - if(dbPath.empty()) + + if (dbPath.empty()) { nldebug("Inventory type %s not supported", INVENTORIES::toString(inventory).c_str()); return out; } IListSheetBase *pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(dbPath)); + for(uint i=0; i < MAX_BAGINV_ENTRIES; i++) { CDBCtrlSheet *pCS = pList->getSheet(i); SLOT_EQUIPMENT::TSlotEquipment slot; - if(group->contains(pCS, slot)) + + if (group->contains(pCS, slot)) { //Sometimes, index in the list differ from the index in DB, and we need the index in DB, not the one from the list std::string dbPath = pCS->getSheet(); @@ -761,7 +764,12 @@ std::vector CItemGroupManager::matchingItems(CItemGroup *group, std::string indexS = dbPath.substr(found+1); uint32 index; NLMISC::fromString(indexS, index); - if(i != index) nldebug("Index from list is %d, where index from DB is %d", i, index); + + if (i != index) + { + nldebug("Index from list is %d, where index from DB is %d", i, index); + } + out.push_back(CInventoryItem(pCS, inventory, index, slot)); } }