From f0cbb087427ea9594ddec65100a31c2f067ac3d2 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 5 Nov 2023 18:36:57 -0800 Subject: [PATCH] show item price in encode-item action --- src/Main.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Main.cc b/src/Main.cc index 19e4ed27..99873a17 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -1602,6 +1602,8 @@ int main(int argc, char** argv) { auto pmt_v2 = make_shared(pmt_data_v2, ItemParameterTable::Version::V2); shared_ptr pmt_data_v3(new string(prs_decompress(load_file("system/item-tables/ItemPMT-gc.prs")))); auto pmt_v3 = make_shared(pmt_data_v3, ItemParameterTable::Version::V3); + shared_ptr pmt_data_v4(new string(prs_decompress(load_file("system/item-tables/ItemPMT-bb.prs")))); + auto pmt_v4 = make_shared(pmt_data_v4, ItemParameterTable::Version::V4); ItemData item = name_index->parse_item_description(cli_version, input_filename); @@ -1651,6 +1653,10 @@ int main(int argc, char** argv) { } log_info("Description: %s", desc.c_str()); + + size_t purchase_price = pmt_v4->price_for_item(item); + size_t sale_price = purchase_price >> 3; + log_info("Purchase price: %zu; sale price: %zu", purchase_price, sale_price); break; }