diff --git a/plugins/autotrade.cpp b/plugins/autotrade.cpp index c7b1b6ecb..898e96493 100644 --- a/plugins/autotrade.cpp +++ b/plugins/autotrade.cpp @@ -481,6 +481,13 @@ struct tradeview_hook : public df::viewscreen_tradegoodsst { INTERPOSE_NEXT(render)(); + if (counteroffer.size() > 0) + { + // The merchant is proposing a counteroffer, + // so there is nothing to mark. + return; + } + // Insert into the blank line between trade items and standard keys. // The blank line at the bottom is taken by the search plugin. auto dim = Screen::getWindowSize(); diff --git a/plugins/search.cpp b/plugins/search.cpp index 18586657b..dcf36809f 100644 --- a/plugins/search.cpp +++ b/plugins/search.cpp @@ -1074,6 +1074,14 @@ class trade_search_merc : public trade_search_base public: virtual void render() const { + if (viewscreen->counteroffer.size() > 0) + { + // The merchant is proposing a counteroffer. + // Not only is there nothing to search, + // but the native hotkeys are where we normally write. + return; + } + print_search_option(2, -1); if (!search_string.empty()) @@ -1116,6 +1124,14 @@ class trade_search_fort : public trade_search_base public: virtual void render() const { + if (viewscreen->counteroffer.size() > 0) + { + // The merchant is proposing a counteroffer. + // Not only is there nothing to search, + // but the native hotkeys are where we normally write. + return; + } + print_search_option(42, -1); if (!search_string.empty())