| 111 | } |
| 112 | |
| 113 | bool BasicSerializer::deserialize(std::string_view typeName, std::string_view binaryData, lua_State* lua) const |
| 114 | { |
| 115 | if (typeName != sRefNumTypeName) |
| 116 | return false; |
| 117 | ESM::RefNum refnum = loadRefNum(binaryData); |
| 118 | if (mAdjustContentFilesIndexFn) |
| 119 | refnum.mContentFile = mAdjustContentFilesIndexFn(refnum.mContentFile); |
| 120 | sol::stack::push<ESM::RefNum>(lua, refnum); |
| 121 | return true; |
| 122 | } |
| 123 | |
| 124 | ESM::RefNum UserdataSerializer::loadRefNum(std::string_view data) |
| 125 | { |