diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 1d1b01684..37c57bf0c 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -3495,6 +3495,25 @@ std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet) + if (!sheetPtr) + return ""; + + if (sheetPtr->type() == CEntitySheet::ITEM) + { + CItemSheet *sheet = (CItemSheet*)sheetPtr; + return sheet->getShape(); + } + else if (sheetPtr->type() == CEntitySheet::FAUNA) + { + CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr); + return sheet->Body.getItem(); + } + + return ""; +} + + + // *************************************************************************** std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet) {