Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions crawl-ref/source/acquire.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ AcquireMenu::AcquireMenu(CrawlVector &aitems, string ikey,
}

static void _create_acquirement_item(item_def &item, string items_key,
bool is_gizmo = false)
bool is_gizmo = false, bool is_vendor = false)
{
auto &acq_items = you.props[items_key].get_vector();

Expand All @@ -1633,6 +1633,10 @@ static void _create_acquirement_item(item_def &item, string items_key,
item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET | ISFLAG_SEEN);
identify_item(item);

// Prevent repetitive post-acq type-id messages from vendors
if (is_vendor)
seen_item(item, false);

if (is_gizmo)
{
move_item_to_inv(item, true);
Expand Down Expand Up @@ -1690,7 +1694,7 @@ void AcquireMenu::init_entries()
}

item_def &acq_item = *static_cast<item_def*>(item.data);
_create_acquirement_item(acq_item, key, is_gizmo);
_create_acquirement_item(acq_item, key, is_gizmo, is_vendor);

return false;
};
Expand Down
5 changes: 3 additions & 2 deletions crawl-ref/source/item-prop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3273,7 +3273,7 @@ weapon_type name_nospace_to_weapon(string name_nospace)
return WPN_UNKNOWN;
}

void seen_item(item_def &item)
void seen_item(item_def &item, bool announce)
{
if (!is_artefact(item) && _is_affordable(item))
{
Expand Down Expand Up @@ -3306,7 +3306,8 @@ void seen_item(item_def &item)
for (int i = MAX_GEAR; i < ENDOFPACK; ++i)
{
if (you.inv[i].base_type == item.base_type
&& you.inv[i].sub_type == item.sub_type)
&& you.inv[i].sub_type == item.sub_type
&& announce)
{
held = &you.inv[i];
mprf("You learned that %s %s actually %s.",
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/item-prop.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ bool item_known_excluded_from_set(object_class_type type, int sub_type);
item_set_type item_set_by_name(string name);
string item_name_for_set(item_set_type typ);

void seen_item(item_def &item);
void seen_item(item_def &item, bool announce = true);

static inline bool is_weapon(const item_def &item)
{
Expand Down
Loading