diff --git a/plugins/proto/RemoteFortressReader.proto b/plugins/proto/RemoteFortressReader.proto index 62ea5ee54..433a247ae 100644 --- a/plugins/proto/RemoteFortressReader.proto +++ b/plugins/proto/RemoteFortressReader.proto @@ -267,6 +267,7 @@ message Item optional MatPair type = 5; optional MatPair material = 6; optional ColorDefinition dye = 7; + optional int32 stack_size = 8; } message MapBlock diff --git a/plugins/remotefortressreader/remotefortressreader.cpp b/plugins/remotefortressreader/remotefortressreader.cpp index 704c91ae1..22826ead3 100644 --- a/plugins/remotefortressreader/remotefortressreader.cpp +++ b/plugins/remotefortressreader/remotefortressreader.cpp @@ -1313,7 +1313,12 @@ void CopyItem(RemoteFortressReader::Item * NetItem, df::item * DfItem) { type->set_mat_index(DfItem->isBag()); } - auto constructed_item = virtual_cast(DfItem); + VIRTUAL_CAST_VAR(actual_item, df::item_actual, DfItem); + if (actual_item) + { + NetItem->set_stack_size(actual_item->stack_size); + } + VIRTUAL_CAST_VAR(constructed_item, df::item_constructed, DfItem); if (constructed_item) { for (int i = 0; i < constructed_item->improvements.size(); i++)