Merge with develop

--HG--
branch : compatibility-develop
This commit is contained in:
kervala 2017-06-20 12:31:31 +02:00
commit cb55615659
3 changed files with 13 additions and 5 deletions

View file

@ -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})

View file

@ -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:
#

View file

@ -742,18 +742,21 @@ std::vector<CInventoryItem> CItemGroupManager::matchingItems(CItemGroup *group,
//Not very clean, but no choice, it's ugly time
std::vector<CInventoryItem> 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<IListSheetBase*>(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<CInventoryItem> 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));
}
}