diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 5b241595..d61c23c6 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -830,11 +830,25 @@ static void replay_action(Element& action) { click_talk_rect(word_rect); handle_talk_node(word_rect.node); return; - }else if(t == "click_shop_rect"){ + } + + // Legacy action: clicking any shop button used to highlight both the info + // button and the item text (which was a bug) + else if(t == "click_shop_rect"){ rectangle rect = boost::lexical_cast(action.GetText()); click_shop_rect(rect); return; - }else if(t == "end_shop_mode"){ + } + // Fixed versions: + else if(t == "click_shop_item"){ + rectangle rect = boost::lexical_cast(action.GetText()); + click_shop_rect(rect, false); + }else if(t == "click_shop_item_help"){ + rectangle rect = boost::lexical_cast(action.GetText()); + click_shop_rect(rect, true); + } + + else if(t == "end_shop_mode"){ end_shop_mode(); return; }else if(t == "scrollbar_setPosition"){ diff --git a/src/game/boe.newgraph.cpp b/src/game/boe.newgraph.cpp index 4386b77b..6391c7f4 100644 --- a/src/game/boe.newgraph.cpp +++ b/src/game/boe.newgraph.cpp @@ -601,7 +601,8 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) { void click_shop_rect(rectangle area_rect, bool item_help) { if(recording){ - record_action("click_shop_rect", boost::lexical_cast(area_rect)); + std::string action_name = item_help ? "click_shop_item_help" : "click_shop_item"; + record_action(action_name, boost::lexical_cast(area_rect)); } draw_shop_graphics(!item_help,item_help,area_rect);