From 76a7df820b9a28c407eab0dd08c32948ccc30e40 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 2 May 2013 21:37:15 +0200 Subject: [PATCH] This should fix #41. It was creating the unknown for the new type and then returning a new sheet for the requested unknown --- code/nel/src/misc/sheet_id.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index cca64d887..83dd4be89 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -168,12 +168,15 @@ bool CSheetId::buildSheetId(const std::string& sheetName) _Id.IdInfos.Type = typeId; _Id.IdInfos.Id = _DevSheetIdToName[typeId].size() - 1; _DevSheetNameToId[unknownNewType] = _Id.Id; + if (sheetName == "unknown") + return true; // Return with the unknown sheet id of this type } else { typeId = tit->second; _Id.IdInfos.Type = typeId; } + // Add a new sheet name to the type _DevSheetIdToName[typeId].push_back(sheetNameLc); _Id.IdInfos.Id = _DevSheetIdToName[typeId].size() - 1; // nldebug("SHEETID: Type %i, id %i, sheetid %i", _Id.IdInfos.Type, _Id.IdInfos.Id, _Id.Id);