Skip to content

Commit

Permalink
[Bug Fix] Fix Discovered Items with Alternate Currency and LDoN Adven…
Browse files Browse the repository at this point in the history
…ture Merchants (#3026)

* [Bug Fix] Fix Discovered Items with Alternate Currency Merchants

# Notes
- Before now, alternate currency merchants did not trigger item discovery.

* Update client_packet.cpp
  • Loading branch information
Kinglykrab committed Mar 4, 2023
1 parent 2cc61ef commit 6494fbf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zone/client_packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,10 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app)
if (item->MaxCharges != 0)
charges = item->MaxCharges;

if (RuleB(Character, EnableDiscoveredItems) && !GetGM() && !IsDiscovered(item->ID)) {
DiscoverItem(item->ID);
}

EQ::ItemInstance *inst = database.CreateItem(item, charges);
if (!AutoPutLootInInventory(*inst, true, true))
{
Expand Down Expand Up @@ -2632,6 +2636,10 @@ void Client::Handle_OP_AltCurrencyPurchase(const EQApplicationPacket *app)
RecordPlayerEventLog(PlayerEvent::MERCHANT_PURCHASE, e);
}

if (RuleB(Character, EnableDiscoveredItems) && !GetGM() && !IsDiscovered(item->ID)) {
DiscoverItem(item->ID);
}

EQ::ItemInstance *inst = database.CreateItem(item, charges);
if (!AutoPutLootInInventory(*inst, true, true))
{
Expand Down

0 comments on commit 6494fbf

Please sign in to comment.