From f188c1394a3c5075a043d89cf5589af70b42c3dd Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 16 Dec 2022 16:11:58 -0500 Subject: [PATCH] Add ground spawns to discovered items feature. (#2648) * Add ground spawns to discovered items feature. * Add {} --- zone/object.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zone/object.cpp b/zone/object.cpp index 33a0d11d7..d930d1db0 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -535,6 +535,15 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object) sender->PutItemInInventory(EQ::invslot::slotCursor, *m_inst, false); sender->SendItemPacket(EQ::invslot::slotCursor, m_inst, ItemPacketTrade); + // Could be an undiscovered ground_spawn + if (m_ground_spawn && (RuleB(Character, EnableDiscoveredItems))) + { + if (!sender->GetGM() && !sender->IsDiscovered(item->ID)) + { + sender->DiscoverItem(item->ID); + } + } + if(cursordelete) // delete the item if it's a duplicate lore. We have to do this because the client expects the item packet sender->DeleteItemInInventory(EQ::invslot::slotCursor);