| 17 | } |
| 18 | |
| 19 | char const * NameGuidToFixedString(std::string const & nameGuid) |
| 20 | { |
| 21 | if (nameGuid.size() < 36) { |
| 22 | OsiError("NameGuidToFixedString(): GUID (" << nameGuid << ") too short!"); |
| 23 | return nullptr; |
| 24 | } |
| 25 | |
| 26 | auto guid = nameGuid.substr(nameGuid.size() - 36, 36); |
| 27 | |
| 28 | auto stringTable = gOsirisProxy->GetLibraryManager().GetGlobalStringTable(); |
| 29 | if (stringTable == nullptr) { |
| 30 | OsiError("NameGuidToFixedString(): Global string table not available!"); |
| 31 | return nullptr; |
| 32 | } |
| 33 | |
| 34 | return stringTable->Find(guid.c_str(), guid.size()); |
| 35 | } |
| 36 | |
| 37 | esv::EoCServerObject * FindGameObjectByNameGuid(std::string const & nameGuid, bool logError) |
| 38 | { |
no test coverage detected