| 1670 | } |
| 1671 | |
| 1672 | Json WorldEntityCallbacks::containerTakeAt(World* world, EntityId entityId, size_t offset) { |
| 1673 | if (auto container = world->get<ContainerObject>(entityId)) { |
| 1674 | auto itemDb = Root::singleton().itemDatabase(); |
| 1675 | if (offset < container->containerSize()) { |
| 1676 | if (auto res = container->takeItems(offset).result()) |
| 1677 | return itemDb->toJson(*res); |
| 1678 | } |
| 1679 | } |
| 1680 | |
| 1681 | return Json(); |
| 1682 | } |
| 1683 | |
| 1684 | Json WorldEntityCallbacks::containerTakeNumItemsAt(World* world, EntityId entityId, size_t offset, int const& count) { |
| 1685 | if (auto container = world->get<ContainerObject>(entityId)) { |
nothing calls this directly
no test coverage detected