| 416 | } |
| 417 | |
| 418 | void Persistence::getAllByKey(std::vector<PersistentDataItem> &vec, int entity_id, const std::string &key) { |
| 419 | vec.clear(); |
| 420 | |
| 421 | if (!is_good_entity_id(entity_id) || !Core::getInstance().isWorldLoaded()) |
| 422 | return; |
| 423 | |
| 424 | CoreSuspender suspend; |
| 425 | |
| 426 | if (!store.contains(entity_id)) |
| 427 | return; |
| 428 | |
| 429 | auto range = store[entity_id].equal_range(key); |
| 430 | for (auto it = range.first; it != range.second; ++it) |
| 431 | vec.emplace_back(it->second); |
| 432 | } |
| 433 | |
| 434 | uint32_t Persistence::getUnsavedSeconds() { |
| 435 | uint32_t durMS = Core::getInstance().p->getTickCount() - lastLoadSaveTickCount; |
nothing calls this directly
no test coverage detected